diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 764dc3ad..a30a67ff 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,20 +1,22 @@ lockVersion: 2.0.0 id: 1732900d-e173-47c1-a90d-d45182eb35d9 management: - docChecksum: eae2a027b2467f033ac397a5d9f0add5 + docChecksum: a6fee1797b2da7ccbaf7743772a40b56 docVersion: 0.0.3 - speakeasyVersion: 1.392.1 - generationVersion: 2.411.9 - releaseVersion: 0.2.2 - configChecksum: ae73d5d4de760abea0e7ac40dd4cd90e + speakeasyVersion: 1.396.6 + generationVersion: 2.415.6 + releaseVersion: 0.3.0 + configChecksum: 3d05baf8e1c438b2f143cf945c6735bd + repoURL: https://github.com/LukeHagar/plexjava.git published: true features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.29.5 + core: 3.29.7 deprecations: 2.81.1 downloadStreams: 0.1.1 + errors: 0.1.3 flattening: 2.81.1 globalSecurity: 2.82.7 globalSecurityCallbacks: 0.1.0 @@ -31,155 +33,297 @@ generatedFiles: - CONTRIBUTING.md - USAGE.md - build.gradle + - docs/models/errors/AddPlaylistContentsBadRequest.md - docs/models/errors/AddPlaylistContentsErrors.md - - docs/models/errors/AddPlaylistContentsResponseBody.md + - docs/models/errors/AddPlaylistContentsPlaylistsErrors.md + - docs/models/errors/AddPlaylistContentsUnauthorized.md + - docs/models/errors/ApplyUpdatesBadRequest.md - docs/models/errors/ApplyUpdatesErrors.md - - docs/models/errors/ApplyUpdatesResponseBody.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/CancelServerActivitiesResponseBody.md + - docs/models/errors/CancelServerActivitiesUnauthorized.md + - docs/models/errors/CheckForUpdatesBadRequest.md - docs/models/errors/CheckForUpdatesErrors.md - - docs/models/errors/CheckForUpdatesResponseBody.md + - docs/models/errors/CheckForUpdatesUnauthorized.md + - docs/models/errors/CheckForUpdatesUpdaterErrors.md + - docs/models/errors/ClearPlaylistContentsBadRequest.md - docs/models/errors/ClearPlaylistContentsErrors.md - - docs/models/errors/ClearPlaylistContentsResponseBody.md + - docs/models/errors/ClearPlaylistContentsPlaylistsErrors.md + - docs/models/errors/ClearPlaylistContentsUnauthorized.md + - docs/models/errors/CreatePlaylistBadRequest.md - docs/models/errors/CreatePlaylistErrors.md - - docs/models/errors/CreatePlaylistResponseBody.md + - docs/models/errors/CreatePlaylistPlaylistsErrors.md + - docs/models/errors/CreatePlaylistUnauthorized.md + - docs/models/errors/DeleteLibraryBadRequest.md - docs/models/errors/DeleteLibraryErrors.md - - docs/models/errors/DeleteLibraryResponseBody.md + - docs/models/errors/DeleteLibraryLibraryErrors.md + - docs/models/errors/DeleteLibraryUnauthorized.md + - docs/models/errors/DeletePlaylistBadRequest.md - docs/models/errors/DeletePlaylistErrors.md - - docs/models/errors/DeletePlaylistResponseBody.md + - docs/models/errors/DeletePlaylistPlaylistsErrors.md + - docs/models/errors/DeletePlaylistUnauthorized.md + - docs/models/errors/EnablePaperTrailBadRequest.md - docs/models/errors/EnablePaperTrailErrors.md - - docs/models/errors/EnablePaperTrailResponseBody.md + - docs/models/errors/EnablePaperTrailLogErrors.md + - docs/models/errors/EnablePaperTrailUnauthorized.md - docs/models/errors/Errors.md + - docs/models/errors/GetAllLibrariesBadRequest.md - docs/models/errors/GetAllLibrariesErrors.md - - docs/models/errors/GetAllLibrariesResponseBody.md + - docs/models/errors/GetAllLibrariesLibraryErrors.md + - docs/models/errors/GetAllLibrariesUnauthorized.md + - docs/models/errors/GetAvailableClientsBadRequest.md - docs/models/errors/GetAvailableClientsErrors.md - - docs/models/errors/GetAvailableClientsResponseBody.md + - docs/models/errors/GetAvailableClientsServerErrors.md + - docs/models/errors/GetAvailableClientsUnauthorized.md + - docs/models/errors/GetBandwidthStatisticsBadRequest.md - docs/models/errors/GetBandwidthStatisticsErrors.md - - docs/models/errors/GetBandwidthStatisticsResponseBody.md + - docs/models/errors/GetBandwidthStatisticsStatisticsErrors.md + - docs/models/errors/GetBandwidthStatisticsUnauthorized.md + - docs/models/errors/GetBannerImageBadRequest.md - docs/models/errors/GetBannerImageErrors.md - - docs/models/errors/GetBannerImageResponseBody.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/GetButlerTasksResponseBody.md + - docs/models/errors/GetButlerTasksUnauthorized.md + - docs/models/errors/GetCompanionsDataBadRequest.md - docs/models/errors/GetCompanionsDataErrors.md - - docs/models/errors/GetCompanionsDataResponseBody.md + - docs/models/errors/GetCompanionsDataPlexErrors.md + - docs/models/errors/GetCompanionsDataUnauthorized.md + - docs/models/errors/GetDevicesBadRequest.md - docs/models/errors/GetDevicesErrors.md - - docs/models/errors/GetDevicesResponseBody.md + - docs/models/errors/GetDevicesServerErrors.md + - docs/models/errors/GetDevicesUnauthorized.md + - docs/models/errors/GetFileHashBadRequest.md - docs/models/errors/GetFileHashErrors.md - - docs/models/errors/GetFileHashResponseBody.md + - docs/models/errors/GetFileHashLibraryErrors.md + - docs/models/errors/GetFileHashUnauthorized.md + - docs/models/errors/GetGeoDataBadRequest.md - docs/models/errors/GetGeoDataErrors.md - - docs/models/errors/GetGeoDataResponseBody.md + - docs/models/errors/GetGeoDataPlexErrors.md + - docs/models/errors/GetGeoDataUnauthorized.md + - docs/models/errors/GetGlobalHubsBadRequest.md - docs/models/errors/GetGlobalHubsErrors.md - - docs/models/errors/GetGlobalHubsResponseBody.md + - docs/models/errors/GetGlobalHubsHubsErrors.md + - docs/models/errors/GetGlobalHubsUnauthorized.md + - docs/models/errors/GetHomeDataBadRequest.md - docs/models/errors/GetHomeDataErrors.md - - docs/models/errors/GetHomeDataResponseBody.md + - docs/models/errors/GetHomeDataPlexErrors.md + - docs/models/errors/GetHomeDataUnauthorized.md + - docs/models/errors/GetLibraryDetailsBadRequest.md - docs/models/errors/GetLibraryDetailsErrors.md - - docs/models/errors/GetLibraryDetailsResponseBody.md + - docs/models/errors/GetLibraryDetailsLibraryErrors.md + - docs/models/errors/GetLibraryDetailsUnauthorized.md + - docs/models/errors/GetLibraryHubsBadRequest.md - docs/models/errors/GetLibraryHubsErrors.md - - docs/models/errors/GetLibraryHubsResponseBody.md + - docs/models/errors/GetLibraryHubsHubsErrors.md + - docs/models/errors/GetLibraryHubsUnauthorized.md + - docs/models/errors/GetLibraryItemsBadRequest.md - docs/models/errors/GetLibraryItemsErrors.md - - docs/models/errors/GetLibraryItemsResponseBody.md + - docs/models/errors/GetLibraryItemsLibraryErrors.md + - docs/models/errors/GetLibraryItemsUnauthorized.md + - docs/models/errors/GetMediaProvidersBadRequest.md - docs/models/errors/GetMediaProvidersErrors.md - - docs/models/errors/GetMediaProvidersResponseBody.md + - docs/models/errors/GetMediaProvidersServerErrors.md + - docs/models/errors/GetMediaProvidersUnauthorized.md + - docs/models/errors/GetMetaDataByRatingKeyBadRequest.md - docs/models/errors/GetMetaDataByRatingKeyErrors.md - - docs/models/errors/GetMetaDataByRatingKeyResponseBody.md + - docs/models/errors/GetMetaDataByRatingKeyLibraryErrors.md + - docs/models/errors/GetMetaDataByRatingKeyUnauthorized.md + - docs/models/errors/GetMetadataChildrenBadRequest.md - docs/models/errors/GetMetadataChildrenErrors.md - - docs/models/errors/GetMetadataChildrenResponseBody.md + - docs/models/errors/GetMetadataChildrenLibraryErrors.md + - docs/models/errors/GetMetadataChildrenUnauthorized.md + - docs/models/errors/GetMyPlexAccountBadRequest.md - docs/models/errors/GetMyPlexAccountErrors.md - - docs/models/errors/GetMyPlexAccountResponseBody.md + - docs/models/errors/GetMyPlexAccountServerErrors.md + - docs/models/errors/GetMyPlexAccountUnauthorized.md + - docs/models/errors/GetOnDeckBadRequest.md - docs/models/errors/GetOnDeckErrors.md - - docs/models/errors/GetOnDeckResponseBody.md + - docs/models/errors/GetOnDeckLibraryErrors.md + - docs/models/errors/GetOnDeckUnauthorized.md + - docs/models/errors/GetPinBadRequest.md - docs/models/errors/GetPinErrors.md - - docs/models/errors/GetPinResponseBody.md + - docs/models/errors/GetPlaylistBadRequest.md + - docs/models/errors/GetPlaylistContentsBadRequest.md - docs/models/errors/GetPlaylistContentsErrors.md - - docs/models/errors/GetPlaylistContentsResponseBody.md + - docs/models/errors/GetPlaylistContentsPlaylistsErrors.md + - docs/models/errors/GetPlaylistContentsUnauthorized.md - docs/models/errors/GetPlaylistErrors.md - - docs/models/errors/GetPlaylistResponseBody.md + - docs/models/errors/GetPlaylistPlaylistsErrors.md + - docs/models/errors/GetPlaylistUnauthorized.md + - docs/models/errors/GetPlaylistsBadRequest.md - docs/models/errors/GetPlaylistsErrors.md - - docs/models/errors/GetPlaylistsResponseBody.md + - docs/models/errors/GetPlaylistsPlaylistsErrors.md + - docs/models/errors/GetPlaylistsUnauthorized.md + - docs/models/errors/GetRecentlyAddedBadRequest.md - docs/models/errors/GetRecentlyAddedErrors.md - - docs/models/errors/GetRecentlyAddedResponseBody.md + - docs/models/errors/GetRecentlyAddedLibraryErrors.md + - docs/models/errors/GetRecentlyAddedUnauthorized.md + - docs/models/errors/GetRefreshLibraryMetadataBadRequest.md - docs/models/errors/GetRefreshLibraryMetadataErrors.md - - docs/models/errors/GetRefreshLibraryMetadataResponseBody.md + - docs/models/errors/GetRefreshLibraryMetadataLibraryErrors.md + - docs/models/errors/GetRefreshLibraryMetadataUnauthorized.md + - docs/models/errors/GetResizedPhotoBadRequest.md - docs/models/errors/GetResizedPhotoErrors.md - - docs/models/errors/GetResizedPhotoResponseBody.md + - docs/models/errors/GetResizedPhotoServerErrors.md + - docs/models/errors/GetResizedPhotoUnauthorized.md + - docs/models/errors/GetResourcesStatisticsBadRequest.md - docs/models/errors/GetResourcesStatisticsErrors.md - - docs/models/errors/GetResourcesStatisticsResponseBody.md + - docs/models/errors/GetResourcesStatisticsStatisticsErrors.md + - docs/models/errors/GetResourcesStatisticsUnauthorized.md + - docs/models/errors/GetSearchLibraryBadRequest.md - docs/models/errors/GetSearchLibraryErrors.md - - docs/models/errors/GetSearchLibraryResponseBody.md + - docs/models/errors/GetSearchLibraryLibraryErrors.md + - docs/models/errors/GetSearchLibraryUnauthorized.md + - docs/models/errors/GetSearchResultsBadRequest.md - docs/models/errors/GetSearchResultsErrors.md - - docs/models/errors/GetSearchResultsResponseBody.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/GetServerActivitiesResponseBody.md - - docs/models/errors/GetServerCapabilitiesResponseBody.md - - docs/models/errors/GetServerIdentityResponseBody.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/GetServerListResponseBody.md + - docs/models/errors/GetServerListServerErrors.md + - docs/models/errors/GetServerListUnauthorized.md + - docs/models/errors/GetServerPreferencesBadRequest.md - docs/models/errors/GetServerPreferencesErrors.md - - docs/models/errors/GetServerPreferencesResponseBody.md + - docs/models/errors/GetServerPreferencesServerErrors.md + - docs/models/errors/GetServerPreferencesUnauthorized.md + - docs/models/errors/GetServerResourcesBadRequest.md - docs/models/errors/GetServerResourcesErrors.md - - docs/models/errors/GetServerResourcesResponseBody.md + - docs/models/errors/GetServerResourcesPlexErrors.md + - docs/models/errors/GetServerResourcesUnauthorized.md + - docs/models/errors/GetSessionHistoryBadRequest.md - docs/models/errors/GetSessionHistoryErrors.md - - docs/models/errors/GetSessionHistoryResponseBody.md + - docs/models/errors/GetSessionHistorySessionsErrors.md + - docs/models/errors/GetSessionHistoryUnauthorized.md + - docs/models/errors/GetSessionsBadRequest.md - docs/models/errors/GetSessionsErrors.md - - docs/models/errors/GetSessionsResponseBody.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/GetSourceConnectionInformationResponseBody.md + - docs/models/errors/GetSourceConnectionInformationUnauthorized.md + - docs/models/errors/GetStatisticsBadRequest.md - docs/models/errors/GetStatisticsErrors.md - - docs/models/errors/GetStatisticsResponseBody.md + - docs/models/errors/GetStatisticsStatisticsErrors.md + - docs/models/errors/GetStatisticsUnauthorized.md + - docs/models/errors/GetThumbImageBadRequest.md - docs/models/errors/GetThumbImageErrors.md - - docs/models/errors/GetThumbImageResponseBody.md + - docs/models/errors/GetThumbImageMediaErrors.md + - docs/models/errors/GetThumbImageUnauthorized.md + - docs/models/errors/GetTimelineBadRequest.md - docs/models/errors/GetTimelineErrors.md - - docs/models/errors/GetTimelineResponseBody.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/GetTokenByPinIdPlexResponseBody.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/GetTopWatchedContentResponseBody.md + - docs/models/errors/GetTopWatchedContentLibraryErrors.md + - docs/models/errors/GetTopWatchedContentUnauthorized.md + - docs/models/errors/GetTranscodeSessionsBadRequest.md - docs/models/errors/GetTranscodeSessionsErrors.md - - docs/models/errors/GetTranscodeSessionsResponseBody.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/GetTransientTokenResponseBody.md + - docs/models/errors/GetTransientTokenUnauthorized.md + - docs/models/errors/GetUpdateStatusBadRequest.md - docs/models/errors/GetUpdateStatusErrors.md - - docs/models/errors/GetUpdateStatusResponseBody.md - - docs/models/errors/GetUserDetailsErrors.md - - docs/models/errors/GetUserDetailsResponseBody.md + - docs/models/errors/GetUpdateStatusUnauthorized.md + - docs/models/errors/GetUpdateStatusUpdaterErrors.md + - docs/models/errors/GetUserFriendsBadRequest.md - docs/models/errors/GetUserFriendsErrors.md - - docs/models/errors/GetUserFriendsResponseBody.md + - docs/models/errors/GetUserFriendsPlexErrors.md + - docs/models/errors/GetUserFriendsUnauthorized.md + - docs/models/errors/GetWatchListBadRequest.md - docs/models/errors/GetWatchListErrors.md - - docs/models/errors/GetWatchListResponseBody.md + - docs/models/errors/GetWatchListUnauthorized.md + - docs/models/errors/GetWatchListWatchlistErrors.md + - docs/models/errors/LogLineBadRequest.md - docs/models/errors/LogLineErrors.md - - docs/models/errors/LogLineResponseBody.md + - docs/models/errors/LogLineLogErrors.md + - docs/models/errors/LogLineUnauthorized.md + - docs/models/errors/LogMultiLineBadRequest.md - docs/models/errors/LogMultiLineErrors.md - - docs/models/errors/LogMultiLineResponseBody.md + - docs/models/errors/LogMultiLineLogErrors.md + - docs/models/errors/LogMultiLineUnauthorized.md + - docs/models/errors/MarkPlayedBadRequest.md - docs/models/errors/MarkPlayedErrors.md - - docs/models/errors/MarkPlayedResponseBody.md + - docs/models/errors/MarkPlayedMediaErrors.md + - docs/models/errors/MarkPlayedUnauthorized.md + - docs/models/errors/MarkUnplayedBadRequest.md - docs/models/errors/MarkUnplayedErrors.md - - docs/models/errors/MarkUnplayedResponseBody.md + - docs/models/errors/MarkUnplayedMediaErrors.md + - docs/models/errors/MarkUnplayedUnauthorized.md + - docs/models/errors/PerformSearchBadRequest.md - docs/models/errors/PerformSearchErrors.md - - docs/models/errors/PerformSearchResponseBody.md + - docs/models/errors/PerformSearchSearchErrors.md + - docs/models/errors/PerformSearchUnauthorized.md + - docs/models/errors/PerformVoiceSearchBadRequest.md - docs/models/errors/PerformVoiceSearchErrors.md - - docs/models/errors/PerformVoiceSearchResponseBody.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/PostUsersSignInDataResponseBody.md + - docs/models/errors/PostUsersSignInDataUnauthorized.md + - docs/models/errors/StartAllTasksBadRequest.md + - docs/models/errors/StartAllTasksButlerErrors.md - docs/models/errors/StartAllTasksErrors.md - - docs/models/errors/StartAllTasksResponseBody.md + - docs/models/errors/StartAllTasksUnauthorized.md + - docs/models/errors/StartTaskBadRequest.md + - docs/models/errors/StartTaskButlerErrors.md - docs/models/errors/StartTaskErrors.md - - docs/models/errors/StartTaskResponseBody.md + - docs/models/errors/StartTaskUnauthorized.md + - docs/models/errors/StartUniversalTranscodeBadRequest.md - docs/models/errors/StartUniversalTranscodeErrors.md - - docs/models/errors/StartUniversalTranscodeResponseBody.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/StopAllTasksResponseBody.md + - docs/models/errors/StopAllTasksUnauthorized.md + - docs/models/errors/StopTaskBadRequest.md + - docs/models/errors/StopTaskButlerErrors.md - docs/models/errors/StopTaskErrors.md - - docs/models/errors/StopTaskResponseBody.md + - docs/models/errors/StopTaskUnauthorized.md + - docs/models/errors/StopTranscodeSessionBadRequest.md - docs/models/errors/StopTranscodeSessionErrors.md - - docs/models/errors/StopTranscodeSessionResponseBody.md + - docs/models/errors/StopTranscodeSessionSessionsErrors.md + - docs/models/errors/StopTranscodeSessionUnauthorized.md + - docs/models/errors/UpdatePlayProgressBadRequest.md - docs/models/errors/UpdatePlayProgressErrors.md - - docs/models/errors/UpdatePlayProgressResponseBody.md + - docs/models/errors/UpdatePlayProgressMediaErrors.md + - docs/models/errors/UpdatePlayProgressUnauthorized.md + - docs/models/errors/UpdatePlaylistBadRequest.md - docs/models/errors/UpdatePlaylistErrors.md - - docs/models/errors/UpdatePlaylistResponseBody.md + - docs/models/errors/UpdatePlaylistPlaylistsErrors.md + - docs/models/errors/UpdatePlaylistUnauthorized.md + - docs/models/errors/UploadPlaylistBadRequest.md - docs/models/errors/UploadPlaylistErrors.md - - docs/models/errors/UploadPlaylistResponseBody.md + - docs/models/errors/UploadPlaylistPlaylistsErrors.md + - docs/models/errors/UploadPlaylistUnauthorized.md - docs/models/operations/Account.md - docs/models/operations/Activity.md - docs/models/operations/AddPlaylistContentsMediaContainer.md @@ -426,6 +570,13 @@ generatedFiles: - 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/GetTokenDetailsFeatures.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 @@ -445,14 +596,6 @@ generatedFiles: - docs/models/operations/GetUpdateStatusMediaContainer.md - docs/models/operations/GetUpdateStatusResponse.md - docs/models/operations/GetUpdateStatusResponseBody.md - - docs/models/operations/GetUserDetailsAuthenticationResponseStatus.md - - docs/models/operations/GetUserDetailsAuthenticationStatus.md - - docs/models/operations/GetUserDetailsFeatures.md - - docs/models/operations/GetUserDetailsRequest.md - - docs/models/operations/GetUserDetailsResponse.md - - docs/models/operations/GetUserDetailsStatus.md - - docs/models/operations/GetUserDetailsSubscription.md - - docs/models/operations/GetUserDetailsUserPlexAccount.md - docs/models/operations/GetUserFriendsResponse.md - docs/models/operations/GetWatchListRequest.md - docs/models/operations/GetWatchListResponse.md @@ -618,157 +761,299 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/Updater.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/AddPlaylistContentsResponseBody.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/ApplyUpdatesResponseBody.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/CancelServerActivitiesResponseBody.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/CheckForUpdatesResponseBody.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/ClearPlaylistContentsResponseBody.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/CreatePlaylistResponseBody.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/DeleteLibraryResponseBody.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/DeletePlaylistResponseBody.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/EnablePaperTrailResponseBody.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/GetAllLibrariesBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesResponseBody.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/GetAvailableClientsResponseBody.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/GetBandwidthStatisticsResponseBody.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/GetBannerImageResponseBody.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/GetButlerTasksResponseBody.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/GetCompanionsDataResponseBody.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/GetDevicesBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetDevicesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetDevicesResponseBody.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/GetFileHashResponseBody.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/GetGeoDataBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataResponseBody.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/GetGlobalHubsResponseBody.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/GetHomeDataResponseBody.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/GetLibraryDetailsResponseBody.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/GetLibraryHubsResponseBody.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/GetLibraryItemsResponseBody.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/GetMediaProvidersBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersResponseBody.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/GetMetaDataByRatingKeyBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyResponseBody.java + - src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyLibraryErrors.java + - src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyUnauthorized.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/GetMetadataChildrenResponseBody.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/GetMyPlexAccountResponseBody.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/GetOnDeckBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckResponseBody.java + - src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckLibraryErrors.java + - src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckUnauthorized.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/GetPinResponseBody.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/GetPlaylistContentsResponseBody.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/GetPlaylistResponseBody.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/GetPlaylistsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java + - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsUnauthorized.java + - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedResponseBody.java + - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java + - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedUnauthorized.java + - src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataResponseBody.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/GetResizedPhotoResponseBody.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/GetResourcesStatisticsResponseBody.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/GetSearchLibraryBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryResponseBody.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/GetSearchResultsResponseBody.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/GetServerActivitiesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityResponseBody.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/GetServerListResponseBody.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/GetServerPreferencesResponseBody.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/GetServerResourcesResponseBody.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/GetSessionHistoryResponseBody.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/GetSessionsResponseBody.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/GetSourceConnectionInformationResponseBody.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/GetStatisticsResponseBody.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/GetThumbImageResponseBody.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/GetTimelineResponseBody.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/GetTokenByPinIdPlexResponseBody.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/GetTopWatchedContentResponseBody.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/GetTranscodeSessionsResponseBody.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/GetTransientTokenResponseBody.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/GetUpdateStatusResponseBody.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsResponseBody.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/GetUserFriendsResponseBody.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/GetWatchListBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetWatchListErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetWatchListResponseBody.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/LogLineResponseBody.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/LogMultiLineResponseBody.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/MarkPlayedResponseBody.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/MarkUnplayedResponseBody.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/PerformSearchResponseBody.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/PerformVoiceSearchResponseBody.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/PostUsersSignInDataResponseBody.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/StartAllTasksResponseBody.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/StartTaskResponseBody.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/StartUniversalTranscodeResponseBody.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/StopAllTasksResponseBody.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/StopTaskResponseBody.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/StopTranscodeSessionResponseBody.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/UpdatePlayProgressBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressResponseBody.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/UpdatePlaylistResponseBody.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/UploadPlaylistResponseBody.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/operations/Account.java - src/main/java/dev/plexapi/sdk/models/operations/Activity.java - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMediaContainer.java @@ -1066,6 +1351,14 @@ generatedFiles: - 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/GetTokenDetailsFeatures.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 @@ -1089,15 +1382,6 @@ generatedFiles: - 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/GetUserDetailsAuthenticationResponseStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsAuthenticationStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsFeatures.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsSubscription.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsUserPlexAccount.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/GetWatchListRequest.java @@ -1285,6 +1569,8 @@ examples: "401": application/json: {"errors": []} "200": {} + "400": + application/json: {"errors": []} getServerPreferences: speakeasy-default-get-server-preferences: responses: @@ -1292,6 +1578,8 @@ examples: application/json: {"MediaContainer": {"size": 161, "Setting": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getAvailableClients: speakeasy-default-get-available-clients: responses: @@ -1299,6 +1587,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "Server": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getDevices: speakeasy-default-get-devices: responses: @@ -1306,6 +1596,8 @@ examples: application/json: {"MediaContainer": {"size": 151, "identifier": "com.plexapp.system.devices", "Device": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-server-identity: speakeasy-default-get-server-identity: responses: @@ -1320,6 +1612,8 @@ examples: application/json: {"MyPlex": {"authToken": "Z5v-PrNASDFpsaCi3CPK7", "username": "example.email@mail.com", "mappingState": "mapped", "signInState": "ok", "publicAddress": "140.20.68.140", "publicPort": 32400, "privateAddress": "10.10.10.47", "privatePort": 32400, "subscriptionFeatures": "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", "subscriptionState": "Active"}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getResizedPhoto: speakeasy-default-get-resized-photo: parameters: @@ -1334,6 +1628,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-media-providers: speakeasy-default-get-media-providers: parameters: @@ -1343,6 +1639,8 @@ examples: "401": application/json: {"errors": []} "200": {} + "400": + application/json: {"errors": []} getServerList: speakeasy-default-get-server-list: responses: @@ -1350,6 +1648,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "Server": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} markPlayed: speakeasy-default-mark-played: parameters: @@ -1358,6 +1658,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} markUnplayed: speakeasy-default-mark-unplayed: parameters: @@ -1366,6 +1668,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} updatePlayProgress: "": parameters: @@ -1376,6 +1680,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-banner-image: speakeasy-default-get-banner-image: parameters: @@ -1391,6 +1697,8 @@ examples: "401": application/json: {"errors": []} "200": {} + "400": + application/json: {"errors": []} get-thumb-image: speakeasy-default-get-thumb-image: parameters: @@ -1406,6 +1714,8 @@ examples: "401": application/json: {"errors": []} "200": {} + "400": + application/json: {"errors": []} getTimeline: "": parameters: @@ -1423,6 +1733,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} startUniversalTranscode: "": parameters: @@ -1446,12 +1758,16 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getServerActivities: speakeasy-default-get-server-activities: responses: "401": application/json: {"errors": []} "200": {} + "400": + application/json: {"errors": []} cancelServerActivities: "": parameters: @@ -1460,6 +1776,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getButlerTasks: speakeasy-default-get-butler-tasks: responses: @@ -1467,16 +1785,22 @@ examples: application/json: {"ButlerTasks": {"ButlerTask": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} startAllTasks: speakeasy-default-start-all-tasks: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} stopAllTasks: speakeasy-default-stop-all-tasks: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} startTask: speakeasy-default-start-task: parameters: @@ -1485,6 +1809,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} stopTask: speakeasy-default-stop-task: parameters: @@ -1493,6 +1819,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getCompanionsData: speakeasy-default-get-companions-data: responses: @@ -1500,6 +1828,8 @@ examples: application/json: [] "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getUserFriends: speakeasy-default-get-user-friends: responses: @@ -1507,6 +1837,8 @@ examples: application/json: [{"email": "username@email.com", "friendlyName": "exampleUser", "home": true, "id": 0, "restricted": false, "sharedServers": [], "sharedSources": [], "status": "accepted", "thumb": "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", "title": "username123", "username": "username123", "uuid": "7d1916e0d8f6e76b"}] "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getGeoData: speakeasy-default-get-geo-data: responses: @@ -1514,6 +1846,8 @@ examples: application/json: {"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"} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getHomeData: speakeasy-default-get-home-data: responses: @@ -1521,6 +1855,8 @@ examples: application/json: {"id": 1841489, "name": "Blindkitty38's home", "guestUserID": 58815432, "guestUserUUID": "f3df4e01bfca0787"} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-server-resources: speakeasy-default-get-server-resources: parameters: @@ -1532,7 +1868,10 @@ examples: responses: "401": application/json: {"errors": []} - "200": {} + "200": + application/json: [] + "400": + application/json: {"errors": []} getPin: "": parameters: @@ -1563,6 +1902,8 @@ examples: application/json: {"MediaContainer": {"size": 8, "allowSync": true, "identifier": "com.plexapp.plugins.library", "Hub": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getLibraryHubs: speakeasy-default-get-library-hubs: parameters: @@ -1574,6 +1915,8 @@ examples: application/json: {"MediaContainer": {"size": 7, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "Hub": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} performSearch: speakeasy-default-perform-search: parameters: @@ -1583,6 +1926,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} performVoiceSearch: speakeasy-default-perform-voice-search: parameters: @@ -1592,6 +1937,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getSearchResults: speakeasy-default-get-search-results: parameters: @@ -1602,6 +1949,8 @@ examples: application/json: {"MediaContainer": {"size": 26, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [], "Provider": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getFileHash: speakeasy-default-get-file-hash: parameters: @@ -1610,6 +1959,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getRecentlyAdded: speakeasy-default-get-recently-added: parameters: @@ -1621,6 +1972,8 @@ examples: application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-all-libraries: speakeasy-default-get-all-libraries: responses: @@ -1628,6 +1981,8 @@ examples: application/json: {"MediaContainer": {"size": 5, "allowSync": false, "title1": "Plex Library", "Directory": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-library-details: speakeasy-default-get-library-details: parameters: @@ -1639,6 +1994,8 @@ examples: application/json: {"MediaContainer": {"size": 29, "allowSync": false, "art": "/:/resources/movie-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "viewGroup": "secondary", "viewMode": 65592, "Directory": [], "Type": [], "FieldType": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} deleteLibrary: speakeasy-default-delete-library: parameters: @@ -1647,6 +2004,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-library-items: "": parameters: @@ -1664,6 +2023,8 @@ examples: application/json: {"MediaContainer": {"size": 70, "allowSync": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-refresh-library-metadata: speakeasy-default-get-refresh-library-metadata: parameters: @@ -1674,6 +2035,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-search-library: speakeasy-default-get-search-library: parameters: @@ -1686,6 +2049,8 @@ examples: application/json: {"MediaContainer": {"size": 2, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Shows", "title2": "Search for ''", "viewGroup": "season", "viewMode": 65593, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-meta-data-by-rating-key: speakeasy-default-get-meta-data-by-rating-key: parameters: @@ -1696,6 +2061,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "cfc899d7-3000-46f6-8489-b9592714ada5", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getMetadataChildren: include-stream: parameters: @@ -1708,6 +2075,8 @@ examples: application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "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": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} include-stream-otheritem: parameters: path: @@ -1719,6 +2088,8 @@ examples: application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "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": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} include-stream-otheritem-anotheritem: parameters: path: @@ -1730,6 +2101,8 @@ examples: application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "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": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getTopWatchedContent: "": parameters: @@ -1741,6 +2114,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "allowSync": true, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getOnDeck: speakeasy-default-get-on-deck: responses: @@ -1748,6 +2123,8 @@ examples: application/json: {"MediaContainer": {"size": 16, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} get-watch-list: speakeasy-default-get-watch-list: parameters: @@ -1761,6 +2138,8 @@ examples: "401": application/json: {"errors": []} "200": {} + "400": + application/json: {"errors": []} logLine: speakeasy-default-log-line: parameters: @@ -1771,6 +2150,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} logMultiLine: speakeasy-default-log-multi-line: requestBody: @@ -1778,11 +2159,15 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} enablePaperTrail: speakeasy-default-enable-paper-trail: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} createPlaylist: speakeasy-default-create-playlist: parameters: @@ -1796,6 +2181,8 @@ examples: application/json: {"MediaContainer": {"size": 7, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getPlaylists: speakeasy-default-get-playlists: responses: @@ -1803,6 +2190,8 @@ examples: application/json: {"MediaContainer": {"size": 4, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getPlaylist: speakeasy-default-get-playlist: parameters: @@ -1813,6 +2202,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} deletePlaylist: speakeasy-default-delete-playlist: parameters: @@ -1821,6 +2212,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} updatePlaylist: speakeasy-default-update-playlist: parameters: @@ -1830,6 +2223,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getPlaylistContents: speakeasy-default-get-playlist-contents: parameters: @@ -1842,6 +2237,8 @@ examples: application/json: {"MediaContainer": {"size": 2, "composite": "/playlists/95/composite/1705717521", "duration": 282, "leafCount": 2, "playlistType": "video", "ratingKey": "95", "smart": true, "title": "Smart Movie Playlist", "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} clearPlaylistContents: speakeasy-default-clear-playlist-contents: parameters: @@ -1850,6 +2247,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} addPlaylistContents: speakeasy-default-add-playlist-contents: parameters: @@ -1863,6 +2262,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "leafCountAdded": 1, "leafCountRequested": 1, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} uploadPlaylist: speakeasy-default-upload-playlist: parameters: @@ -1872,6 +2273,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getTransientToken: speakeasy-default-get-transient-token: parameters: @@ -1881,6 +2284,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getSourceConnectionInformation: speakeasy-default-get-source-connection-information: parameters: @@ -1889,6 +2294,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getUserDetails: speakeasy-default-get-user-details: parameters: @@ -1902,12 +2309,14 @@ examples: post-users-sign-in-data: speakeasy-default-post-users-sign-in-data: requestBody: - application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123"} + application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "verificationCode": "123456"} responses: "201": application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "pastSubscriptions": [{"id": "string", "mode": "string", "renewsAt": "string", "endsAt": "1556281940", "canceled": "0", "gracePeriod": "0", "onHold": "0", "canReactivate": "0", "canUpgrade": "0", "canDowngrade": "0", "canConvert": "0", "type": "plexpass", "transfer": "string", "state": "ended", "billing": {"paymentMethodId": 569045}}], "trials": [{}]} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getStatistics: "": parameters: @@ -1918,6 +2327,8 @@ examples: application/json: {"MediaContainer": {"size": 5497, "Device": [], "Account": [], "StatisticsMedia": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getResourcesStatistics: "": parameters: @@ -1928,6 +2339,8 @@ examples: application/json: {"MediaContainer": {"size": 5497, "StatisticsResources": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getBandwidthStatistics: "": parameters: @@ -1938,6 +2351,8 @@ examples: application/json: {"MediaContainer": {"size": 5497, "Device": [], "Account": [], "StatisticsBandwidth": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getSessions: speakeasy-default-get-sessions: responses: @@ -1945,6 +2360,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getSessionHistory: viewed-at-descending: parameters: @@ -1957,6 +2374,8 @@ examples: application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} viewed-at-ascending: parameters: query: @@ -1968,6 +2387,8 @@ examples: application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} rating-descending: parameters: query: @@ -1979,6 +2400,8 @@ examples: application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} rating-ascending: parameters: query: @@ -1990,6 +2413,8 @@ examples: application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} "": parameters: query: @@ -2000,6 +2425,8 @@ examples: application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} ViewedAt: parameters: query: @@ -2011,6 +2438,8 @@ examples: application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getTranscodeSessions: speakeasy-default-get-transcode-sessions: responses: @@ -2018,6 +2447,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "TranscodeSession": [{"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}]}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} stopTranscodeSession: speakeasy-default-stop-transcode-session: parameters: @@ -2026,6 +2457,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} getUpdateStatus: speakeasy-default-get-update-status: responses: @@ -2033,6 +2466,8 @@ examples: application/json: {"MediaContainer": {"size": 1, "canInstall": false, "checkedAt": 1705801232, "downloadURL": "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", "status": 0, "Release": [{"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&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", "state": "notify"}]}} "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} checkForUpdates: "": parameters: @@ -2041,6 +2476,8 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} applyUpdates: "": parameters: @@ -2050,3 +2487,14 @@ examples: responses: "401": application/json: {"errors": []} + "400": + application/json: {"errors": []} + getTokenDetails: + speakeasy-default-get-token-details: + responses: + "200": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0a8f3649..d9164a0a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true java: - version: 0.2.2 + version: 0.3.0 additionalDependencies: [] additionalPlugins: [] artifactID: plexapi diff --git a/README.md b/README.md index 461adee1..7a0034fb 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'dev.plexapi:plexapi:0.2.2' +implementation 'dev.plexapi:plexapi:0.3.0' ``` Maven: @@ -45,7 +45,7 @@ Maven: dev.plexapi plexapi - 0.2.2 + 0.3.0 ``` @@ -92,7 +92,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -111,36 +114,21 @@ public class Application { ## Available Resources and Operations -### [server()](docs/sdks/server/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 - -### [media()](docs/sdks/media/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 - -### [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 +
+Available methods ### [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 + ### [butler()](docs/sdks/butler/README.md) * [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks @@ -149,27 +137,11 @@ public class Application { * [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task * [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task -### [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 - ### [hubs()](docs/sdks/hubs/README.md) * [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs * [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs -### [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 - ### [library()](docs/sdks/library/README.md) * [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value @@ -185,16 +157,20 @@ public class Application { * [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content * [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck -### [watchlist()](docs/sdks/watchlist/README.md) - -* [getWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist - ### [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 +### [media()](docs/sdks/media/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 + ### [playlists()](docs/sdks/playlists/README.md) * [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist @@ -207,18 +183,34 @@ public class Application { * [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist * [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist -### [authentication()](docs/sdks/authentication/README.md) +### [plex()](docs/sdks/plex/README.md) -* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token. -* [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information -* [getUserDetails](docs/sdks/authentication/README.md#getuserdetails) - Get User Data By Token -* [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User SignIn Data +* [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 -### [statistics()](docs/sdks/statistics/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 +### [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 + +### [server()](docs/sdks/server/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 ### [sessions()](docs/sdks/sessions/README.md) @@ -227,11 +219,28 @@ public class Application { * [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions * [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session +### [statistics()](docs/sdks/statistics/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 + ### [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 + +### [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 + +
@@ -261,7 +270,6 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; 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.IncludeHttps; import dev.plexapi.sdk.models.operations.IncludeIPv6; @@ -277,21 +285,20 @@ public class Application { .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") .build(); - GetServerResourcesRequest req = GetServerResourcesRequest.builder() - .xPlexToken("CV5xoxjTpFKUzBTShsaf") + GetServerResourcesResponse res = sdk.plex().getServerResources() + .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") .includeHttps(IncludeHttps.ONE) .includeRelay(IncludeRelay.ONE) .includeIPv6(IncludeIPv6.ONE) - .build(); - - GetServerResourcesResponse res = sdk.plex().getServerResources() - .request(req) .call(); if (res.plexDevices().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerResourcesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -314,7 +321,8 @@ Handling errors in this SDK should largely match your expectations. All operati | Error Object | Status Code | Content Type | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| models/errors/GetServerCapabilitiesResponseBody | 401 | application/json | +| models/errors/GetServerCapabilitiesBadRequest | 400 | application/json | +| models/errors/GetServerCapabilitiesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | ### Example @@ -342,7 +350,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -395,7 +406,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -444,7 +458,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -480,13 +497,16 @@ public class Application { .build(); GetCompanionsDataResponse res = sdk.plex().getCompanionsData() - .serverURL("https://plex.tv/api/v2") + .serverURL("https://plex.tv/api/v2/") .call(); if (res.responseBodies().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetCompanionsDataResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -537,7 +557,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 00000000..7ef45a7c --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,11 @@ + + +## 2024-09-13 00:24:14 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.396.6 (2.415.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.3.0] . +### Releases +- [Maven Central v0.3.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 0e0d05cb..b2550550 100644 --- a/USAGE.md +++ b/USAGE.md @@ -22,7 +22,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { diff --git a/build.gradle b/build.gradle index 89c63bd4..9cc5f0b3 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ tasks.withType(Javadoc) { } group = "dev.plexapi" -version = "0.2.2" +version = "0.3.0" sourcesJar { archiveBaseName = "plexapi" @@ -88,7 +88,7 @@ publishing { maven(MavenPublication) { groupId = 'dev.plexapi' artifactId = 'plexapi' - version = '0.2.2' + version = '0.3.0' from components.java diff --git a/docs/models/errors/AddPlaylistContentsResponseBody.md b/docs/models/errors/AddPlaylistContentsBadRequest.md similarity index 94% rename from docs/models/errors/AddPlaylistContentsResponseBody.md rename to docs/models/errors/AddPlaylistContentsBadRequest.md index 11ecd74d..fa2de509 100644 --- a/docs/models/errors/AddPlaylistContentsResponseBody.md +++ b/docs/models/errors/AddPlaylistContentsBadRequest.md @@ -1,6 +1,6 @@ -# AddPlaylistContentsResponseBody +# AddPlaylistContentsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/AddPlaylistContentsErrors.md b/docs/models/errors/AddPlaylistContentsErrors.md index 995f847c..a10fe798 100644 --- a/docs/models/errors/AddPlaylistContentsErrors.md +++ b/docs/models/errors/AddPlaylistContentsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/AddPlaylistContentsPlaylistsErrors.md b/docs/models/errors/AddPlaylistContentsPlaylistsErrors.md new file mode 100644 index 00000000..f7053284 --- /dev/null +++ b/docs/models/errors/AddPlaylistContentsPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..4da494a9 --- /dev/null +++ b/docs/models/errors/AddPlaylistContentsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/ApplyUpdatesResponseBody.md b/docs/models/errors/ApplyUpdatesBadRequest.md similarity index 95% rename from docs/models/errors/ApplyUpdatesResponseBody.md rename to docs/models/errors/ApplyUpdatesBadRequest.md index 27e62615..e1b1aa94 100644 --- a/docs/models/errors/ApplyUpdatesResponseBody.md +++ b/docs/models/errors/ApplyUpdatesBadRequest.md @@ -1,6 +1,6 @@ -# ApplyUpdatesResponseBody +# ApplyUpdatesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/ApplyUpdatesErrors.md b/docs/models/errors/ApplyUpdatesErrors.md index 8b5e8727..89c97d11 100644 --- a/docs/models/errors/ApplyUpdatesErrors.md +++ b/docs/models/errors/ApplyUpdatesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/ApplyUpdatesUnauthorized.md b/docs/models/errors/ApplyUpdatesUnauthorized.md new file mode 100644 index 00000000..a01b957a --- /dev/null +++ b/docs/models/errors/ApplyUpdatesUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..325a64d9 --- /dev/null +++ b/docs/models/errors/ApplyUpdatesUpdaterErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..921bc64f --- /dev/null +++ b/docs/models/errors/CancelServerActivitiesActivitiesErrors.md @@ -0,0 +1,10 @@ +# 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/CancelServerActivitiesResponseBody.md b/docs/models/errors/CancelServerActivitiesBadRequest.md similarity index 94% rename from docs/models/errors/CancelServerActivitiesResponseBody.md rename to docs/models/errors/CancelServerActivitiesBadRequest.md index 4496755c..5c19e972 100644 --- a/docs/models/errors/CancelServerActivitiesResponseBody.md +++ b/docs/models/errors/CancelServerActivitiesBadRequest.md @@ -1,6 +1,6 @@ -# CancelServerActivitiesResponseBody +# CancelServerActivitiesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/CancelServerActivitiesErrors.md b/docs/models/errors/CancelServerActivitiesErrors.md index c648e76a..494bd1ff 100644 --- a/docs/models/errors/CancelServerActivitiesErrors.md +++ b/docs/models/errors/CancelServerActivitiesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/CancelServerActivitiesUnauthorized.md b/docs/models/errors/CancelServerActivitiesUnauthorized.md new file mode 100644 index 00000000..1abd2984 --- /dev/null +++ b/docs/models/errors/CancelServerActivitiesUnauthorized.md @@ -0,0 +1,11 @@ +# 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/CheckForUpdatesResponseBody.md b/docs/models/errors/CheckForUpdatesBadRequest.md similarity index 94% rename from docs/models/errors/CheckForUpdatesResponseBody.md rename to docs/models/errors/CheckForUpdatesBadRequest.md index cafa930d..2e400dcf 100644 --- a/docs/models/errors/CheckForUpdatesResponseBody.md +++ b/docs/models/errors/CheckForUpdatesBadRequest.md @@ -1,6 +1,6 @@ -# CheckForUpdatesResponseBody +# CheckForUpdatesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/CheckForUpdatesErrors.md b/docs/models/errors/CheckForUpdatesErrors.md index 53430cc0..3322488b 100644 --- a/docs/models/errors/CheckForUpdatesErrors.md +++ b/docs/models/errors/CheckForUpdatesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/CheckForUpdatesUnauthorized.md b/docs/models/errors/CheckForUpdatesUnauthorized.md new file mode 100644 index 00000000..9e082b8c --- /dev/null +++ b/docs/models/errors/CheckForUpdatesUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..cb37a753 --- /dev/null +++ b/docs/models/errors/CheckForUpdatesUpdaterErrors.md @@ -0,0 +1,10 @@ +# 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/ClearPlaylistContentsResponseBody.md b/docs/models/errors/ClearPlaylistContentsBadRequest.md similarity index 94% rename from docs/models/errors/ClearPlaylistContentsResponseBody.md rename to docs/models/errors/ClearPlaylistContentsBadRequest.md index 62a76e88..281033a9 100644 --- a/docs/models/errors/ClearPlaylistContentsResponseBody.md +++ b/docs/models/errors/ClearPlaylistContentsBadRequest.md @@ -1,6 +1,6 @@ -# ClearPlaylistContentsResponseBody +# ClearPlaylistContentsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/ClearPlaylistContentsErrors.md b/docs/models/errors/ClearPlaylistContentsErrors.md index 8b0ca87c..1c7da68b 100644 --- a/docs/models/errors/ClearPlaylistContentsErrors.md +++ b/docs/models/errors/ClearPlaylistContentsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/ClearPlaylistContentsPlaylistsErrors.md b/docs/models/errors/ClearPlaylistContentsPlaylistsErrors.md new file mode 100644 index 00000000..a989b697 --- /dev/null +++ b/docs/models/errors/ClearPlaylistContentsPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..603cdab3 --- /dev/null +++ b/docs/models/errors/ClearPlaylistContentsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/CreatePlaylistResponseBody.md b/docs/models/errors/CreatePlaylistBadRequest.md similarity index 94% rename from docs/models/errors/CreatePlaylistResponseBody.md rename to docs/models/errors/CreatePlaylistBadRequest.md index b3983e2e..209d4f09 100644 --- a/docs/models/errors/CreatePlaylistResponseBody.md +++ b/docs/models/errors/CreatePlaylistBadRequest.md @@ -1,6 +1,6 @@ -# CreatePlaylistResponseBody +# CreatePlaylistBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/CreatePlaylistErrors.md b/docs/models/errors/CreatePlaylistErrors.md index bc85ce3b..7713b860 100644 --- a/docs/models/errors/CreatePlaylistErrors.md +++ b/docs/models/errors/CreatePlaylistErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/CreatePlaylistPlaylistsErrors.md b/docs/models/errors/CreatePlaylistPlaylistsErrors.md new file mode 100644 index 00000000..07691e2f --- /dev/null +++ b/docs/models/errors/CreatePlaylistPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..785cf935 --- /dev/null +++ b/docs/models/errors/CreatePlaylistUnauthorized.md @@ -0,0 +1,11 @@ +# 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/DeleteLibraryResponseBody.md b/docs/models/errors/DeleteLibraryBadRequest.md similarity index 94% rename from docs/models/errors/DeleteLibraryResponseBody.md rename to docs/models/errors/DeleteLibraryBadRequest.md index 1697910d..a9922e73 100644 --- a/docs/models/errors/DeleteLibraryResponseBody.md +++ b/docs/models/errors/DeleteLibraryBadRequest.md @@ -1,6 +1,6 @@ -# DeleteLibraryResponseBody +# DeleteLibraryBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/DeleteLibraryErrors.md b/docs/models/errors/DeleteLibraryErrors.md index 91501545..bed90a25 100644 --- a/docs/models/errors/DeleteLibraryErrors.md +++ b/docs/models/errors/DeleteLibraryErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/DeleteLibraryLibraryErrors.md b/docs/models/errors/DeleteLibraryLibraryErrors.md new file mode 100644 index 00000000..fae2416d --- /dev/null +++ b/docs/models/errors/DeleteLibraryLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..59fce530 --- /dev/null +++ b/docs/models/errors/DeleteLibraryUnauthorized.md @@ -0,0 +1,11 @@ +# 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/DeletePlaylistResponseBody.md b/docs/models/errors/DeletePlaylistBadRequest.md similarity index 94% rename from docs/models/errors/DeletePlaylistResponseBody.md rename to docs/models/errors/DeletePlaylistBadRequest.md index f917db93..575935f6 100644 --- a/docs/models/errors/DeletePlaylistResponseBody.md +++ b/docs/models/errors/DeletePlaylistBadRequest.md @@ -1,6 +1,6 @@ -# DeletePlaylistResponseBody +# DeletePlaylistBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/DeletePlaylistErrors.md b/docs/models/errors/DeletePlaylistErrors.md index 6c3f61b0..10e6d8df 100644 --- a/docs/models/errors/DeletePlaylistErrors.md +++ b/docs/models/errors/DeletePlaylistErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/DeletePlaylistPlaylistsErrors.md b/docs/models/errors/DeletePlaylistPlaylistsErrors.md new file mode 100644 index 00000000..595fcaa0 --- /dev/null +++ b/docs/models/errors/DeletePlaylistPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..d0809855 --- /dev/null +++ b/docs/models/errors/DeletePlaylistUnauthorized.md @@ -0,0 +1,11 @@ +# 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/EnablePaperTrailResponseBody.md b/docs/models/errors/EnablePaperTrailBadRequest.md similarity index 94% rename from docs/models/errors/EnablePaperTrailResponseBody.md rename to docs/models/errors/EnablePaperTrailBadRequest.md index 22b35429..36b45ca3 100644 --- a/docs/models/errors/EnablePaperTrailResponseBody.md +++ b/docs/models/errors/EnablePaperTrailBadRequest.md @@ -1,6 +1,6 @@ -# EnablePaperTrailResponseBody +# EnablePaperTrailBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/EnablePaperTrailErrors.md b/docs/models/errors/EnablePaperTrailErrors.md index bc8ba028..1fc25915 100644 --- a/docs/models/errors/EnablePaperTrailErrors.md +++ b/docs/models/errors/EnablePaperTrailErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/EnablePaperTrailLogErrors.md b/docs/models/errors/EnablePaperTrailLogErrors.md new file mode 100644 index 00000000..34696307 --- /dev/null +++ b/docs/models/errors/EnablePaperTrailLogErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..f134d2b0 --- /dev/null +++ b/docs/models/errors/EnablePaperTrailUnauthorized.md @@ -0,0 +1,11 @@ +# 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 index 4a978811..b6635deb 100644 --- a/docs/models/errors/Errors.md +++ b/docs/models/errors/Errors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetAllLibrariesResponseBody.md b/docs/models/errors/GetAllLibrariesBadRequest.md similarity index 94% rename from docs/models/errors/GetAllLibrariesResponseBody.md rename to docs/models/errors/GetAllLibrariesBadRequest.md index 77aee489..fa378e00 100644 --- a/docs/models/errors/GetAllLibrariesResponseBody.md +++ b/docs/models/errors/GetAllLibrariesBadRequest.md @@ -1,6 +1,6 @@ -# GetAllLibrariesResponseBody +# GetAllLibrariesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetAllLibrariesErrors.md b/docs/models/errors/GetAllLibrariesErrors.md index ca894b97..8cbc6e3f 100644 --- a/docs/models/errors/GetAllLibrariesErrors.md +++ b/docs/models/errors/GetAllLibrariesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetAllLibrariesLibraryErrors.md b/docs/models/errors/GetAllLibrariesLibraryErrors.md new file mode 100644 index 00000000..b87804e2 --- /dev/null +++ b/docs/models/errors/GetAllLibrariesLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..15c64d6d --- /dev/null +++ b/docs/models/errors/GetAllLibrariesUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetAvailableClientsResponseBody.md b/docs/models/errors/GetAvailableClientsBadRequest.md similarity index 94% rename from docs/models/errors/GetAvailableClientsResponseBody.md rename to docs/models/errors/GetAvailableClientsBadRequest.md index d9f91753..1129ade5 100644 --- a/docs/models/errors/GetAvailableClientsResponseBody.md +++ b/docs/models/errors/GetAvailableClientsBadRequest.md @@ -1,6 +1,6 @@ -# GetAvailableClientsResponseBody +# GetAvailableClientsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetAvailableClientsErrors.md b/docs/models/errors/GetAvailableClientsErrors.md index 2a32a200..01f32a67 100644 --- a/docs/models/errors/GetAvailableClientsErrors.md +++ b/docs/models/errors/GetAvailableClientsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetAvailableClientsServerErrors.md b/docs/models/errors/GetAvailableClientsServerErrors.md new file mode 100644 index 00000000..e630b923 --- /dev/null +++ b/docs/models/errors/GetAvailableClientsServerErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..e2506fdf --- /dev/null +++ b/docs/models/errors/GetAvailableClientsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetBandwidthStatisticsResponseBody.md b/docs/models/errors/GetBandwidthStatisticsBadRequest.md similarity index 94% rename from docs/models/errors/GetBandwidthStatisticsResponseBody.md rename to docs/models/errors/GetBandwidthStatisticsBadRequest.md index 71ca71c2..3299977f 100644 --- a/docs/models/errors/GetBandwidthStatisticsResponseBody.md +++ b/docs/models/errors/GetBandwidthStatisticsBadRequest.md @@ -1,6 +1,6 @@ -# GetBandwidthStatisticsResponseBody +# GetBandwidthStatisticsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetBandwidthStatisticsErrors.md b/docs/models/errors/GetBandwidthStatisticsErrors.md index db07e2dd..757baa18 100644 --- a/docs/models/errors/GetBandwidthStatisticsErrors.md +++ b/docs/models/errors/GetBandwidthStatisticsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetBandwidthStatisticsStatisticsErrors.md b/docs/models/errors/GetBandwidthStatisticsStatisticsErrors.md new file mode 100644 index 00000000..8f9e4f91 --- /dev/null +++ b/docs/models/errors/GetBandwidthStatisticsStatisticsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..5b4b672d --- /dev/null +++ b/docs/models/errors/GetBandwidthStatisticsUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..7379fdc4 --- /dev/null +++ b/docs/models/errors/GetBannerImageBadRequest.md @@ -0,0 +1,11 @@ +# 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 index 2d71072d..49cd5f98 100644 --- a/docs/models/errors/GetBannerImageErrors.md +++ b/docs/models/errors/GetBannerImageErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetBannerImageMediaErrors.md b/docs/models/errors/GetBannerImageMediaErrors.md new file mode 100644 index 00000000..558dcc73 --- /dev/null +++ b/docs/models/errors/GetBannerImageMediaErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..a13f42a2 --- /dev/null +++ b/docs/models/errors/GetBannerImageUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..42682256 --- /dev/null +++ b/docs/models/errors/GetButlerTasksBadRequest.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..0be8c6ef --- /dev/null +++ b/docs/models/errors/GetButlerTasksButlerErrors.md @@ -0,0 +1,10 @@ +# 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 index 07a7b61e..c72e590b 100644 --- a/docs/models/errors/GetButlerTasksErrors.md +++ b/docs/models/errors/GetButlerTasksErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetButlerTasksUnauthorized.md b/docs/models/errors/GetButlerTasksUnauthorized.md new file mode 100644 index 00000000..6f0471c0 --- /dev/null +++ b/docs/models/errors/GetButlerTasksUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetCompanionsDataResponseBody.md b/docs/models/errors/GetCompanionsDataBadRequest.md similarity index 94% rename from docs/models/errors/GetCompanionsDataResponseBody.md rename to docs/models/errors/GetCompanionsDataBadRequest.md index 43bd88f6..24fb0692 100644 --- a/docs/models/errors/GetCompanionsDataResponseBody.md +++ b/docs/models/errors/GetCompanionsDataBadRequest.md @@ -1,6 +1,6 @@ -# GetCompanionsDataResponseBody +# GetCompanionsDataBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetCompanionsDataErrors.md b/docs/models/errors/GetCompanionsDataErrors.md index 734388ec..2ebba581 100644 --- a/docs/models/errors/GetCompanionsDataErrors.md +++ b/docs/models/errors/GetCompanionsDataErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetCompanionsDataPlexErrors.md b/docs/models/errors/GetCompanionsDataPlexErrors.md new file mode 100644 index 00000000..95089c2c --- /dev/null +++ b/docs/models/errors/GetCompanionsDataPlexErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..20ed9996 --- /dev/null +++ b/docs/models/errors/GetCompanionsDataUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetDevicesResponseBody.md b/docs/models/errors/GetDevicesBadRequest.md similarity index 95% rename from docs/models/errors/GetDevicesResponseBody.md rename to docs/models/errors/GetDevicesBadRequest.md index cead1030..2a67d9b5 100644 --- a/docs/models/errors/GetDevicesResponseBody.md +++ b/docs/models/errors/GetDevicesBadRequest.md @@ -1,6 +1,6 @@ -# GetDevicesResponseBody +# GetDevicesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetDevicesErrors.md b/docs/models/errors/GetDevicesErrors.md index c1c52c5b..5c708d35 100644 --- a/docs/models/errors/GetDevicesErrors.md +++ b/docs/models/errors/GetDevicesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetDevicesServerErrors.md b/docs/models/errors/GetDevicesServerErrors.md new file mode 100644 index 00000000..4afb916d --- /dev/null +++ b/docs/models/errors/GetDevicesServerErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..05ecea39 --- /dev/null +++ b/docs/models/errors/GetDevicesUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetFileHashResponseBody.md b/docs/models/errors/GetFileHashBadRequest.md similarity index 95% rename from docs/models/errors/GetFileHashResponseBody.md rename to docs/models/errors/GetFileHashBadRequest.md index d69e1260..21a9a07a 100644 --- a/docs/models/errors/GetFileHashResponseBody.md +++ b/docs/models/errors/GetFileHashBadRequest.md @@ -1,6 +1,6 @@ -# GetFileHashResponseBody +# GetFileHashBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetFileHashErrors.md b/docs/models/errors/GetFileHashErrors.md index 4f67942e..93b88011 100644 --- a/docs/models/errors/GetFileHashErrors.md +++ b/docs/models/errors/GetFileHashErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetFileHashLibraryErrors.md b/docs/models/errors/GetFileHashLibraryErrors.md new file mode 100644 index 00000000..6effed46 --- /dev/null +++ b/docs/models/errors/GetFileHashLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..84f6be5c --- /dev/null +++ b/docs/models/errors/GetFileHashUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetGeoDataBadRequest.md b/docs/models/errors/GetGeoDataBadRequest.md new file mode 100644 index 00000000..070913fb --- /dev/null +++ b/docs/models/errors/GetGeoDataBadRequest.md @@ -0,0 +1,11 @@ +# 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 index 600f2ce2..9257c558 100644 --- a/docs/models/errors/GetGeoDataErrors.md +++ b/docs/models/errors/GetGeoDataErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetUserDetailsErrors.md b/docs/models/errors/GetGeoDataPlexErrors.md similarity index 83% rename from docs/models/errors/GetUserDetailsErrors.md rename to docs/models/errors/GetGeoDataPlexErrors.md index 771530f7..7ef2315b 100644 --- a/docs/models/errors/GetUserDetailsErrors.md +++ b/docs/models/errors/GetGeoDataPlexErrors.md @@ -1,10 +1,10 @@ -# GetUserDetailsErrors +# GetGeoDataPlexErrors ## Fields | Field | Type | Required | Description | Example | | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | +| `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 +| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/GetBannerImageResponseBody.md b/docs/models/errors/GetGeoDataUnauthorized.md similarity index 95% rename from docs/models/errors/GetBannerImageResponseBody.md rename to docs/models/errors/GetGeoDataUnauthorized.md index 0432389c..bff723dc 100644 --- a/docs/models/errors/GetBannerImageResponseBody.md +++ b/docs/models/errors/GetGeoDataUnauthorized.md @@ -1,4 +1,4 @@ -# GetBannerImageResponseBody +# GetGeoDataUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetBannerImageErrors](../../models/errors/GetBannerImageErrors.md)> | :heavy_minus_sign: | N/A | +| `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/GetGlobalHubsResponseBody.md b/docs/models/errors/GetGlobalHubsBadRequest.md similarity index 94% rename from docs/models/errors/GetGlobalHubsResponseBody.md rename to docs/models/errors/GetGlobalHubsBadRequest.md index 621d6210..67ad26a1 100644 --- a/docs/models/errors/GetGlobalHubsResponseBody.md +++ b/docs/models/errors/GetGlobalHubsBadRequest.md @@ -1,6 +1,6 @@ -# GetGlobalHubsResponseBody +# GetGlobalHubsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetGlobalHubsErrors.md b/docs/models/errors/GetGlobalHubsErrors.md index f15ae1d3..549dec49 100644 --- a/docs/models/errors/GetGlobalHubsErrors.md +++ b/docs/models/errors/GetGlobalHubsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetGlobalHubsHubsErrors.md b/docs/models/errors/GetGlobalHubsHubsErrors.md new file mode 100644 index 00000000..34bada86 --- /dev/null +++ b/docs/models/errors/GetGlobalHubsHubsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..a97ebe9c --- /dev/null +++ b/docs/models/errors/GetGlobalHubsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetHomeDataResponseBody.md b/docs/models/errors/GetHomeDataBadRequest.md similarity index 95% rename from docs/models/errors/GetHomeDataResponseBody.md rename to docs/models/errors/GetHomeDataBadRequest.md index 920d522b..df23a880 100644 --- a/docs/models/errors/GetHomeDataResponseBody.md +++ b/docs/models/errors/GetHomeDataBadRequest.md @@ -1,6 +1,6 @@ -# GetHomeDataResponseBody +# GetHomeDataBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetHomeDataErrors.md b/docs/models/errors/GetHomeDataErrors.md index 1833fd5d..6ccc6175 100644 --- a/docs/models/errors/GetHomeDataErrors.md +++ b/docs/models/errors/GetHomeDataErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetHomeDataPlexErrors.md b/docs/models/errors/GetHomeDataPlexErrors.md new file mode 100644 index 00000000..ca1c8b8b --- /dev/null +++ b/docs/models/errors/GetHomeDataPlexErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..1e55742b --- /dev/null +++ b/docs/models/errors/GetHomeDataUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetLibraryDetailsResponseBody.md b/docs/models/errors/GetLibraryDetailsBadRequest.md similarity index 94% rename from docs/models/errors/GetLibraryDetailsResponseBody.md rename to docs/models/errors/GetLibraryDetailsBadRequest.md index 3e352be7..e71be749 100644 --- a/docs/models/errors/GetLibraryDetailsResponseBody.md +++ b/docs/models/errors/GetLibraryDetailsBadRequest.md @@ -1,6 +1,6 @@ -# GetLibraryDetailsResponseBody +# GetLibraryDetailsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetLibraryDetailsErrors.md b/docs/models/errors/GetLibraryDetailsErrors.md index 5d98cbed..d047edc4 100644 --- a/docs/models/errors/GetLibraryDetailsErrors.md +++ b/docs/models/errors/GetLibraryDetailsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetLibraryDetailsLibraryErrors.md b/docs/models/errors/GetLibraryDetailsLibraryErrors.md new file mode 100644 index 00000000..1aebb85b --- /dev/null +++ b/docs/models/errors/GetLibraryDetailsLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..fde63eb5 --- /dev/null +++ b/docs/models/errors/GetLibraryDetailsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetLibraryHubsResponseBody.md b/docs/models/errors/GetLibraryHubsBadRequest.md similarity index 94% rename from docs/models/errors/GetLibraryHubsResponseBody.md rename to docs/models/errors/GetLibraryHubsBadRequest.md index 9dd1ea96..e14a2302 100644 --- a/docs/models/errors/GetLibraryHubsResponseBody.md +++ b/docs/models/errors/GetLibraryHubsBadRequest.md @@ -1,6 +1,6 @@ -# GetLibraryHubsResponseBody +# GetLibraryHubsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetLibraryHubsErrors.md b/docs/models/errors/GetLibraryHubsErrors.md index 4fa84ea1..48d6d3da 100644 --- a/docs/models/errors/GetLibraryHubsErrors.md +++ b/docs/models/errors/GetLibraryHubsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetLibraryHubsHubsErrors.md b/docs/models/errors/GetLibraryHubsHubsErrors.md new file mode 100644 index 00000000..a003a9a1 --- /dev/null +++ b/docs/models/errors/GetLibraryHubsHubsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..7eda9ba1 --- /dev/null +++ b/docs/models/errors/GetLibraryHubsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetLibraryItemsResponseBody.md b/docs/models/errors/GetLibraryItemsBadRequest.md similarity index 94% rename from docs/models/errors/GetLibraryItemsResponseBody.md rename to docs/models/errors/GetLibraryItemsBadRequest.md index 5d86f79b..bf2a17a1 100644 --- a/docs/models/errors/GetLibraryItemsResponseBody.md +++ b/docs/models/errors/GetLibraryItemsBadRequest.md @@ -1,6 +1,6 @@ -# GetLibraryItemsResponseBody +# GetLibraryItemsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetLibraryItemsErrors.md b/docs/models/errors/GetLibraryItemsErrors.md index 04e49d5a..3b670382 100644 --- a/docs/models/errors/GetLibraryItemsErrors.md +++ b/docs/models/errors/GetLibraryItemsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetLibraryItemsLibraryErrors.md b/docs/models/errors/GetLibraryItemsLibraryErrors.md new file mode 100644 index 00000000..ad9d92fd --- /dev/null +++ b/docs/models/errors/GetLibraryItemsLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..f87e4241 --- /dev/null +++ b/docs/models/errors/GetLibraryItemsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetMediaProvidersResponseBody.md b/docs/models/errors/GetMediaProvidersBadRequest.md similarity index 94% rename from docs/models/errors/GetMediaProvidersResponseBody.md rename to docs/models/errors/GetMediaProvidersBadRequest.md index ae95baa2..8396fdf2 100644 --- a/docs/models/errors/GetMediaProvidersResponseBody.md +++ b/docs/models/errors/GetMediaProvidersBadRequest.md @@ -1,6 +1,6 @@ -# GetMediaProvidersResponseBody +# GetMediaProvidersBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetMediaProvidersErrors.md b/docs/models/errors/GetMediaProvidersErrors.md index a1faf8af..503abd65 100644 --- a/docs/models/errors/GetMediaProvidersErrors.md +++ b/docs/models/errors/GetMediaProvidersErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetMediaProvidersServerErrors.md b/docs/models/errors/GetMediaProvidersServerErrors.md new file mode 100644 index 00000000..713fb984 --- /dev/null +++ b/docs/models/errors/GetMediaProvidersServerErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..15c5a7e5 --- /dev/null +++ b/docs/models/errors/GetMediaProvidersUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetMetaDataByRatingKeyResponseBody.md b/docs/models/errors/GetMetaDataByRatingKeyBadRequest.md similarity index 94% rename from docs/models/errors/GetMetaDataByRatingKeyResponseBody.md rename to docs/models/errors/GetMetaDataByRatingKeyBadRequest.md index 0a9490ab..4aeb2086 100644 --- a/docs/models/errors/GetMetaDataByRatingKeyResponseBody.md +++ b/docs/models/errors/GetMetaDataByRatingKeyBadRequest.md @@ -1,6 +1,6 @@ -# GetMetaDataByRatingKeyResponseBody +# GetMetaDataByRatingKeyBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetMetaDataByRatingKeyErrors.md b/docs/models/errors/GetMetaDataByRatingKeyErrors.md index 67f2f928..88a99ea3 100644 --- a/docs/models/errors/GetMetaDataByRatingKeyErrors.md +++ b/docs/models/errors/GetMetaDataByRatingKeyErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetMetaDataByRatingKeyLibraryErrors.md b/docs/models/errors/GetMetaDataByRatingKeyLibraryErrors.md new file mode 100644 index 00000000..d3a24294 --- /dev/null +++ b/docs/models/errors/GetMetaDataByRatingKeyLibraryErrors.md @@ -0,0 +1,10 @@ +# GetMetaDataByRatingKeyLibraryErrors + + +## 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/GetMetaDataByRatingKeyUnauthorized.md b/docs/models/errors/GetMetaDataByRatingKeyUnauthorized.md new file mode 100644 index 00000000..ea33a248 --- /dev/null +++ b/docs/models/errors/GetMetaDataByRatingKeyUnauthorized.md @@ -0,0 +1,11 @@ +# GetMetaDataByRatingKeyUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[GetMetaDataByRatingKeyLibraryErrors](../../models/errors/GetMetaDataByRatingKeyLibraryErrors.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/GetMetadataChildrenResponseBody.md b/docs/models/errors/GetMetadataChildrenBadRequest.md similarity index 94% rename from docs/models/errors/GetMetadataChildrenResponseBody.md rename to docs/models/errors/GetMetadataChildrenBadRequest.md index 307b4974..ba40bbe3 100644 --- a/docs/models/errors/GetMetadataChildrenResponseBody.md +++ b/docs/models/errors/GetMetadataChildrenBadRequest.md @@ -1,6 +1,6 @@ -# GetMetadataChildrenResponseBody +# GetMetadataChildrenBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetMetadataChildrenErrors.md b/docs/models/errors/GetMetadataChildrenErrors.md index 8453d3a4..99fd9cef 100644 --- a/docs/models/errors/GetMetadataChildrenErrors.md +++ b/docs/models/errors/GetMetadataChildrenErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetMetadataChildrenLibraryErrors.md b/docs/models/errors/GetMetadataChildrenLibraryErrors.md new file mode 100644 index 00000000..4ab14170 --- /dev/null +++ b/docs/models/errors/GetMetadataChildrenLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..e948dea9 --- /dev/null +++ b/docs/models/errors/GetMetadataChildrenUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetMyPlexAccountResponseBody.md b/docs/models/errors/GetMyPlexAccountBadRequest.md similarity index 94% rename from docs/models/errors/GetMyPlexAccountResponseBody.md rename to docs/models/errors/GetMyPlexAccountBadRequest.md index a47e9d5d..ab4a8b7e 100644 --- a/docs/models/errors/GetMyPlexAccountResponseBody.md +++ b/docs/models/errors/GetMyPlexAccountBadRequest.md @@ -1,6 +1,6 @@ -# GetMyPlexAccountResponseBody +# GetMyPlexAccountBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetMyPlexAccountErrors.md b/docs/models/errors/GetMyPlexAccountErrors.md index 3a5c4394..2c0c40bf 100644 --- a/docs/models/errors/GetMyPlexAccountErrors.md +++ b/docs/models/errors/GetMyPlexAccountErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetMyPlexAccountServerErrors.md b/docs/models/errors/GetMyPlexAccountServerErrors.md new file mode 100644 index 00000000..84fe591a --- /dev/null +++ b/docs/models/errors/GetMyPlexAccountServerErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..20aaa0c8 --- /dev/null +++ b/docs/models/errors/GetMyPlexAccountUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetOnDeckResponseBody.md b/docs/models/errors/GetOnDeckBadRequest.md similarity index 95% rename from docs/models/errors/GetOnDeckResponseBody.md rename to docs/models/errors/GetOnDeckBadRequest.md index 970682d6..15f17613 100644 --- a/docs/models/errors/GetOnDeckResponseBody.md +++ b/docs/models/errors/GetOnDeckBadRequest.md @@ -1,6 +1,6 @@ -# GetOnDeckResponseBody +# GetOnDeckBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetOnDeckErrors.md b/docs/models/errors/GetOnDeckErrors.md index e1dfa653..14b40a43 100644 --- a/docs/models/errors/GetOnDeckErrors.md +++ b/docs/models/errors/GetOnDeckErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetOnDeckLibraryErrors.md b/docs/models/errors/GetOnDeckLibraryErrors.md new file mode 100644 index 00000000..e883912f --- /dev/null +++ b/docs/models/errors/GetOnDeckLibraryErrors.md @@ -0,0 +1,10 @@ +# GetOnDeckLibraryErrors + + +## 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/GetSearchLibraryResponseBody.md b/docs/models/errors/GetOnDeckUnauthorized.md similarity index 95% rename from docs/models/errors/GetSearchLibraryResponseBody.md rename to docs/models/errors/GetOnDeckUnauthorized.md index d96a8a40..628a1d2c 100644 --- a/docs/models/errors/GetSearchLibraryResponseBody.md +++ b/docs/models/errors/GetOnDeckUnauthorized.md @@ -1,4 +1,4 @@ -# GetSearchLibraryResponseBody +# GetOnDeckUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetSearchLibraryErrors](../../models/errors/GetSearchLibraryErrors.md)> | :heavy_minus_sign: | N/A | +| `errors` | List<[GetOnDeckLibraryErrors](../../models/errors/GetOnDeckLibraryErrors.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/GetPinResponseBody.md b/docs/models/errors/GetPinBadRequest.md similarity index 95% rename from docs/models/errors/GetPinResponseBody.md rename to docs/models/errors/GetPinBadRequest.md index f8fcf044..e282a8f3 100644 --- a/docs/models/errors/GetPinResponseBody.md +++ b/docs/models/errors/GetPinBadRequest.md @@ -1,6 +1,6 @@ -# GetPinResponseBody +# GetPinBadRequest -Bad Request response when the X-Plex-Client-Identifier is missing +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetPlaylistResponseBody.md b/docs/models/errors/GetPlaylistBadRequest.md similarity index 95% rename from docs/models/errors/GetPlaylistResponseBody.md rename to docs/models/errors/GetPlaylistBadRequest.md index 71d10728..7f07cb9c 100644 --- a/docs/models/errors/GetPlaylistResponseBody.md +++ b/docs/models/errors/GetPlaylistBadRequest.md @@ -1,6 +1,6 @@ -# GetPlaylistResponseBody +# GetPlaylistBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetPlaylistContentsResponseBody.md b/docs/models/errors/GetPlaylistContentsBadRequest.md similarity index 94% rename from docs/models/errors/GetPlaylistContentsResponseBody.md rename to docs/models/errors/GetPlaylistContentsBadRequest.md index 623f25ad..b6230e67 100644 --- a/docs/models/errors/GetPlaylistContentsResponseBody.md +++ b/docs/models/errors/GetPlaylistContentsBadRequest.md @@ -1,6 +1,6 @@ -# GetPlaylistContentsResponseBody +# GetPlaylistContentsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetPlaylistContentsErrors.md b/docs/models/errors/GetPlaylistContentsErrors.md index 7ab102ad..6dac87ff 100644 --- a/docs/models/errors/GetPlaylistContentsErrors.md +++ b/docs/models/errors/GetPlaylistContentsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetPlaylistContentsPlaylistsErrors.md b/docs/models/errors/GetPlaylistContentsPlaylistsErrors.md new file mode 100644 index 00000000..0b555c4c --- /dev/null +++ b/docs/models/errors/GetPlaylistContentsPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..3c288ab0 --- /dev/null +++ b/docs/models/errors/GetPlaylistContentsUnauthorized.md @@ -0,0 +1,11 @@ +# 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 index f15b4a94..73bc8864 100644 --- a/docs/models/errors/GetPlaylistErrors.md +++ b/docs/models/errors/GetPlaylistErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetPlaylistPlaylistsErrors.md b/docs/models/errors/GetPlaylistPlaylistsErrors.md new file mode 100644 index 00000000..e44a6dd8 --- /dev/null +++ b/docs/models/errors/GetPlaylistPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..83f5da7f --- /dev/null +++ b/docs/models/errors/GetPlaylistUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetPlaylistsResponseBody.md b/docs/models/errors/GetPlaylistsBadRequest.md similarity index 95% rename from docs/models/errors/GetPlaylistsResponseBody.md rename to docs/models/errors/GetPlaylistsBadRequest.md index b6219bde..8081eb73 100644 --- a/docs/models/errors/GetPlaylistsResponseBody.md +++ b/docs/models/errors/GetPlaylistsBadRequest.md @@ -1,6 +1,6 @@ -# GetPlaylistsResponseBody +# GetPlaylistsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetPlaylistsErrors.md b/docs/models/errors/GetPlaylistsErrors.md index 50a9a8d6..42578686 100644 --- a/docs/models/errors/GetPlaylistsErrors.md +++ b/docs/models/errors/GetPlaylistsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetPlaylistsPlaylistsErrors.md b/docs/models/errors/GetPlaylistsPlaylistsErrors.md new file mode 100644 index 00000000..0085eeba --- /dev/null +++ b/docs/models/errors/GetPlaylistsPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..0fc1a6f1 --- /dev/null +++ b/docs/models/errors/GetPlaylistsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetRecentlyAddedResponseBody.md b/docs/models/errors/GetRecentlyAddedBadRequest.md similarity index 94% rename from docs/models/errors/GetRecentlyAddedResponseBody.md rename to docs/models/errors/GetRecentlyAddedBadRequest.md index a6b1b6e5..9ad85a1b 100644 --- a/docs/models/errors/GetRecentlyAddedResponseBody.md +++ b/docs/models/errors/GetRecentlyAddedBadRequest.md @@ -1,6 +1,6 @@ -# GetRecentlyAddedResponseBody +# GetRecentlyAddedBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetRecentlyAddedErrors.md b/docs/models/errors/GetRecentlyAddedErrors.md index 1ba26268..f36e061f 100644 --- a/docs/models/errors/GetRecentlyAddedErrors.md +++ b/docs/models/errors/GetRecentlyAddedErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetRecentlyAddedLibraryErrors.md b/docs/models/errors/GetRecentlyAddedLibraryErrors.md new file mode 100644 index 00000000..f8bdb7c5 --- /dev/null +++ b/docs/models/errors/GetRecentlyAddedLibraryErrors.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedLibraryErrors + + +## 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/GetRecentlyAddedUnauthorized.md b/docs/models/errors/GetRecentlyAddedUnauthorized.md new file mode 100644 index 00000000..edac8d9b --- /dev/null +++ b/docs/models/errors/GetRecentlyAddedUnauthorized.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## 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/GetRefreshLibraryMetadataResponseBody.md b/docs/models/errors/GetRefreshLibraryMetadataBadRequest.md similarity index 94% rename from docs/models/errors/GetRefreshLibraryMetadataResponseBody.md rename to docs/models/errors/GetRefreshLibraryMetadataBadRequest.md index 9313aa60..66991103 100644 --- a/docs/models/errors/GetRefreshLibraryMetadataResponseBody.md +++ b/docs/models/errors/GetRefreshLibraryMetadataBadRequest.md @@ -1,6 +1,6 @@ -# GetRefreshLibraryMetadataResponseBody +# GetRefreshLibraryMetadataBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetRefreshLibraryMetadataErrors.md b/docs/models/errors/GetRefreshLibraryMetadataErrors.md index 2c81bf58..a60f36de 100644 --- a/docs/models/errors/GetRefreshLibraryMetadataErrors.md +++ b/docs/models/errors/GetRefreshLibraryMetadataErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetRefreshLibraryMetadataLibraryErrors.md b/docs/models/errors/GetRefreshLibraryMetadataLibraryErrors.md new file mode 100644 index 00000000..b0ec0c97 --- /dev/null +++ b/docs/models/errors/GetRefreshLibraryMetadataLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..6385f734 --- /dev/null +++ b/docs/models/errors/GetRefreshLibraryMetadataUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetResizedPhotoResponseBody.md b/docs/models/errors/GetResizedPhotoBadRequest.md similarity index 94% rename from docs/models/errors/GetResizedPhotoResponseBody.md rename to docs/models/errors/GetResizedPhotoBadRequest.md index eed3e43a..97fdcbcd 100644 --- a/docs/models/errors/GetResizedPhotoResponseBody.md +++ b/docs/models/errors/GetResizedPhotoBadRequest.md @@ -1,6 +1,6 @@ -# GetResizedPhotoResponseBody +# GetResizedPhotoBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetResizedPhotoErrors.md b/docs/models/errors/GetResizedPhotoErrors.md index 0df68785..a89b8a69 100644 --- a/docs/models/errors/GetResizedPhotoErrors.md +++ b/docs/models/errors/GetResizedPhotoErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetResizedPhotoServerErrors.md b/docs/models/errors/GetResizedPhotoServerErrors.md new file mode 100644 index 00000000..015527c3 --- /dev/null +++ b/docs/models/errors/GetResizedPhotoServerErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..22c6a203 --- /dev/null +++ b/docs/models/errors/GetResizedPhotoUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetResourcesStatisticsResponseBody.md b/docs/models/errors/GetResourcesStatisticsBadRequest.md similarity index 94% rename from docs/models/errors/GetResourcesStatisticsResponseBody.md rename to docs/models/errors/GetResourcesStatisticsBadRequest.md index 4cd0ab56..eaeb4986 100644 --- a/docs/models/errors/GetResourcesStatisticsResponseBody.md +++ b/docs/models/errors/GetResourcesStatisticsBadRequest.md @@ -1,6 +1,6 @@ -# GetResourcesStatisticsResponseBody +# GetResourcesStatisticsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetResourcesStatisticsErrors.md b/docs/models/errors/GetResourcesStatisticsErrors.md index 12c5ad77..32b9ab33 100644 --- a/docs/models/errors/GetResourcesStatisticsErrors.md +++ b/docs/models/errors/GetResourcesStatisticsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetResourcesStatisticsStatisticsErrors.md b/docs/models/errors/GetResourcesStatisticsStatisticsErrors.md new file mode 100644 index 00000000..00d93eaa --- /dev/null +++ b/docs/models/errors/GetResourcesStatisticsStatisticsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..33351972 --- /dev/null +++ b/docs/models/errors/GetResourcesStatisticsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetSearchLibraryBadRequest.md b/docs/models/errors/GetSearchLibraryBadRequest.md new file mode 100644 index 00000000..4d46932f --- /dev/null +++ b/docs/models/errors/GetSearchLibraryBadRequest.md @@ -0,0 +1,11 @@ +# 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 index 83d65da6..cc4cd144 100644 --- a/docs/models/errors/GetSearchLibraryErrors.md +++ b/docs/models/errors/GetSearchLibraryErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetSearchLibraryLibraryErrors.md b/docs/models/errors/GetSearchLibraryLibraryErrors.md new file mode 100644 index 00000000..f9198211 --- /dev/null +++ b/docs/models/errors/GetSearchLibraryLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..532b77f6 --- /dev/null +++ b/docs/models/errors/GetSearchLibraryUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetSearchResultsResponseBody.md b/docs/models/errors/GetSearchResultsBadRequest.md similarity index 94% rename from docs/models/errors/GetSearchResultsResponseBody.md rename to docs/models/errors/GetSearchResultsBadRequest.md index 12856e46..00356e33 100644 --- a/docs/models/errors/GetSearchResultsResponseBody.md +++ b/docs/models/errors/GetSearchResultsBadRequest.md @@ -1,6 +1,6 @@ -# GetSearchResultsResponseBody +# GetSearchResultsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetSearchResultsErrors.md b/docs/models/errors/GetSearchResultsErrors.md index 429cc0a2..78cca9f5 100644 --- a/docs/models/errors/GetSearchResultsErrors.md +++ b/docs/models/errors/GetSearchResultsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetSearchResultsSearchErrors.md b/docs/models/errors/GetSearchResultsSearchErrors.md new file mode 100644 index 00000000..4e092d72 --- /dev/null +++ b/docs/models/errors/GetSearchResultsSearchErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..96026ad0 --- /dev/null +++ b/docs/models/errors/GetSearchResultsUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..b5e94318 --- /dev/null +++ b/docs/models/errors/GetServerActivitiesActivitiesErrors.md @@ -0,0 +1,10 @@ +# 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/GetServerActivitiesResponseBody.md b/docs/models/errors/GetServerActivitiesBadRequest.md similarity index 94% rename from docs/models/errors/GetServerActivitiesResponseBody.md rename to docs/models/errors/GetServerActivitiesBadRequest.md index b4eafbef..804f96e2 100644 --- a/docs/models/errors/GetServerActivitiesResponseBody.md +++ b/docs/models/errors/GetServerActivitiesBadRequest.md @@ -1,6 +1,6 @@ -# GetServerActivitiesResponseBody +# GetServerActivitiesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetServerActivitiesErrors.md b/docs/models/errors/GetServerActivitiesErrors.md index ab6a1b34..161d401c 100644 --- a/docs/models/errors/GetServerActivitiesErrors.md +++ b/docs/models/errors/GetServerActivitiesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetServerActivitiesUnauthorized.md b/docs/models/errors/GetServerActivitiesUnauthorized.md new file mode 100644 index 00000000..61460956 --- /dev/null +++ b/docs/models/errors/GetServerActivitiesUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetServerCapabilitiesResponseBody.md b/docs/models/errors/GetServerCapabilitiesBadRequest.md similarity index 94% rename from docs/models/errors/GetServerCapabilitiesResponseBody.md rename to docs/models/errors/GetServerCapabilitiesBadRequest.md index bb17e62d..b50dbad0 100644 --- a/docs/models/errors/GetServerCapabilitiesResponseBody.md +++ b/docs/models/errors/GetServerCapabilitiesBadRequest.md @@ -1,6 +1,6 @@ -# GetServerCapabilitiesResponseBody +# GetServerCapabilitiesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetServerCapabilitiesErrors.md b/docs/models/errors/GetServerCapabilitiesErrors.md new file mode 100644 index 00000000..282e1fb7 --- /dev/null +++ b/docs/models/errors/GetServerCapabilitiesErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..226dcef9 --- /dev/null +++ b/docs/models/errors/GetServerCapabilitiesUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetServerIdentityResponseBody.md b/docs/models/errors/GetServerIdentityRequestTimeout.md similarity index 98% rename from docs/models/errors/GetServerIdentityResponseBody.md rename to docs/models/errors/GetServerIdentityRequestTimeout.md index 9ff87b9a..327ea27b 100644 --- a/docs/models/errors/GetServerIdentityResponseBody.md +++ b/docs/models/errors/GetServerIdentityRequestTimeout.md @@ -1,4 +1,4 @@ -# GetServerIdentityResponseBody +# GetServerIdentityRequestTimeout Request Timeout diff --git a/docs/models/errors/GetServerListResponseBody.md b/docs/models/errors/GetServerListBadRequest.md similarity index 94% rename from docs/models/errors/GetServerListResponseBody.md rename to docs/models/errors/GetServerListBadRequest.md index 4dbb9659..c0a08ad0 100644 --- a/docs/models/errors/GetServerListResponseBody.md +++ b/docs/models/errors/GetServerListBadRequest.md @@ -1,6 +1,6 @@ -# GetServerListResponseBody +# GetServerListBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetServerListErrors.md b/docs/models/errors/GetServerListErrors.md index e1899c6a..266c3935 100644 --- a/docs/models/errors/GetServerListErrors.md +++ b/docs/models/errors/GetServerListErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetServerListServerErrors.md b/docs/models/errors/GetServerListServerErrors.md new file mode 100644 index 00000000..bbdb42c9 --- /dev/null +++ b/docs/models/errors/GetServerListServerErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..ed7ade82 --- /dev/null +++ b/docs/models/errors/GetServerListUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetServerPreferencesResponseBody.md b/docs/models/errors/GetServerPreferencesBadRequest.md similarity index 94% rename from docs/models/errors/GetServerPreferencesResponseBody.md rename to docs/models/errors/GetServerPreferencesBadRequest.md index aa90fd54..30894c90 100644 --- a/docs/models/errors/GetServerPreferencesResponseBody.md +++ b/docs/models/errors/GetServerPreferencesBadRequest.md @@ -1,6 +1,6 @@ -# GetServerPreferencesResponseBody +# GetServerPreferencesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetServerPreferencesErrors.md b/docs/models/errors/GetServerPreferencesErrors.md index 97b15070..19f8accd 100644 --- a/docs/models/errors/GetServerPreferencesErrors.md +++ b/docs/models/errors/GetServerPreferencesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetServerPreferencesServerErrors.md b/docs/models/errors/GetServerPreferencesServerErrors.md new file mode 100644 index 00000000..e4c2e15f --- /dev/null +++ b/docs/models/errors/GetServerPreferencesServerErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..f21b8b72 --- /dev/null +++ b/docs/models/errors/GetServerPreferencesUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetServerResourcesResponseBody.md b/docs/models/errors/GetServerResourcesBadRequest.md similarity index 94% rename from docs/models/errors/GetServerResourcesResponseBody.md rename to docs/models/errors/GetServerResourcesBadRequest.md index 5f19010d..d0787f7a 100644 --- a/docs/models/errors/GetServerResourcesResponseBody.md +++ b/docs/models/errors/GetServerResourcesBadRequest.md @@ -1,6 +1,6 @@ -# GetServerResourcesResponseBody +# GetServerResourcesBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetServerResourcesErrors.md b/docs/models/errors/GetServerResourcesErrors.md index 81f85362..b6dc5f15 100644 --- a/docs/models/errors/GetServerResourcesErrors.md +++ b/docs/models/errors/GetServerResourcesErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetServerResourcesPlexErrors.md b/docs/models/errors/GetServerResourcesPlexErrors.md new file mode 100644 index 00000000..e740bf7f --- /dev/null +++ b/docs/models/errors/GetServerResourcesPlexErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..c3dd5478 --- /dev/null +++ b/docs/models/errors/GetServerResourcesUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetSessionHistoryResponseBody.md b/docs/models/errors/GetSessionHistoryBadRequest.md similarity index 94% rename from docs/models/errors/GetSessionHistoryResponseBody.md rename to docs/models/errors/GetSessionHistoryBadRequest.md index c5551c9b..c0ffb638 100644 --- a/docs/models/errors/GetSessionHistoryResponseBody.md +++ b/docs/models/errors/GetSessionHistoryBadRequest.md @@ -1,6 +1,6 @@ -# GetSessionHistoryResponseBody +# GetSessionHistoryBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetSessionHistoryErrors.md b/docs/models/errors/GetSessionHistoryErrors.md index 2f834079..f96073ca 100644 --- a/docs/models/errors/GetSessionHistoryErrors.md +++ b/docs/models/errors/GetSessionHistoryErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetSessionHistorySessionsErrors.md b/docs/models/errors/GetSessionHistorySessionsErrors.md new file mode 100644 index 00000000..27c190fa --- /dev/null +++ b/docs/models/errors/GetSessionHistorySessionsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..7dad2520 --- /dev/null +++ b/docs/models/errors/GetSessionHistoryUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetSessionsResponseBody.md b/docs/models/errors/GetSessionsBadRequest.md similarity index 95% rename from docs/models/errors/GetSessionsResponseBody.md rename to docs/models/errors/GetSessionsBadRequest.md index 41d55ad3..6badc9d4 100644 --- a/docs/models/errors/GetSessionsResponseBody.md +++ b/docs/models/errors/GetSessionsBadRequest.md @@ -1,6 +1,6 @@ -# GetSessionsResponseBody +# GetSessionsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetSessionsErrors.md b/docs/models/errors/GetSessionsErrors.md index 076cbe5f..d9d415e0 100644 --- a/docs/models/errors/GetSessionsErrors.md +++ b/docs/models/errors/GetSessionsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetSessionsSessionsErrors.md b/docs/models/errors/GetSessionsSessionsErrors.md new file mode 100644 index 00000000..86bfa9f1 --- /dev/null +++ b/docs/models/errors/GetSessionsSessionsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..652f3e46 --- /dev/null +++ b/docs/models/errors/GetSessionsUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..f7f8a6a6 --- /dev/null +++ b/docs/models/errors/GetSourceConnectionInformationAuthenticationErrors.md @@ -0,0 +1,10 @@ +# 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/GetSourceConnectionInformationResponseBody.md b/docs/models/errors/GetSourceConnectionInformationBadRequest.md similarity index 94% rename from docs/models/errors/GetSourceConnectionInformationResponseBody.md rename to docs/models/errors/GetSourceConnectionInformationBadRequest.md index 32fdf9a8..50cb0742 100644 --- a/docs/models/errors/GetSourceConnectionInformationResponseBody.md +++ b/docs/models/errors/GetSourceConnectionInformationBadRequest.md @@ -1,6 +1,6 @@ -# GetSourceConnectionInformationResponseBody +# GetSourceConnectionInformationBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetSourceConnectionInformationErrors.md b/docs/models/errors/GetSourceConnectionInformationErrors.md index da5a3bc9..6197dfe6 100644 --- a/docs/models/errors/GetSourceConnectionInformationErrors.md +++ b/docs/models/errors/GetSourceConnectionInformationErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetSourceConnectionInformationUnauthorized.md b/docs/models/errors/GetSourceConnectionInformationUnauthorized.md new file mode 100644 index 00000000..99a8c164 --- /dev/null +++ b/docs/models/errors/GetSourceConnectionInformationUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetStatisticsResponseBody.md b/docs/models/errors/GetStatisticsBadRequest.md similarity index 94% rename from docs/models/errors/GetStatisticsResponseBody.md rename to docs/models/errors/GetStatisticsBadRequest.md index 937de414..8de249e6 100644 --- a/docs/models/errors/GetStatisticsResponseBody.md +++ b/docs/models/errors/GetStatisticsBadRequest.md @@ -1,6 +1,6 @@ -# GetStatisticsResponseBody +# GetStatisticsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetStatisticsErrors.md b/docs/models/errors/GetStatisticsErrors.md index ce4056b5..6034dc63 100644 --- a/docs/models/errors/GetStatisticsErrors.md +++ b/docs/models/errors/GetStatisticsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetStatisticsStatisticsErrors.md b/docs/models/errors/GetStatisticsStatisticsErrors.md new file mode 100644 index 00000000..b8c55e20 --- /dev/null +++ b/docs/models/errors/GetStatisticsStatisticsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..28894854 --- /dev/null +++ b/docs/models/errors/GetStatisticsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetThumbImageResponseBody.md b/docs/models/errors/GetThumbImageBadRequest.md similarity index 94% rename from docs/models/errors/GetThumbImageResponseBody.md rename to docs/models/errors/GetThumbImageBadRequest.md index edaf8c03..595e5fd4 100644 --- a/docs/models/errors/GetThumbImageResponseBody.md +++ b/docs/models/errors/GetThumbImageBadRequest.md @@ -1,6 +1,6 @@ -# GetThumbImageResponseBody +# GetThumbImageBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetThumbImageErrors.md b/docs/models/errors/GetThumbImageErrors.md index e82cd89c..37ba8569 100644 --- a/docs/models/errors/GetThumbImageErrors.md +++ b/docs/models/errors/GetThumbImageErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetThumbImageMediaErrors.md b/docs/models/errors/GetThumbImageMediaErrors.md new file mode 100644 index 00000000..afd16c04 --- /dev/null +++ b/docs/models/errors/GetThumbImageMediaErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..59266a7f --- /dev/null +++ b/docs/models/errors/GetThumbImageUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetTimelineResponseBody.md b/docs/models/errors/GetTimelineBadRequest.md similarity index 95% rename from docs/models/errors/GetTimelineResponseBody.md rename to docs/models/errors/GetTimelineBadRequest.md index 7c15a012..4b5b74fc 100644 --- a/docs/models/errors/GetTimelineResponseBody.md +++ b/docs/models/errors/GetTimelineBadRequest.md @@ -1,6 +1,6 @@ -# GetTimelineResponseBody +# GetTimelineBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetTimelineErrors.md b/docs/models/errors/GetTimelineErrors.md index 69b0b123..d8c4c15a 100644 --- a/docs/models/errors/GetTimelineErrors.md +++ b/docs/models/errors/GetTimelineErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetTimelineUnauthorized.md b/docs/models/errors/GetTimelineUnauthorized.md new file mode 100644 index 00000000..46b36f6a --- /dev/null +++ b/docs/models/errors/GetTimelineUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..5c14ff19 --- /dev/null +++ b/docs/models/errors/GetTimelineVideoErrors.md @@ -0,0 +1,10 @@ +# 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/GetTokenByPinIdPlexResponseBody.md b/docs/models/errors/GetTokenByPinIdBadRequest.md similarity index 89% rename from docs/models/errors/GetTokenByPinIdPlexResponseBody.md rename to docs/models/errors/GetTokenByPinIdBadRequest.md index fd3b9ce7..e370b17d 100644 --- a/docs/models/errors/GetTokenByPinIdPlexResponseBody.md +++ b/docs/models/errors/GetTokenByPinIdBadRequest.md @@ -1,11 +1,11 @@ -# GetTokenByPinIdPlexResponseBody +# GetTokenByPinIdBadRequest -Not Found or Expired +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetTokenByPinIdPlexErrors](../../models/errors/GetTokenByPinIdPlexErrors.md)> | :heavy_minus_sign: | N/A | +| `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/GetTokenByPinIdResponseBody.md b/docs/models/errors/GetTokenByPinIdResponseBody.md index 6d6d10f6..eb77d972 100644 --- a/docs/models/errors/GetTokenByPinIdResponseBody.md +++ b/docs/models/errors/GetTokenByPinIdResponseBody.md @@ -1,11 +1,11 @@ # GetTokenByPinIdResponseBody -Bad Request response when the X-Plex-Client-Identifier is missing +Not Found or Expired ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetTokenByPinIdErrors](../../models/errors/GetTokenByPinIdErrors.md)> | :heavy_minus_sign: | N/A | +| `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 new file mode 100644 index 00000000..9b0d1d0a --- /dev/null +++ b/docs/models/errors/GetTokenDetailsAuthenticationErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..faf1bd08 --- /dev/null +++ b/docs/models/errors/GetTokenDetailsBadRequest.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..8563e111 --- /dev/null +++ b/docs/models/errors/GetTokenDetailsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..361bb857 --- /dev/null +++ b/docs/models/errors/GetTokenDetailsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetTopWatchedContentResponseBody.md b/docs/models/errors/GetTopWatchedContentBadRequest.md similarity index 94% rename from docs/models/errors/GetTopWatchedContentResponseBody.md rename to docs/models/errors/GetTopWatchedContentBadRequest.md index 238d1f72..ce74e1c4 100644 --- a/docs/models/errors/GetTopWatchedContentResponseBody.md +++ b/docs/models/errors/GetTopWatchedContentBadRequest.md @@ -1,6 +1,6 @@ -# GetTopWatchedContentResponseBody +# GetTopWatchedContentBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetTopWatchedContentErrors.md b/docs/models/errors/GetTopWatchedContentErrors.md index b8fbc0fb..e3ede0b5 100644 --- a/docs/models/errors/GetTopWatchedContentErrors.md +++ b/docs/models/errors/GetTopWatchedContentErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetTopWatchedContentLibraryErrors.md b/docs/models/errors/GetTopWatchedContentLibraryErrors.md new file mode 100644 index 00000000..4e5222e2 --- /dev/null +++ b/docs/models/errors/GetTopWatchedContentLibraryErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..b8f044d3 --- /dev/null +++ b/docs/models/errors/GetTopWatchedContentUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetTranscodeSessionsResponseBody.md b/docs/models/errors/GetTranscodeSessionsBadRequest.md similarity index 94% rename from docs/models/errors/GetTranscodeSessionsResponseBody.md rename to docs/models/errors/GetTranscodeSessionsBadRequest.md index 43b575f6..a2664559 100644 --- a/docs/models/errors/GetTranscodeSessionsResponseBody.md +++ b/docs/models/errors/GetTranscodeSessionsBadRequest.md @@ -1,6 +1,6 @@ -# GetTranscodeSessionsResponseBody +# GetTranscodeSessionsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetTranscodeSessionsErrors.md b/docs/models/errors/GetTranscodeSessionsErrors.md index 50e4744a..50934c50 100644 --- a/docs/models/errors/GetTranscodeSessionsErrors.md +++ b/docs/models/errors/GetTranscodeSessionsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetTranscodeSessionsSessionsErrors.md b/docs/models/errors/GetTranscodeSessionsSessionsErrors.md new file mode 100644 index 00000000..5476a513 --- /dev/null +++ b/docs/models/errors/GetTranscodeSessionsSessionsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..c8fff5e4 --- /dev/null +++ b/docs/models/errors/GetTranscodeSessionsUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..47e89aed --- /dev/null +++ b/docs/models/errors/GetTransientTokenAuthenticationErrors.md @@ -0,0 +1,10 @@ +# 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/GetTransientTokenResponseBody.md b/docs/models/errors/GetTransientTokenBadRequest.md similarity index 94% rename from docs/models/errors/GetTransientTokenResponseBody.md rename to docs/models/errors/GetTransientTokenBadRequest.md index 5551fc36..ce62263c 100644 --- a/docs/models/errors/GetTransientTokenResponseBody.md +++ b/docs/models/errors/GetTransientTokenBadRequest.md @@ -1,6 +1,6 @@ -# GetTransientTokenResponseBody +# GetTransientTokenBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetTransientTokenErrors.md b/docs/models/errors/GetTransientTokenErrors.md index 8b32ac03..10703505 100644 --- a/docs/models/errors/GetTransientTokenErrors.md +++ b/docs/models/errors/GetTransientTokenErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetTransientTokenUnauthorized.md b/docs/models/errors/GetTransientTokenUnauthorized.md new file mode 100644 index 00000000..551efee0 --- /dev/null +++ b/docs/models/errors/GetTransientTokenUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetUpdateStatusResponseBody.md b/docs/models/errors/GetUpdateStatusBadRequest.md similarity index 94% rename from docs/models/errors/GetUpdateStatusResponseBody.md rename to docs/models/errors/GetUpdateStatusBadRequest.md index f5bfc05c..6bb93398 100644 --- a/docs/models/errors/GetUpdateStatusResponseBody.md +++ b/docs/models/errors/GetUpdateStatusBadRequest.md @@ -1,6 +1,6 @@ -# GetUpdateStatusResponseBody +# GetUpdateStatusBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetUpdateStatusErrors.md b/docs/models/errors/GetUpdateStatusErrors.md index 68d1f860..bfa49aff 100644 --- a/docs/models/errors/GetUpdateStatusErrors.md +++ b/docs/models/errors/GetUpdateStatusErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetUpdateStatusUnauthorized.md b/docs/models/errors/GetUpdateStatusUnauthorized.md new file mode 100644 index 00000000..1ecaa6f9 --- /dev/null +++ b/docs/models/errors/GetUpdateStatusUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..a7df58dc --- /dev/null +++ b/docs/models/errors/GetUpdateStatusUpdaterErrors.md @@ -0,0 +1,10 @@ +# 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/GetUserDetailsResponseBody.md b/docs/models/errors/GetUserDetailsResponseBody.md deleted file mode 100644 index 384900dc..00000000 --- a/docs/models/errors/GetUserDetailsResponseBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUserDetailsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetUserDetailsErrors](../../models/errors/GetUserDetailsErrors.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/GetUserFriendsResponseBody.md b/docs/models/errors/GetUserFriendsBadRequest.md similarity index 94% rename from docs/models/errors/GetUserFriendsResponseBody.md rename to docs/models/errors/GetUserFriendsBadRequest.md index 0bc34715..fd957307 100644 --- a/docs/models/errors/GetUserFriendsResponseBody.md +++ b/docs/models/errors/GetUserFriendsBadRequest.md @@ -1,6 +1,6 @@ -# GetUserFriendsResponseBody +# GetUserFriendsBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetUserFriendsErrors.md b/docs/models/errors/GetUserFriendsErrors.md index d4f965b8..76a261b3 100644 --- a/docs/models/errors/GetUserFriendsErrors.md +++ b/docs/models/errors/GetUserFriendsErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetUserFriendsPlexErrors.md b/docs/models/errors/GetUserFriendsPlexErrors.md new file mode 100644 index 00000000..8b0f8bee --- /dev/null +++ b/docs/models/errors/GetUserFriendsPlexErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..670ec820 --- /dev/null +++ b/docs/models/errors/GetUserFriendsUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetWatchListResponseBody.md b/docs/models/errors/GetWatchListBadRequest.md similarity index 95% rename from docs/models/errors/GetWatchListResponseBody.md rename to docs/models/errors/GetWatchListBadRequest.md index 1da5407a..7ab0aae4 100644 --- a/docs/models/errors/GetWatchListResponseBody.md +++ b/docs/models/errors/GetWatchListBadRequest.md @@ -1,6 +1,6 @@ -# GetWatchListResponseBody +# GetWatchListBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetWatchListErrors.md b/docs/models/errors/GetWatchListErrors.md index 49805ea6..cd67ec9a 100644 --- a/docs/models/errors/GetWatchListErrors.md +++ b/docs/models/errors/GetWatchListErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetWatchListUnauthorized.md b/docs/models/errors/GetWatchListUnauthorized.md new file mode 100644 index 00000000..ac7397f4 --- /dev/null +++ b/docs/models/errors/GetWatchListUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..d43a3240 --- /dev/null +++ b/docs/models/errors/GetWatchListWatchlistErrors.md @@ -0,0 +1,10 @@ +# 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/LogLineResponseBody.md b/docs/models/errors/LogLineBadRequest.md similarity index 95% rename from docs/models/errors/LogLineResponseBody.md rename to docs/models/errors/LogLineBadRequest.md index 5c76287e..f604fd70 100644 --- a/docs/models/errors/LogLineResponseBody.md +++ b/docs/models/errors/LogLineBadRequest.md @@ -1,6 +1,6 @@ -# LogLineResponseBody +# LogLineBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/LogLineErrors.md b/docs/models/errors/LogLineErrors.md index 22b2d2ec..75e0a9ea 100644 --- a/docs/models/errors/LogLineErrors.md +++ b/docs/models/errors/LogLineErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/LogLineLogErrors.md b/docs/models/errors/LogLineLogErrors.md new file mode 100644 index 00000000..91f5bec6 --- /dev/null +++ b/docs/models/errors/LogLineLogErrors.md @@ -0,0 +1,10 @@ +# 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/GetGeoDataResponseBody.md b/docs/models/errors/LogLineUnauthorized.md similarity index 95% rename from docs/models/errors/GetGeoDataResponseBody.md rename to docs/models/errors/LogLineUnauthorized.md index 855abc44..f57c3cab 100644 --- a/docs/models/errors/GetGeoDataResponseBody.md +++ b/docs/models/errors/LogLineUnauthorized.md @@ -1,4 +1,4 @@ -# GetGeoDataResponseBody +# LogLineUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetGeoDataErrors](../../models/errors/GetGeoDataErrors.md)> | :heavy_minus_sign: | N/A | +| `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/LogMultiLineResponseBody.md b/docs/models/errors/LogMultiLineBadRequest.md similarity index 95% rename from docs/models/errors/LogMultiLineResponseBody.md rename to docs/models/errors/LogMultiLineBadRequest.md index 6d7ed621..427a1fb7 100644 --- a/docs/models/errors/LogMultiLineResponseBody.md +++ b/docs/models/errors/LogMultiLineBadRequest.md @@ -1,6 +1,6 @@ -# LogMultiLineResponseBody +# LogMultiLineBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/LogMultiLineErrors.md b/docs/models/errors/LogMultiLineErrors.md index 0a2ad27a..0d07da25 100644 --- a/docs/models/errors/LogMultiLineErrors.md +++ b/docs/models/errors/LogMultiLineErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/LogMultiLineLogErrors.md b/docs/models/errors/LogMultiLineLogErrors.md new file mode 100644 index 00000000..6a614fc5 --- /dev/null +++ b/docs/models/errors/LogMultiLineLogErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..b450a9ec --- /dev/null +++ b/docs/models/errors/LogMultiLineUnauthorized.md @@ -0,0 +1,11 @@ +# 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/MarkPlayedResponseBody.md b/docs/models/errors/MarkPlayedBadRequest.md similarity index 95% rename from docs/models/errors/MarkPlayedResponseBody.md rename to docs/models/errors/MarkPlayedBadRequest.md index 536a36cc..8f2d81c2 100644 --- a/docs/models/errors/MarkPlayedResponseBody.md +++ b/docs/models/errors/MarkPlayedBadRequest.md @@ -1,6 +1,6 @@ -# MarkPlayedResponseBody +# MarkPlayedBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/MarkPlayedErrors.md b/docs/models/errors/MarkPlayedErrors.md index 2a1229ee..8bd41503 100644 --- a/docs/models/errors/MarkPlayedErrors.md +++ b/docs/models/errors/MarkPlayedErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/MarkPlayedMediaErrors.md b/docs/models/errors/MarkPlayedMediaErrors.md new file mode 100644 index 00000000..f4bf78d7 --- /dev/null +++ b/docs/models/errors/MarkPlayedMediaErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..86cdec65 --- /dev/null +++ b/docs/models/errors/MarkPlayedUnauthorized.md @@ -0,0 +1,11 @@ +# 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/MarkUnplayedResponseBody.md b/docs/models/errors/MarkUnplayedBadRequest.md similarity index 95% rename from docs/models/errors/MarkUnplayedResponseBody.md rename to docs/models/errors/MarkUnplayedBadRequest.md index e051b688..d73f4406 100644 --- a/docs/models/errors/MarkUnplayedResponseBody.md +++ b/docs/models/errors/MarkUnplayedBadRequest.md @@ -1,6 +1,6 @@ -# MarkUnplayedResponseBody +# MarkUnplayedBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/MarkUnplayedErrors.md b/docs/models/errors/MarkUnplayedErrors.md index 46d95a6b..727153db 100644 --- a/docs/models/errors/MarkUnplayedErrors.md +++ b/docs/models/errors/MarkUnplayedErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/MarkUnplayedMediaErrors.md b/docs/models/errors/MarkUnplayedMediaErrors.md new file mode 100644 index 00000000..86e308f8 --- /dev/null +++ b/docs/models/errors/MarkUnplayedMediaErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..650be679 --- /dev/null +++ b/docs/models/errors/MarkUnplayedUnauthorized.md @@ -0,0 +1,11 @@ +# 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/PerformSearchResponseBody.md b/docs/models/errors/PerformSearchBadRequest.md similarity index 94% rename from docs/models/errors/PerformSearchResponseBody.md rename to docs/models/errors/PerformSearchBadRequest.md index 2788d00a..4e2683c3 100644 --- a/docs/models/errors/PerformSearchResponseBody.md +++ b/docs/models/errors/PerformSearchBadRequest.md @@ -1,6 +1,6 @@ -# PerformSearchResponseBody +# PerformSearchBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/PerformSearchErrors.md b/docs/models/errors/PerformSearchErrors.md index 669b230e..a9849fc8 100644 --- a/docs/models/errors/PerformSearchErrors.md +++ b/docs/models/errors/PerformSearchErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/PerformSearchSearchErrors.md b/docs/models/errors/PerformSearchSearchErrors.md new file mode 100644 index 00000000..d7694e7a --- /dev/null +++ b/docs/models/errors/PerformSearchSearchErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..0d2c6e52 --- /dev/null +++ b/docs/models/errors/PerformSearchUnauthorized.md @@ -0,0 +1,11 @@ +# 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/PerformVoiceSearchResponseBody.md b/docs/models/errors/PerformVoiceSearchBadRequest.md similarity index 94% rename from docs/models/errors/PerformVoiceSearchResponseBody.md rename to docs/models/errors/PerformVoiceSearchBadRequest.md index c3c9d476..0995b954 100644 --- a/docs/models/errors/PerformVoiceSearchResponseBody.md +++ b/docs/models/errors/PerformVoiceSearchBadRequest.md @@ -1,6 +1,6 @@ -# PerformVoiceSearchResponseBody +# PerformVoiceSearchBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/PerformVoiceSearchErrors.md b/docs/models/errors/PerformVoiceSearchErrors.md index 7e6d30e6..5ac863c1 100644 --- a/docs/models/errors/PerformVoiceSearchErrors.md +++ b/docs/models/errors/PerformVoiceSearchErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/PerformVoiceSearchSearchErrors.md b/docs/models/errors/PerformVoiceSearchSearchErrors.md new file mode 100644 index 00000000..cbf4161f --- /dev/null +++ b/docs/models/errors/PerformVoiceSearchSearchErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..ddff3bf4 --- /dev/null +++ b/docs/models/errors/PerformVoiceSearchUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..42cdc103 --- /dev/null +++ b/docs/models/errors/PostUsersSignInDataAuthenticationErrors.md @@ -0,0 +1,10 @@ +# 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/PostUsersSignInDataResponseBody.md b/docs/models/errors/PostUsersSignInDataBadRequest.md similarity index 94% rename from docs/models/errors/PostUsersSignInDataResponseBody.md rename to docs/models/errors/PostUsersSignInDataBadRequest.md index 209d73a3..200d6fa4 100644 --- a/docs/models/errors/PostUsersSignInDataResponseBody.md +++ b/docs/models/errors/PostUsersSignInDataBadRequest.md @@ -1,6 +1,6 @@ -# PostUsersSignInDataResponseBody +# PostUsersSignInDataBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/PostUsersSignInDataErrors.md b/docs/models/errors/PostUsersSignInDataErrors.md index 58e33f83..13ef10bb 100644 --- a/docs/models/errors/PostUsersSignInDataErrors.md +++ b/docs/models/errors/PostUsersSignInDataErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/PostUsersSignInDataUnauthorized.md b/docs/models/errors/PostUsersSignInDataUnauthorized.md new file mode 100644 index 00000000..7dcf03f9 --- /dev/null +++ b/docs/models/errors/PostUsersSignInDataUnauthorized.md @@ -0,0 +1,11 @@ +# 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/StartAllTasksResponseBody.md b/docs/models/errors/StartAllTasksBadRequest.md similarity index 94% rename from docs/models/errors/StartAllTasksResponseBody.md rename to docs/models/errors/StartAllTasksBadRequest.md index 8503aa65..435fea4c 100644 --- a/docs/models/errors/StartAllTasksResponseBody.md +++ b/docs/models/errors/StartAllTasksBadRequest.md @@ -1,6 +1,6 @@ -# StartAllTasksResponseBody +# StartAllTasksBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/StartAllTasksButlerErrors.md b/docs/models/errors/StartAllTasksButlerErrors.md new file mode 100644 index 00000000..513478fe --- /dev/null +++ b/docs/models/errors/StartAllTasksButlerErrors.md @@ -0,0 +1,10 @@ +# 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 index 50e9ffe0..07e40edb 100644 --- a/docs/models/errors/StartAllTasksErrors.md +++ b/docs/models/errors/StartAllTasksErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/StartAllTasksUnauthorized.md b/docs/models/errors/StartAllTasksUnauthorized.md new file mode 100644 index 00000000..06e75c15 --- /dev/null +++ b/docs/models/errors/StartAllTasksUnauthorized.md @@ -0,0 +1,11 @@ +# 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/StartTaskResponseBody.md b/docs/models/errors/StartTaskBadRequest.md similarity index 95% rename from docs/models/errors/StartTaskResponseBody.md rename to docs/models/errors/StartTaskBadRequest.md index e0ac8ced..a13343ef 100644 --- a/docs/models/errors/StartTaskResponseBody.md +++ b/docs/models/errors/StartTaskBadRequest.md @@ -1,6 +1,6 @@ -# StartTaskResponseBody +# StartTaskBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/StartTaskButlerErrors.md b/docs/models/errors/StartTaskButlerErrors.md new file mode 100644 index 00000000..7c607c5b --- /dev/null +++ b/docs/models/errors/StartTaskButlerErrors.md @@ -0,0 +1,10 @@ +# 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 index 05fcb486..cc0d9254 100644 --- a/docs/models/errors/StartTaskErrors.md +++ b/docs/models/errors/StartTaskErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/StartTaskUnauthorized.md b/docs/models/errors/StartTaskUnauthorized.md new file mode 100644 index 00000000..784b2bbf --- /dev/null +++ b/docs/models/errors/StartTaskUnauthorized.md @@ -0,0 +1,11 @@ +# 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/StartUniversalTranscodeResponseBody.md b/docs/models/errors/StartUniversalTranscodeBadRequest.md similarity index 94% rename from docs/models/errors/StartUniversalTranscodeResponseBody.md rename to docs/models/errors/StartUniversalTranscodeBadRequest.md index 099857af..795398c1 100644 --- a/docs/models/errors/StartUniversalTranscodeResponseBody.md +++ b/docs/models/errors/StartUniversalTranscodeBadRequest.md @@ -1,6 +1,6 @@ -# StartUniversalTranscodeResponseBody +# StartUniversalTranscodeBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/StartUniversalTranscodeErrors.md b/docs/models/errors/StartUniversalTranscodeErrors.md index ec5f3b49..d6faf367 100644 --- a/docs/models/errors/StartUniversalTranscodeErrors.md +++ b/docs/models/errors/StartUniversalTranscodeErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/StartUniversalTranscodeUnauthorized.md b/docs/models/errors/StartUniversalTranscodeUnauthorized.md new file mode 100644 index 00000000..8ed7b0a8 --- /dev/null +++ b/docs/models/errors/StartUniversalTranscodeUnauthorized.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..8f8e1ef3 --- /dev/null +++ b/docs/models/errors/StartUniversalTranscodeVideoErrors.md @@ -0,0 +1,10 @@ +# 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/StopAllTasksResponseBody.md b/docs/models/errors/StopAllTasksBadRequest.md similarity index 95% rename from docs/models/errors/StopAllTasksResponseBody.md rename to docs/models/errors/StopAllTasksBadRequest.md index 7d5da199..a3882d79 100644 --- a/docs/models/errors/StopAllTasksResponseBody.md +++ b/docs/models/errors/StopAllTasksBadRequest.md @@ -1,6 +1,6 @@ -# StopAllTasksResponseBody +# StopAllTasksBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/StopAllTasksButlerErrors.md b/docs/models/errors/StopAllTasksButlerErrors.md new file mode 100644 index 00000000..9f08b2b3 --- /dev/null +++ b/docs/models/errors/StopAllTasksButlerErrors.md @@ -0,0 +1,10 @@ +# 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 index 07f87d07..d4cbefe4 100644 --- a/docs/models/errors/StopAllTasksErrors.md +++ b/docs/models/errors/StopAllTasksErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/StopAllTasksUnauthorized.md b/docs/models/errors/StopAllTasksUnauthorized.md new file mode 100644 index 00000000..423122e8 --- /dev/null +++ b/docs/models/errors/StopAllTasksUnauthorized.md @@ -0,0 +1,11 @@ +# 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/StopTaskResponseBody.md b/docs/models/errors/StopTaskBadRequest.md similarity index 95% rename from docs/models/errors/StopTaskResponseBody.md rename to docs/models/errors/StopTaskBadRequest.md index c2abef27..0084eb5d 100644 --- a/docs/models/errors/StopTaskResponseBody.md +++ b/docs/models/errors/StopTaskBadRequest.md @@ -1,6 +1,6 @@ -# StopTaskResponseBody +# StopTaskBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/StopTaskButlerErrors.md b/docs/models/errors/StopTaskButlerErrors.md new file mode 100644 index 00000000..9813401b --- /dev/null +++ b/docs/models/errors/StopTaskButlerErrors.md @@ -0,0 +1,10 @@ +# 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 index 00694770..446d0a6e 100644 --- a/docs/models/errors/StopTaskErrors.md +++ b/docs/models/errors/StopTaskErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetButlerTasksResponseBody.md b/docs/models/errors/StopTaskUnauthorized.md similarity index 95% rename from docs/models/errors/GetButlerTasksResponseBody.md rename to docs/models/errors/StopTaskUnauthorized.md index e4cb8377..7c39eaa6 100644 --- a/docs/models/errors/GetButlerTasksResponseBody.md +++ b/docs/models/errors/StopTaskUnauthorized.md @@ -1,4 +1,4 @@ -# GetButlerTasksResponseBody +# StopTaskUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetButlerTasksErrors](../../models/errors/GetButlerTasksErrors.md)> | :heavy_minus_sign: | N/A | +| `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/StopTranscodeSessionResponseBody.md b/docs/models/errors/StopTranscodeSessionBadRequest.md similarity index 94% rename from docs/models/errors/StopTranscodeSessionResponseBody.md rename to docs/models/errors/StopTranscodeSessionBadRequest.md index e1fa7a22..5810e0fc 100644 --- a/docs/models/errors/StopTranscodeSessionResponseBody.md +++ b/docs/models/errors/StopTranscodeSessionBadRequest.md @@ -1,6 +1,6 @@ -# StopTranscodeSessionResponseBody +# StopTranscodeSessionBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/StopTranscodeSessionErrors.md b/docs/models/errors/StopTranscodeSessionErrors.md index 2a439f09..aad1e9d6 100644 --- a/docs/models/errors/StopTranscodeSessionErrors.md +++ b/docs/models/errors/StopTranscodeSessionErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/StopTranscodeSessionSessionsErrors.md b/docs/models/errors/StopTranscodeSessionSessionsErrors.md new file mode 100644 index 00000000..fb4d8f22 --- /dev/null +++ b/docs/models/errors/StopTranscodeSessionSessionsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..6c22e224 --- /dev/null +++ b/docs/models/errors/StopTranscodeSessionUnauthorized.md @@ -0,0 +1,11 @@ +# 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/UpdatePlayProgressResponseBody.md b/docs/models/errors/UpdatePlayProgressBadRequest.md similarity index 94% rename from docs/models/errors/UpdatePlayProgressResponseBody.md rename to docs/models/errors/UpdatePlayProgressBadRequest.md index b5ae9ab4..5de4830c 100644 --- a/docs/models/errors/UpdatePlayProgressResponseBody.md +++ b/docs/models/errors/UpdatePlayProgressBadRequest.md @@ -1,6 +1,6 @@ -# UpdatePlayProgressResponseBody +# UpdatePlayProgressBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/UpdatePlayProgressErrors.md b/docs/models/errors/UpdatePlayProgressErrors.md index 9e1c48d0..d3e2c047 100644 --- a/docs/models/errors/UpdatePlayProgressErrors.md +++ b/docs/models/errors/UpdatePlayProgressErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/UpdatePlayProgressMediaErrors.md b/docs/models/errors/UpdatePlayProgressMediaErrors.md new file mode 100644 index 00000000..0d9b91f0 --- /dev/null +++ b/docs/models/errors/UpdatePlayProgressMediaErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..4ff512d8 --- /dev/null +++ b/docs/models/errors/UpdatePlayProgressUnauthorized.md @@ -0,0 +1,11 @@ +# 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/UpdatePlaylistResponseBody.md b/docs/models/errors/UpdatePlaylistBadRequest.md similarity index 94% rename from docs/models/errors/UpdatePlaylistResponseBody.md rename to docs/models/errors/UpdatePlaylistBadRequest.md index f33d35a8..032c2596 100644 --- a/docs/models/errors/UpdatePlaylistResponseBody.md +++ b/docs/models/errors/UpdatePlaylistBadRequest.md @@ -1,6 +1,6 @@ -# UpdatePlaylistResponseBody +# UpdatePlaylistBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/UpdatePlaylistErrors.md b/docs/models/errors/UpdatePlaylistErrors.md index 7ffde7d6..114f6ea4 100644 --- a/docs/models/errors/UpdatePlaylistErrors.md +++ b/docs/models/errors/UpdatePlaylistErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/UpdatePlaylistPlaylistsErrors.md b/docs/models/errors/UpdatePlaylistPlaylistsErrors.md new file mode 100644 index 00000000..715af008 --- /dev/null +++ b/docs/models/errors/UpdatePlaylistPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..3515f1a4 --- /dev/null +++ b/docs/models/errors/UpdatePlaylistUnauthorized.md @@ -0,0 +1,11 @@ +# 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/UploadPlaylistResponseBody.md b/docs/models/errors/UploadPlaylistBadRequest.md similarity index 94% rename from docs/models/errors/UploadPlaylistResponseBody.md rename to docs/models/errors/UploadPlaylistBadRequest.md index 3a2a4c4a..55526ad2 100644 --- a/docs/models/errors/UploadPlaylistResponseBody.md +++ b/docs/models/errors/UploadPlaylistBadRequest.md @@ -1,6 +1,6 @@ -# UploadPlaylistResponseBody +# UploadPlaylistBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/UploadPlaylistErrors.md b/docs/models/errors/UploadPlaylistErrors.md index ff72ac5c..0fe527ec 100644 --- a/docs/models/errors/UploadPlaylistErrors.md +++ b/docs/models/errors/UploadPlaylistErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/UploadPlaylistPlaylistsErrors.md b/docs/models/errors/UploadPlaylistPlaylistsErrors.md new file mode 100644 index 00000000..27128167 --- /dev/null +++ b/docs/models/errors/UploadPlaylistPlaylistsErrors.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..42a40afa --- /dev/null +++ b/docs/models/errors/UploadPlaylistUnauthorized.md @@ -0,0 +1,11 @@ +# 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/GetAllLibrariesDirectory.md b/docs/models/operations/GetAllLibrariesDirectory.md index d17267bd..c4d6aa03 100644 --- a/docs/models/operations/GetAllLibrariesDirectory.md +++ b/docs/models/operations/GetAllLibrariesDirectory.md @@ -18,9 +18,9 @@ | `scanner` | *Optional* | :heavy_minus_sign: | N/A | Plex Movie | | `language` | *Optional* | :heavy_minus_sign: | N/A | en-US | | `uuid` | *Optional* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `updatedAt` | *Optional* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | -| `createdAt` | *Optional* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | -| `scannedAt` | *Optional* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | +| `createdAt` | *Optional* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | +| `scannedAt` | *Optional* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | | `content` | *Optional* | :heavy_minus_sign: | N/A | true | | `directory` | *Optional* | :heavy_minus_sign: | N/A | true | | `contentChangedAt` | *Optional* | :heavy_minus_sign: | N/A | 3192854 | diff --git a/docs/models/operations/GetServerResourcesRequest.md b/docs/models/operations/GetServerResourcesRequest.md index 5a82d229..e93d4dab 100644 --- a/docs/models/operations/GetServerResourcesRequest.md +++ b/docs/models/operations/GetServerResourcesRequest.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `xPlexClientIdentifier` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | -| `xPlexToken` | *String* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | | `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 | \ No newline at end of file diff --git a/docs/models/operations/GetUserDetailsAuthenticationResponseStatus.md b/docs/models/operations/GetTokenDetailsAuthenticationResponseStatus.md similarity index 78% rename from docs/models/operations/GetUserDetailsAuthenticationResponseStatus.md rename to docs/models/operations/GetTokenDetailsAuthenticationResponseStatus.md index 7050ad29..c13e886f 100644 --- a/docs/models/operations/GetUserDetailsAuthenticationResponseStatus.md +++ b/docs/models/operations/GetTokenDetailsAuthenticationResponseStatus.md @@ -1,4 +1,4 @@ -# GetUserDetailsAuthenticationResponseStatus +# GetTokenDetailsAuthenticationResponseStatus String representation of subscriptionActive diff --git a/docs/models/operations/GetUserDetailsAuthenticationStatus.md b/docs/models/operations/GetTokenDetailsAuthenticationStatus.md similarity index 81% rename from docs/models/operations/GetUserDetailsAuthenticationStatus.md rename to docs/models/operations/GetTokenDetailsAuthenticationStatus.md index 2f89cda7..7a8ee4bd 100644 --- a/docs/models/operations/GetUserDetailsAuthenticationStatus.md +++ b/docs/models/operations/GetTokenDetailsAuthenticationStatus.md @@ -1,4 +1,4 @@ -# GetUserDetailsAuthenticationStatus +# GetTokenDetailsAuthenticationStatus String representation of subscriptionActive diff --git a/docs/models/operations/GetUserDetailsFeatures.md b/docs/models/operations/GetTokenDetailsFeatures.md similarity index 99% rename from docs/models/operations/GetUserDetailsFeatures.md rename to docs/models/operations/GetTokenDetailsFeatures.md index 34b80e75..2cfca590 100644 --- a/docs/models/operations/GetUserDetailsFeatures.md +++ b/docs/models/operations/GetTokenDetailsFeatures.md @@ -1,4 +1,4 @@ -# GetUserDetailsFeatures +# GetTokenDetailsFeatures ## Values diff --git a/docs/models/operations/GetUserDetailsResponse.md b/docs/models/operations/GetTokenDetailsResponse.md similarity index 99% rename from docs/models/operations/GetUserDetailsResponse.md rename to docs/models/operations/GetTokenDetailsResponse.md index 3824b9ee..e460fa74 100644 --- a/docs/models/operations/GetUserDetailsResponse.md +++ b/docs/models/operations/GetTokenDetailsResponse.md @@ -1,4 +1,4 @@ -# GetUserDetailsResponse +# GetTokenDetailsResponse ## Fields @@ -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 | | -| `userPlexAccount` | [Optional](../../models/operations/GetUserDetailsUserPlexAccount.md) | :heavy_minus_sign: | Logged in user details | {
"adsConsent": true,
"adsConsentReminderAt": "2019-08-24T14:15:22Z",
"adsConsentSetAt": "2019-08-24T14:15:22Z",
"anonymous": false,
"authToken": "CxoUzBTSV5hsxjTpFKaf",
"backupCodesCreated": false,
"confirmed": false,
"country": "US",
"email": "username@email.com",
"emailOnlyAuth": false,
"experimentalFeatures": false,
"friendlyName": "friendlyUsername",
"entitlements": [],
"guest": false,
"hasPassword": true,
"home": false,
"homeAdmin": false,
"homeSize": 1,
"id": 13692262,
"joinedAt": 1721154902,
"locale": null,
"mailingListActive": false,
"mailingListStatus": "subscribed",
"maxHomeSize": 15,
"pastSubscriptions": [
{
"id": "string",
"mode": "string",
"renewsAt": "string",
"endsAt": "1556281940",
"canceled": "0",
"gracePeriod": "0",
"onHold": "0",
"canReactivate": "0",
"canUpgrade": "0",
"canDowngrade": "0",
"canConvert": "0",
"type": "plexpass",
"transfer": "string",
"state": "ended",
"billing": [
{
"internalPaymentMethod": "string",
"paymentMethodId": "string"
}
]
}
],
"pin": "string",
"profile": [
{
"autoSelectAudio": true,
"defaultAudioLanguage": "ja",
"defaultSubtitleLanguage": "en",
"autoSelectSubtitle": 1,
"defaultSubtitleAccessibility": 1,
"defaultSubtitleForced": 0,
"watchedIndicator": 1,
"mediaReviewsVisibility": 0
}
],
"protected": false,
"rememberExpiresAt": 1722364046,
"restricted": false,
"roles": [
"string"
],
"scrobbleTypes": "",
"services": [
{
"identifier": "metadata-dev",
"endpoint": "https://epg.provider.plex.tv",
"token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
"secret": "string",
"status": "online"
}
],
"subscription": {
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
},
"subscriptionDescription": "string",
"subscriptions": [
{
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
}
],
"thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
"title": "UsernameTitle",
"trials": [
{}
],
"twoFactorEnabled": false,
"username": "Username",
"uuid": "dae343c1f45beb4f"
} | \ No newline at end of file +| `userPlexAccount` | [Optional](../../models/operations/GetTokenDetailsUserPlexAccount.md) | :heavy_minus_sign: | Logged in user details | {
"adsConsent": true,
"adsConsentReminderAt": "2019-08-24T14:15:22Z",
"adsConsentSetAt": "2019-08-24T14:15:22Z",
"anonymous": false,
"authToken": "CxoUzBTSV5hsxjTpFKaf",
"backupCodesCreated": false,
"confirmed": false,
"country": "US",
"email": "username@email.com",
"emailOnlyAuth": false,
"experimentalFeatures": false,
"friendlyName": "friendlyUsername",
"entitlements": [],
"guest": false,
"hasPassword": true,
"home": false,
"homeAdmin": false,
"homeSize": 1,
"id": 13692262,
"joinedAt": 1721154902,
"locale": null,
"mailingListActive": false,
"mailingListStatus": "subscribed",
"maxHomeSize": 15,
"pastSubscriptions": [
{
"id": "string",
"mode": "string",
"renewsAt": "string",
"endsAt": "1556281940",
"canceled": "0",
"gracePeriod": "0",
"onHold": "0",
"canReactivate": "0",
"canUpgrade": "0",
"canDowngrade": "0",
"canConvert": "0",
"type": "plexpass",
"transfer": "string",
"state": "ended",
"billing": [
{
"internalPaymentMethod": "string",
"paymentMethodId": "string"
}
]
}
],
"pin": "string",
"profile": [
{
"autoSelectAudio": true,
"defaultAudioLanguage": "ja",
"defaultSubtitleLanguage": "en",
"autoSelectSubtitle": 1,
"defaultSubtitleAccessibility": 1,
"defaultSubtitleForced": 0,
"watchedIndicator": 1,
"mediaReviewsVisibility": 0
}
],
"protected": false,
"rememberExpiresAt": 1722364046,
"restricted": false,
"roles": [
"string"
],
"scrobbleTypes": "",
"services": [
{
"identifier": "metadata-dev",
"endpoint": "https://epg.provider.plex.tv",
"token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
"secret": "string",
"status": "online"
}
],
"subscription": {
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
},
"subscriptionDescription": "string",
"subscriptions": [
{
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
}
],
"thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
"title": "UsernameTitle",
"trials": [
{}
],
"twoFactorEnabled": false,
"username": "Username",
"uuid": "dae343c1f45beb4f"
} | \ No newline at end of file diff --git a/docs/models/operations/GetUserDetailsStatus.md b/docs/models/operations/GetTokenDetailsStatus.md similarity index 82% rename from docs/models/operations/GetUserDetailsStatus.md rename to docs/models/operations/GetTokenDetailsStatus.md index 62cef4ac..94e900d1 100644 --- a/docs/models/operations/GetUserDetailsStatus.md +++ b/docs/models/operations/GetTokenDetailsStatus.md @@ -1,4 +1,4 @@ -# GetUserDetailsStatus +# GetTokenDetailsStatus ## Values diff --git a/docs/models/operations/GetUserDetailsSubscription.md b/docs/models/operations/GetTokenDetailsSubscription.md similarity index 50% rename from docs/models/operations/GetUserDetailsSubscription.md rename to docs/models/operations/GetTokenDetailsSubscription.md index 6ed58907..870177b6 100644 --- a/docs/models/operations/GetUserDetailsSubscription.md +++ b/docs/models/operations/GetTokenDetailsSubscription.md @@ -1,13 +1,13 @@ -# GetUserDetailsSubscription +# GetTokenDetailsSubscription ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `features` | List<[GetUserDetailsFeatures](../../models/operations/GetUserDetailsFeatures.md)> | :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/GetUserDetailsAuthenticationResponseStatus.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 +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `features` | List<[GetTokenDetailsFeatures](../../models/operations/GetTokenDetailsFeatures.md)> | :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/GetUserDetailsUserPlexAccount.md b/docs/models/operations/GetTokenDetailsUserPlexAccount.md similarity index 98% rename from docs/models/operations/GetUserDetailsUserPlexAccount.md rename to docs/models/operations/GetTokenDetailsUserPlexAccount.md index e4315b77..40521ffa 100644 --- a/docs/models/operations/GetUserDetailsUserPlexAccount.md +++ b/docs/models/operations/GetTokenDetailsUserPlexAccount.md @@ -1,4 +1,4 @@ -# GetUserDetailsUserPlexAccount +# GetTokenDetailsUserPlexAccount Logged in user details @@ -26,7 +26,7 @@ Logged in user details | `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` | *int* | :heavy_check_mark: | Unix epoch datetime the account joined Plex | 1721154902 | +| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 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 | | @@ -34,14 +34,14 @@ Logged in user details | ~~`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` | *int* | :heavy_check_mark: | Unix epoch datetime the authtoken expires | 1722364046 | +| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 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<[GetUserDetailsSubscription](../../models/operations/GetUserDetailsSubscription.md)> | :heavy_check_mark: | N/A | | +| `subscriptions` | List<[GetTokenDetailsSubscription](../../models/operations/GetTokenDetailsSubscription.md)> | :heavy_check_mark: | 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 | | diff --git a/docs/models/operations/GetUserDetailsRequest.md b/docs/models/operations/GetUserDetailsRequest.md deleted file mode 100644 index 47b1819b..00000000 --- a/docs/models/operations/GetUserDetailsRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetUserDetailsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `xPlexToken` | *String* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/PastSubscription.md b/docs/models/operations/PastSubscription.md index a4d2adb2..e70ebc66 100644 --- a/docs/models/operations/PastSubscription.md +++ b/docs/models/operations/PastSubscription.md @@ -7,8 +7,8 @@ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `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 | +| `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 | diff --git a/docs/models/operations/PostUsersSignInDataRequestBody.md b/docs/models/operations/PostUsersSignInDataRequestBody.md index f922e3e4..647ac22d 100644 --- a/docs/models/operations/PostUsersSignInDataRequestBody.md +++ b/docs/models/operations/PostUsersSignInDataRequestBody.md @@ -9,4 +9,5 @@ Login credentials | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | | `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 | | \ No newline at end of file +| `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/PostUsersSignInDataUserPlexAccount.md b/docs/models/operations/PostUsersSignInDataUserPlexAccount.md index eb21bace..a5fd0808 100644 --- a/docs/models/operations/PostUsersSignInDataUserPlexAccount.md +++ b/docs/models/operations/PostUsersSignInDataUserPlexAccount.md @@ -26,7 +26,7 @@ Returns the user account data with a valid auth token | `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` | *int* | :heavy_check_mark: | Unix epoch datetime the account joined Plex | 1721154902 | +| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 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 | | @@ -34,7 +34,7 @@ Returns the user account data with a valid auth token | ~~`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` | *int* | :heavy_check_mark: | Unix epoch datetime the authtoken expires | 1722364046 | +| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 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 | | diff --git a/docs/models/operations/Services.md b/docs/models/operations/Services.md index 5c604faa..9c5047f1 100644 --- a/docs/models/operations/Services.md +++ b/docs/models/operations/Services.md @@ -3,10 +3,10 @@ ## 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` | [GetUserDetailsStatus](../../models/operations/GetUserDetailsStatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file +| 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/Subscription.md b/docs/models/operations/Subscription.md index 8a04f4fb..6f671dd0 100644 --- a/docs/models/operations/Subscription.md +++ b/docs/models/operations/Subscription.md @@ -5,11 +5,11 @@ If the account’s Plex Pass subscription is active ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `features` | List<[Features](../../models/operations/Features.md)> | :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/GetUserDetailsAuthenticationStatus.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 +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `features` | List<[Features](../../models/operations/Features.md)> | :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/sdks/activities/README.md b/docs/sdks/activities/README.md index bdeb1fb5..12216892 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -46,7 +46,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerActivitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -69,7 +72,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetServerActivitiesResponseBody | 401 | application/json | +| models/errors/GetServerActivitiesBadRequest | 400 | application/json | +| models/errors/GetServerActivitiesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -101,7 +105,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.CancelServerActivitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -130,5 +137,6 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| models/errors/CancelServerActivitiesResponseBody | 401 | application/json | +| models/errors/CancelServerActivitiesBadRequest | 400 | application/json | +| models/errors/CancelServerActivitiesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index fc9c61a4..cd3e88ee 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -8,10 +8,10 @@ API Calls regarding authentication for Plex Media Server ### Available Operations -* [getTransientToken](#gettransienttoken) - Get a Transient Token. +* [getTransientToken](#gettransienttoken) - Get a Transient Token * [getSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information -* [getUserDetails](#getuserdetails) - Get User Data By Token -* [postUsersSignInData](#postuserssignindata) - Get User SignIn Data +* [getTokenDetails](#gettokendetails) - Get Token Details +* [postUsersSignInData](#postuserssignindata) - Get User Sign In Data ## getTransientToken @@ -45,7 +45,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.GetTransientTokenResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -75,7 +78,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetTransientTokenResponseBody | 401 | application/json | +| models/errors/GetTransientTokenBadRequest | 400 | application/json | +| models/errors/GetTransientTokenUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -109,7 +113,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.GetSourceConnectionInformationResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -138,11 +145,12 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| models/errors/GetSourceConnectionInformationResponseBody | 401 | application/json | +| models/errors/GetSourceConnectionInformationBadRequest | 400 | application/json | +| models/errors/GetSourceConnectionInformationUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | -## getUserDetails +## getTokenDetails Get the User data from the provided X-Plex-Token @@ -153,7 +161,7 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetUserDetailsResponse; +import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse; import java.lang.Exception; public class Application { @@ -165,14 +173,16 @@ public class Application { .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") .build(); - GetUserDetailsResponse res = sdk.authentication().getUserDetails() - .xPlexToken("CV5xoxjTpFKUzBTShsaf") + GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() .call(); if (res.userPlexAccount().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetUserDetailsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -189,21 +199,21 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `xPlexToken` | *String* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | ### Response -**[GetUserDetailsResponse](../../models/operations/GetUserDetailsResponse.md)** +**[GetTokenDetailsResponse](../../models/operations/GetTokenDetailsResponse.md)** ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetUserDetailsResponseBody | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| models/errors/GetTokenDetailsBadRequest | 400 | application/json | +| models/errors/GetTokenDetailsUnauthorized | 401 | application/json | +| models/errors/SDKError | 4xx-5xx | \*\/* | ## postUsersSignInData @@ -234,13 +244,17 @@ public class Application { .requestBody(PostUsersSignInDataRequestBody.builder() .login("username@email.com") .password("password123") + .verificationCode("123456") .build()) .call(); if (res.userPlexAccount().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.PostUsersSignInDataResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -271,5 +285,6 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/PostUsersSignInDataResponseBody | 401 | application/json | +| models/errors/PostUsersSignInDataBadRequest | 400 | application/json | +| models/errors/PostUsersSignInDataUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index 589271e8..49b94b10 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -43,7 +43,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetButlerTasksResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -66,7 +69,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetButlerTasksResponseBody | 401 | application/json | +| models/errors/GetButlerTasksBadRequest | 400 | application/json | +| models/errors/GetButlerTasksUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -102,7 +106,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.StartAllTasksResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.StartAllTasksBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -125,7 +132,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/StartAllTasksResponseBody | 401 | application/json | +| models/errors/StartAllTasksBadRequest | 400 | application/json | +| models/errors/StartAllTasksUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -157,7 +165,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.StopAllTasksResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.StopAllTasksBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -180,7 +191,8 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/StopAllTasksResponseBody | 401 | application/json | +| models/errors/StopAllTasksBadRequest | 400 | application/json | +| models/errors/StopAllTasksUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -218,7 +230,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.StartTaskResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.StartTaskBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.StartTaskUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -247,7 +262,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| models/errors/StartTaskResponseBody | 401 | application/json | +| models/errors/StartTaskBadRequest | 400 | application/json | +| models/errors/StartTaskUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -281,7 +297,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.StopTaskResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.StopTaskBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.StopTaskUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -310,5 +329,6 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| models/errors/StopTaskResponseBody | 401 | application/json | +| models/errors/StopTaskBadRequest | 400 | application/json | +| models/errors/StopTaskUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index f8d9b7d6..b036e748 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -43,7 +43,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetGlobalHubsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -73,7 +76,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetGlobalHubsResponseBody | 401 | application/json | +| models/errors/GetGlobalHubsBadRequest | 400 | application/json | +| models/errors/GetGlobalHubsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -111,7 +115,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetLibraryHubsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -142,5 +149,6 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetLibraryHubsResponseBody | 401 | application/json | +| models/errors/GetLibraryHubsBadRequest | 400 | application/json | +| models/errors/GetLibraryHubsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 7224a782..1ed64fa6 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -50,7 +50,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.GetFileHashResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetFileHashBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetFileHashUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -80,7 +83,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetFileHashResponseBody | 401 | application/json | +| models/errors/GetFileHashBadRequest | 400 | application/json | +| models/errors/GetFileHashUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -116,7 +120,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetRecentlyAddedResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -146,7 +153,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetRecentlyAddedResponseBody | 401 | application/json | +| models/errors/GetRecentlyAddedBadRequest | 400 | application/json | +| models/errors/GetRecentlyAddedUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -185,7 +193,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetAllLibrariesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -208,7 +219,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetAllLibrariesResponseBody | 401 | application/json | +| models/errors/GetAllLibrariesBadRequest | 400 | application/json | +| models/errors/GetAllLibrariesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -283,7 +295,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetLibraryDetailsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -313,7 +328,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetLibraryDetailsResponseBody | 401 | application/json | +| models/errors/GetLibraryDetailsBadRequest | 400 | application/json | +| models/errors/GetLibraryDetailsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -345,7 +361,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.DeleteLibraryResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -374,7 +393,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/DeleteLibraryResponseBody | 401 | application/json | +| models/errors/DeleteLibraryBadRequest | 400 | application/json | +| models/errors/DeleteLibraryUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -443,7 +463,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetLibraryItemsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -472,7 +495,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetLibraryItemsResponseBody | 401 | application/json | +| models/errors/GetLibraryItemsBadRequest | 400 | application/json | +| models/errors/GetLibraryItemsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -507,7 +531,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -537,7 +564,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| models/errors/GetRefreshLibraryMetadataResponseBody | 401 | application/json | +| models/errors/GetRefreshLibraryMetadataBadRequest | 400 | application/json | +| models/errors/GetRefreshLibraryMetadataUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -591,7 +619,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetSearchLibraryResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -621,7 +652,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetSearchLibraryResponseBody | 401 | application/json | +| models/errors/GetSearchLibraryBadRequest | 400 | application/json | +| models/errors/GetSearchLibraryUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -656,7 +688,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -685,7 +720,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| models/errors/GetMetaDataByRatingKeyResponseBody | 401 | application/json | +| models/errors/GetMetaDataByRatingKeyBadRequest | 400 | application/json | +| models/errors/GetMetaDataByRatingKeyUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -721,7 +757,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetMetadataChildrenResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -751,7 +790,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetMetadataChildrenResponseBody | 401 | application/json | +| models/errors/GetMetadataChildrenBadRequest | 400 | application/json | +| models/errors/GetMetadataChildrenUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -788,7 +828,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetTopWatchedContentResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -818,7 +861,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/GetTopWatchedContentResponseBody | 401 | application/json | +| models/errors/GetTopWatchedContentBadRequest | 400 | application/json | +| models/errors/GetTopWatchedContentUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -852,7 +896,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetOnDeckResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetOnDeckBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -875,5 +922,6 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| models/errors/GetOnDeckResponseBody | 401 | application/json | +| models/errors/GetOnDeckBadRequest | 400 | application/json | +| models/errors/GetOnDeckUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index f539f6f2..5f3d5de0 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -44,7 +44,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.LogLineResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.LogLineBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.LogLineUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -75,7 +78,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | -| models/errors/LogLineResponseBody | 401 | application/json | +| models/errors/LogLineBadRequest | 400 | application/json | +| models/errors/LogLineUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -125,14 +129,17 @@ public class Application { .build(); String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman -level=1&message=Test%20message%203&source=postman"; + level=1&message=Test%20message%203&source=postman"; LogMultiLineResponse res = sdk.log().logMultiLine() .request(req) .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.LogMultiLineResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.LogMultiLineBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -161,7 +168,8 @@ level=1&message=Test%20message%203&source=postman"; | Error Object | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/LogMultiLineResponseBody | 401 | application/json | +| models/errors/LogMultiLineBadRequest | 400 | application/json | +| models/errors/LogMultiLineUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -193,7 +201,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.EnablePaperTrailResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -216,5 +227,6 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/EnablePaperTrailResponseBody | 401 | application/json | +| models/errors/EnablePaperTrailBadRequest | 400 | application/json | +| models/errors/EnablePaperTrailUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 4ce7f845..4477283a 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -42,7 +42,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.MarkPlayedResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.MarkPlayedBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -71,7 +74,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| models/errors/MarkPlayedResponseBody | 401 | application/json | +| models/errors/MarkPlayedBadRequest | 400 | application/json | +| models/errors/MarkPlayedUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -103,7 +107,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.MarkUnplayedResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -132,7 +139,8 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/MarkUnplayedResponseBody | 401 | application/json | +| models/errors/MarkUnplayedBadRequest | 400 | application/json | +| models/errors/MarkUnplayedUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -167,7 +175,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.UpdatePlayProgressResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -198,7 +209,8 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| models/errors/UpdatePlayProgressResponseBody | 401 | application/json | +| models/errors/UpdatePlayProgressBadRequest | 400 | application/json | +| models/errors/UpdatePlayProgressUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -242,7 +254,10 @@ public class Application { if (res.responseStream().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetBannerImageResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetBannerImageBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -271,7 +286,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetBannerImageResponseBody | 401 | application/json | +| models/errors/GetBannerImageBadRequest | 400 | application/json | +| models/errors/GetBannerImageUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -315,7 +331,10 @@ public class Application { if (res.responseStream().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetThumbImageResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetThumbImageBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -344,5 +363,6 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetThumbImageResponseBody | 401 | application/json | +| models/errors/GetThumbImageBadRequest | 400 | application/json | +| models/errors/GetThumbImageUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 29fcdc0a..08c9779c 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -54,7 +54,7 @@ public class Application { .title("") .type(CreatePlaylistQueryParamType.PHOTO) .smart(Smart.ONE) - .uri("") + .uri("https://inborn-brochure.biz") .build(); CreatePlaylistResponse res = sdk.playlists().createPlaylist() @@ -64,7 +64,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.CreatePlaylistResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -93,7 +96,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/CreatePlaylistResponseBody | 401 | application/json | +| models/errors/CreatePlaylistBadRequest | 400 | application/json | +| models/errors/CreatePlaylistUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -130,7 +134,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetPlaylistsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -160,7 +167,8 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/GetPlaylistsResponseBody | 401 | application/json | +| models/errors/GetPlaylistsBadRequest | 400 | application/json | +| models/errors/GetPlaylistsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -196,7 +204,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetPlaylistResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetPlaylistBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -225,7 +236,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetPlaylistResponseBody | 401 | application/json | +| models/errors/GetPlaylistBadRequest | 400 | application/json | +| models/errors/GetPlaylistUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -258,7 +270,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.DeletePlaylistResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -287,7 +302,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/DeletePlaylistResponseBody | 401 | application/json | +| models/errors/DeletePlaylistBadRequest | 400 | application/json | +| models/errors/DeletePlaylistUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -322,7 +338,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.UpdatePlaylistResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -353,7 +372,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/UpdatePlaylistResponseBody | 401 | application/json | +| models/errors/UpdatePlaylistBadRequest | 400 | application/json | +| models/errors/UpdatePlaylistUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -393,7 +413,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetPlaylistContentsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -423,7 +446,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetPlaylistContentsResponseBody | 401 | application/json | +| models/errors/GetPlaylistContentsBadRequest | 400 | application/json | +| models/errors/GetPlaylistContentsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -456,7 +480,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.ClearPlaylistContentsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -485,7 +512,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| models/errors/ClearPlaylistContentsResponseBody | 401 | application/json | +| models/errors/ClearPlaylistContentsBadRequest | 400 | application/json | +| models/errors/ClearPlaylistContentsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -523,7 +551,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.AddPlaylistContentsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -554,7 +585,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/AddPlaylistContentsResponseBody | 401 | application/json | +| models/errors/AddPlaylistContentsBadRequest | 400 | application/json | +| models/errors/AddPlaylistContentsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -589,7 +621,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.UploadPlaylistResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -619,5 +654,6 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/UploadPlaylistResponseBody | 401 | application/json | +| models/errors/UploadPlaylistBadRequest | 400 | application/json | +| models/errors/UploadPlaylistUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 5cd22b35..1510b412 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -45,7 +45,10 @@ public class Application { if (res.responseBodies().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetCompanionsDataResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -74,7 +77,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetCompanionsDataResponseBody | 401 | application/json | +| models/errors/GetCompanionsDataBadRequest | 400 | application/json | +| models/errors/GetCompanionsDataUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -107,7 +111,10 @@ public class Application { if (res.friends().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetUserFriendsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -136,7 +143,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetUserFriendsResponseBody | 401 | application/json | +| models/errors/GetUserFriendsBadRequest | 400 | application/json | +| models/errors/GetUserFriendsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -168,7 +176,10 @@ public class Application { if (res.geoData().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetGeoDataResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetGeoDataBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -197,7 +208,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| models/errors/GetGeoDataResponseBody | 401 | application/json | +| models/errors/GetGeoDataBadRequest | 400 | application/json | +| models/errors/GetGeoDataUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -230,7 +242,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetHomeDataResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetHomeDataBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -253,7 +268,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetHomeDataResponseBody | 401 | application/json | +| models/errors/GetHomeDataBadRequest | 400 | application/json | +| models/errors/GetHomeDataUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -268,7 +284,6 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; 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.IncludeHttps; import dev.plexapi.sdk.models.operations.IncludeIPv6; @@ -284,21 +299,20 @@ public class Application { .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") .build(); - GetServerResourcesRequest req = GetServerResourcesRequest.builder() - .xPlexToken("CV5xoxjTpFKUzBTShsaf") + GetServerResourcesResponse res = sdk.plex().getServerResources() + .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") .includeHttps(IncludeHttps.ONE) .includeRelay(IncludeRelay.ONE) .includeIPv6(IncludeIPv6.ONE) - .build(); - - GetServerResourcesResponse res = sdk.plex().getServerResources() - .request(req) .call(); if (res.plexDevices().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerResourcesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -315,10 +329,13 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `request` | [GetServerResourcesRequest](../../models/operations/GetServerResourcesRequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | +| `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 | +| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response @@ -328,7 +345,8 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| models/errors/GetServerResourcesResponseBody | 401 | application/json | +| models/errors/GetServerResourcesBadRequest | 400 | application/json | +| models/errors/GetServerResourcesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -363,7 +381,7 @@ public class Application { if (res.authPinContainer().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetPinResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetPinBadRequest e) { // handle exception throw e; } catch (SDKError e) { @@ -393,10 +411,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| models/errors/GetPinResponseBody | 400 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models/errors/GetPinBadRequest | 400 | application/json | +| models/errors/SDKError | 4xx-5xx | \*\/* | ## getTokenByPinId @@ -429,10 +447,10 @@ public class Application { if (res.authPinContainer().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest e) { // handle exception throw e; - } catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdPlexResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody e) { // handle exception throw e; } catch (SDKError e) { @@ -461,8 +479,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetTokenByPinIdResponseBody | 400 | application/json | -| models/errors/GetTokenByPinIdPlexResponseBody | 404 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| models/errors/GetTokenByPinIdBadRequest | 400 | application/json | +| models/errors/GetTokenByPinIdResponseBody | 404 | application/json | +| models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index a5558aad..d6cf5e80 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -54,7 +54,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.PerformSearchResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.PerformSearchBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.PerformSearchUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -85,7 +88,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/PerformSearchResponseBody | 401 | application/json | +| models/errors/PerformSearchBadRequest | 400 | application/json | +| models/errors/PerformSearchUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -123,7 +127,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.PerformVoiceSearchResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -154,7 +161,8 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| models/errors/PerformVoiceSearchResponseBody | 401 | application/json | +| models/errors/PerformVoiceSearchBadRequest | 400 | application/json | +| models/errors/PerformVoiceSearchUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -188,7 +196,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetSearchResultsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -217,5 +228,6 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetSearchResultsResponseBody | 401 | application/json | +| models/errors/GetSearchResultsBadRequest | 400 | application/json | +| models/errors/GetSearchResultsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index b7287152..d29eb22f 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -47,7 +47,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -70,7 +73,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| models/errors/GetServerCapabilitiesResponseBody | 401 | application/json | +| models/errors/GetServerCapabilitiesBadRequest | 400 | application/json | +| models/errors/GetServerCapabilitiesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -103,7 +107,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerPreferencesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -126,7 +133,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/GetServerPreferencesResponseBody | 401 | application/json | +| models/errors/GetServerPreferencesBadRequest | 400 | application/json | +| models/errors/GetServerPreferencesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -159,7 +167,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetAvailableClientsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -182,7 +193,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetAvailableClientsResponseBody | 401 | application/json | +| models/errors/GetAvailableClientsBadRequest | 400 | application/json | +| models/errors/GetAvailableClientsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -215,7 +227,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetDevicesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetDevicesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetDevicesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -238,7 +253,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| models/errors/GetDevicesResponseBody | 401 | application/json | +| models/errors/GetDevicesBadRequest | 400 | application/json | +| models/errors/GetDevicesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -270,7 +286,7 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerIdentityResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout e) { // handle exception throw e; } catch (SDKError e) { @@ -291,10 +307,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetServerIdentityResponseBody | 408 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| models/errors/GetServerIdentityRequestTimeout | 408 | application/json | +| models/errors/SDKError | 4xx-5xx | \*\/* | ## getMyPlexAccount @@ -326,7 +342,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -349,7 +368,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetMyPlexAccountResponseBody | 401 | application/json | +| models/errors/GetMyPlexAccountBadRequest | 400 | application/json | +| models/errors/GetMyPlexAccountUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -383,7 +403,7 @@ public class Application { GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() .width(110d) .height(165d) - .opacity(643869L) + .opacity(100L) .blur(4000d) .minSize(MinSize.ZERO) .upscale(Upscale.ZERO) @@ -395,7 +415,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.GetResizedPhotoResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -424,7 +447,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetResizedPhotoResponseBody | 401 | application/json | +| models/errors/GetResizedPhotoBadRequest | 400 | application/json | +| models/errors/GetResizedPhotoUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -458,7 +482,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetMediaProvidersResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -487,7 +514,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetMediaProvidersResponseBody | 401 | application/json | +| models/errors/GetMediaProvidersBadRequest | 400 | application/json | +| models/errors/GetMediaProvidersUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -520,7 +548,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetServerListResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetServerListBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetServerListUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -543,5 +574,6 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetServerListResponseBody | 401 | application/json | +| models/errors/GetServerListBadRequest | 400 | application/json | +| models/errors/GetServerListUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 68c16e1a..b029ca70 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -42,7 +42,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetSessionsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetSessionsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetSessionsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -65,7 +68,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetSessionsResponseBody | 401 | application/json | +| models/errors/GetSessionsBadRequest | 400 | application/json | +| models/errors/GetSessionsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -104,7 +108,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetSessionHistoryResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -136,7 +143,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetSessionHistoryResponseBody | 401 | application/json | +| models/errors/GetSessionHistoryBadRequest | 400 | application/json | +| models/errors/GetSessionHistoryUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -169,7 +177,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -192,7 +203,8 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/GetTranscodeSessionsResponseBody | 401 | application/json | +| models/errors/GetTranscodeSessionsBadRequest | 400 | application/json | +| models/errors/GetTranscodeSessionsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -224,7 +236,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -253,5 +268,6 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/StopTranscodeSessionResponseBody | 401 | application/json | +| models/errors/StopTranscodeSessionBadRequest | 400 | application/json | +| models/errors/StopTranscodeSessionUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index 950746ee..2d9ba02d 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -42,7 +42,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetStatisticsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetStatisticsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -71,7 +74,8 @@ public class Application { | Error Object | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetStatisticsResponseBody | 401 | application/json | +| models/errors/GetStatisticsBadRequest | 400 | application/json | +| models/errors/GetStatisticsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -105,7 +109,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetResourcesStatisticsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -134,7 +141,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| models/errors/GetResourcesStatisticsResponseBody | 401 | application/json | +| models/errors/GetResourcesStatisticsBadRequest | 400 | application/json | +| models/errors/GetResourcesStatisticsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -168,7 +176,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetBandwidthStatisticsResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -197,5 +208,6 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| models/errors/GetBandwidthStatisticsResponseBody | 401 | application/json | +| models/errors/GetBandwidthStatisticsBadRequest | 400 | application/json | +| models/errors/GetBandwidthStatisticsUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index 9329525d..cab21ca7 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -42,7 +42,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetUpdateStatusResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -65,7 +68,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetUpdateStatusResponseBody | 401 | application/json | +| models/errors/GetUpdateStatusBadRequest | 400 | application/json | +| models/errors/GetUpdateStatusUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -98,7 +102,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.CheckForUpdatesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -127,7 +134,8 @@ public class Application { | Error Object | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/CheckForUpdatesResponseBody | 401 | application/json | +| models/errors/CheckForUpdatesBadRequest | 400 | application/json | +| models/errors/CheckForUpdatesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -163,7 +171,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.ApplyUpdatesResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -193,5 +204,6 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/ApplyUpdatesResponseBody | 401 | application/json | +| models/errors/ApplyUpdatesBadRequest | 400 | application/json | +| models/errors/ApplyUpdatesUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 18a26609..2591bd06 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -54,7 +54,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.GetTimelineResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetTimelineBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetTimelineUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -83,7 +86,8 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetTimelineResponseBody | 401 | application/json | +| models/errors/GetTimelineBadRequest | 400 | application/json | +| models/errors/GetTimelineUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | @@ -135,7 +139,10 @@ public class Application { .call(); // handle response - } catch (dev.plexapi.sdk.models.errors.StartUniversalTranscodeResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -164,5 +171,6 @@ public class Application { | Error Object | Status Code | Content Type | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| models/errors/StartUniversalTranscodeResponseBody | 401 | application/json | +| models/errors/StartUniversalTranscodeBadRequest | 400 | application/json | +| models/errors/StartUniversalTranscodeUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index ae4e96fd..2719b72b 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -49,7 +49,10 @@ public class Application { if (res.object().isPresent()) { // handle response } - } catch (dev.plexapi.sdk.models.errors.GetWatchListResponseBody e) { + } catch (dev.plexapi.sdk.models.errors.GetWatchListBadRequest e) { + // handle exception + throw e; + } catch (dev.plexapi.sdk.models.errors.GetWatchListUnauthorized e) { // handle exception throw e; } catch (SDKError e) { @@ -79,5 +82,6 @@ public class Application { | Error Object | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/GetWatchListResponseBody | 401 | application/json | +| models/errors/GetWatchListBadRequest | 400 | application/json | +| models/errors/GetWatchListUnauthorized | 401 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..6689b85b 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,92 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/java/dev/plexapi/sdk/Activities.java b/src/main/java/dev/plexapi/sdk/Activities.java index ec833cad..fda6805e 100644 --- a/src/main/java/dev/plexapi/sdk/Activities.java +++ b/src/main/java/dev/plexapi/sdk/Activities.java @@ -5,7 +5,10 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.CancelServerActivitiesResponseBody; +import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest; +import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized; +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.CancelServerActivitiesRequest; import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequestBuilder; @@ -147,19 +150,11 @@ public class Activities implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetServerActivitiesResponseBody _out = Utils.mapper().readValue( + GetServerActivitiesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -171,6 +166,30 @@ public class Activities implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetServerActivitiesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -277,19 +296,11 @@ public class Activities implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - CancelServerActivitiesResponseBody _out = Utils.mapper().readValue( + CancelServerActivitiesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -301,6 +312,30 @@ public class Activities implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + CancelServerActivitiesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Authentication.java b/src/main/java/dev/plexapi/sdk/Authentication.java index 0e1393eb..d8bd9e54 100644 --- a/src/main/java/dev/plexapi/sdk/Authentication.java +++ b/src/main/java/dev/plexapi/sdk/Authentication.java @@ -5,22 +5,25 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationResponseBody; -import dev.plexapi.sdk.models.errors.GetTransientTokenResponseBody; -import dev.plexapi.sdk.models.errors.GetUserDetailsResponseBody; -import dev.plexapi.sdk.models.errors.PostUsersSignInDataResponseBody; +import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest; +import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized; +import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest; +import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized; +import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest; +import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized; +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.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.GetTokenDetailsUserPlexAccount; 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.GetUserDetailsRequest; -import dev.plexapi.sdk.models.operations.GetUserDetailsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetUserDetailsResponse; -import dev.plexapi.sdk.models.operations.GetUserDetailsUserPlexAccount; import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest; import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody; import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder; @@ -53,21 +56,21 @@ import java.util.Optional; public class Authentication implements MethodCallGetTransientToken, MethodCallGetSourceConnectionInformation, - MethodCallGetUserDetails, + MethodCallGetTokenDetails, MethodCallPostUsersSignInData { /** - * GET_USER_DETAILS_SERVERS contains the list of server urls available to the SDK. + * GET_TOKEN_DETAILS_SERVERS contains the list of server urls available to the SDK. */ - public static final String[] GET_USER_DETAILS_SERVERS = { - "https://plex.tv/api/v2", + public static final String[] GET_TOKEN_DETAILS_SERVERS = { + "https://plex.tv/api/v2/", }; /** * 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", + "https://plex.tv/api/v2/", }; private final SDKConfiguration sdkConfiguration; @@ -78,7 +81,7 @@ public class Authentication implements /** - * Get a Transient Token. + * 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 @@ -88,7 +91,7 @@ public class Authentication implements } /** - * Get a Transient Token. + * 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. @@ -182,19 +185,11 @@ public class Authentication implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetTransientTokenResponseBody _out = Utils.mapper().readValue( + GetTransientTokenBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -206,6 +201,30 @@ public class Authentication implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetTransientTokenUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -319,19 +338,11 @@ public class Authentication implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetSourceConnectionInformationResponseBody _out = Utils.mapper().readValue( + GetSourceConnectionInformationBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -343,6 +354,30 @@ public class Authentication implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetSourceConnectionInformationUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -353,44 +388,34 @@ public class Authentication implements /** - * Get User Data By Token + * Get Token Details * Get the User data from the provided X-Plex-Token * @return The call builder */ - public GetUserDetailsRequestBuilder getUserDetails() { - return new GetUserDetailsRequestBuilder(this); + public GetTokenDetailsRequestBuilder getTokenDetails() { + return new GetTokenDetailsRequestBuilder(this); } /** - * Get User Data By Token + * Get Token Details * Get the User data from the provided X-Plex-Token - * @param xPlexToken Plex Authentication Token * @return The response from the API call * @throws Exception if the API call fails */ - public GetUserDetailsResponse getUserDetails( - String xPlexToken) throws Exception { - return getUserDetails(xPlexToken, Optional.empty()); + public GetTokenDetailsResponse getTokenDetailsDirect() throws Exception { + return getTokenDetails(Optional.empty()); } /** - * Get User Data By Token + * Get Token Details * Get the User data from the provided X-Plex-Token - * @param xPlexToken Plex Authentication Token * @param serverURL Overrides the server URL. * @return The response from the API call * @throws Exception if the API call fails */ - public GetUserDetailsResponse getUserDetails( - String xPlexToken, + public GetTokenDetailsResponse getTokenDetails( Optional serverURL) throws Exception { - GetUserDetailsRequest request = - GetUserDetailsRequest - .builder() - .xPlexToken(xPlexToken) - .build(); - - String _baseUrl = Utils.templateUrl(GET_USER_DETAILS_SERVERS[0], new HashMap()); + String _baseUrl = Utils.templateUrl(GET_TOKEN_DETAILS_SERVERS[0], new HashMap()); if (serverURL.isPresent() && !serverURL.get().isBlank()) { _baseUrl = serverURL.get(); } @@ -403,11 +428,6 @@ public class Authentication implements .addHeader("user-agent", this.sdkConfiguration.userAgent); - _req.addQueryParams(Utils.getQueryParams( - GetUserDetailsRequest.class, - request, - this.sdkConfiguration.globals)); - Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -416,7 +436,7 @@ public class Authentication implements sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( - "getUserDetails", + "getTokenDetails", Optional.of(List.of()), sdkConfiguration.securitySource()), _req.build()); @@ -427,7 +447,7 @@ public class Authentication implements _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( - "getUserDetails", + "getTokenDetails", Optional.of(List.of()), sdkConfiguration.securitySource()), Optional.of(_httpRes), @@ -436,7 +456,7 @@ public class Authentication implements _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( - "getUserDetails", + "getTokenDetails", Optional.of(List.of()), sdkConfiguration.securitySource()), _httpRes); @@ -445,7 +465,7 @@ public class Authentication implements _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( - "getUserDetails", + "getTokenDetails", Optional.of(List.of()), sdkConfiguration.securitySource()), Optional.empty(), @@ -455,20 +475,20 @@ public class Authentication implements .headers() .firstValue("Content-Type") .orElse("application/octet-stream"); - GetUserDetailsResponse.Builder _resBuilder = - GetUserDetailsResponse + GetTokenDetailsResponse.Builder _resBuilder = + GetTokenDetailsResponse .builder() .contentType(_contentType) .statusCode(_httpRes.statusCode()) .rawResponse(_httpRes); - GetUserDetailsResponse _res = _resBuilder.build(); + GetTokenDetailsResponse _res = _resBuilder.build(); if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetUserDetailsUserPlexAccount _out = Utils.mapper().readValue( + GetTokenDetailsUserPlexAccount _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _res.withUserPlexAccount(Optional.ofNullable(_out)); return _res; } else { @@ -479,19 +499,11 @@ public class Authentication implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetUserDetailsResponseBody _out = Utils.mapper().readValue( + GetTokenDetailsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -503,6 +515,30 @@ public class Authentication implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetTokenDetailsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -513,7 +549,7 @@ public class Authentication implements /** - * Get User SignIn Data + * Get User Sign In Data * Sign in user with username and password and return user data with Plex authentication token * @return The call builder */ @@ -522,7 +558,7 @@ public class Authentication implements } /** - * Get User SignIn Data + * Get User Sign In Data * Sign in user with username and password and return user data with Plex authentication token * @return The response from the API call * @throws Exception if the API call fails @@ -532,7 +568,7 @@ public class Authentication implements } /** - * Get User SignIn Data + * Get User Sign In Data * Sign in user with username and password and return user data with Plex authentication token * @param xPlexClientIdentifier The unique identifier for the client application This is used to track the client application and its usage @@ -650,19 +686,11 @@ public class Authentication implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - PostUsersSignInDataResponseBody _out = Utils.mapper().readValue( + PostUsersSignInDataBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -674,6 +702,30 @@ public class Authentication implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + PostUsersSignInDataUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Butler.java b/src/main/java/dev/plexapi/sdk/Butler.java index c6b40bc1..91693074 100644 --- a/src/main/java/dev/plexapi/sdk/Butler.java +++ b/src/main/java/dev/plexapi/sdk/Butler.java @@ -5,11 +5,17 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; +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.errors.StartAllTasksResponseBody; -import dev.plexapi.sdk.models.errors.StartTaskResponseBody; -import dev.plexapi.sdk.models.errors.StopAllTasksResponseBody; -import dev.plexapi.sdk.models.errors.StopTaskResponseBody; +import dev.plexapi.sdk.models.errors.StartAllTasksBadRequest; +import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized; +import dev.plexapi.sdk.models.errors.StartTaskBadRequest; +import dev.plexapi.sdk.models.errors.StartTaskUnauthorized; +import dev.plexapi.sdk.models.errors.StopAllTasksBadRequest; +import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized; +import dev.plexapi.sdk.models.errors.StopTaskBadRequest; +import dev.plexapi.sdk.models.errors.StopTaskUnauthorized; import dev.plexapi.sdk.models.operations.GetButlerTasksRequestBuilder; import dev.plexapi.sdk.models.operations.GetButlerTasksResponse; import dev.plexapi.sdk.models.operations.GetButlerTasksResponseBody; @@ -156,19 +162,11 @@ public class Butler implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetButlerTasksResponseBody _out = Utils.mapper().readValue( + GetButlerTasksBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -180,6 +178,30 @@ public class Butler implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetButlerTasksUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -286,19 +308,11 @@ public class Butler implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - StartAllTasksResponseBody _out = Utils.mapper().readValue( + StartAllTasksBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -310,6 +324,30 @@ public class Butler implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + StartAllTasksUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -408,19 +446,11 @@ public class Butler implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - StopAllTasksResponseBody _out = Utils.mapper().readValue( + StopAllTasksBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -432,6 +462,30 @@ public class Butler implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + StopAllTasksUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -548,19 +602,11 @@ public class Butler implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - StartTaskResponseBody _out = Utils.mapper().readValue( + StartTaskBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -572,6 +618,30 @@ public class Butler implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + StartTaskUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -680,19 +750,11 @@ public class Butler implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - StopTaskResponseBody _out = Utils.mapper().readValue( + StopTaskBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -704,6 +766,30 @@ public class Butler implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + StopTaskUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Hubs.java b/src/main/java/dev/plexapi/sdk/Hubs.java index 63e68a0b..069e1672 100644 --- a/src/main/java/dev/plexapi/sdk/Hubs.java +++ b/src/main/java/dev/plexapi/sdk/Hubs.java @@ -5,6 +5,10 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest; +import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized; +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.GetGlobalHubsRequest; import dev.plexapi.sdk.models.operations.GetGlobalHubsRequestBuilder; @@ -171,19 +175,11 @@ public class Hubs implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetGlobalHubsResponseBody _out = Utils.mapper().readValue( + GetGlobalHubsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -195,6 +191,30 @@ public class Hubs implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetGlobalHubsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -338,19 +358,11 @@ public class Hubs implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetLibraryHubsResponseBody _out = Utils.mapper().readValue( + GetLibraryHubsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -362,6 +374,30 @@ public class Hubs implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetLibraryHubsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Library.java b/src/main/java/dev/plexapi/sdk/Library.java index e6735e84..570e6f48 100644 --- a/src/main/java/dev/plexapi/sdk/Library.java +++ b/src/main/java/dev/plexapi/sdk/Library.java @@ -5,9 +5,30 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.DeleteLibraryResponseBody; -import dev.plexapi.sdk.models.errors.GetFileHashResponseBody; -import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataResponseBody; +import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest; +import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized; +import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest; +import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized; +import dev.plexapi.sdk.models.errors.GetFileHashBadRequest; +import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized; +import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest; +import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized; +import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest; +import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized; +import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyBadRequest; +import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyUnauthorized; +import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest; +import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized; +import dev.plexapi.sdk.models.errors.GetOnDeckBadRequest; +import dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized; +import dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest; +import dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized; +import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest; +import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized; +import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest; +import dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized; +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.DeleteLibraryRequest; import dev.plexapi.sdk.models.operations.DeleteLibraryRequestBuilder; @@ -214,19 +235,11 @@ public class Library implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetFileHashResponseBody _out = Utils.mapper().readValue( + GetFileHashBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -238,6 +251,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetFileHashUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -380,19 +417,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetRecentlyAddedResponseBody _out = Utils.mapper().readValue( + GetRecentlyAddedBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -404,6 +433,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetRecentlyAddedUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -523,19 +576,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetAllLibrariesResponseBody _out = Utils.mapper().readValue( + GetAllLibrariesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -547,6 +592,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetAllLibrariesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -807,19 +876,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetLibraryDetailsResponseBody _out = Utils.mapper().readValue( + GetLibraryDetailsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -831,6 +892,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetLibraryDetailsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -939,19 +1024,11 @@ public class Library implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - DeleteLibraryResponseBody _out = Utils.mapper().readValue( + DeleteLibraryBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -963,6 +1040,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + DeleteLibraryUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1119,19 +1220,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetLibraryItemsResponseBody _out = Utils.mapper().readValue( + GetLibraryItemsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1143,6 +1236,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetLibraryItemsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1276,19 +1393,11 @@ public class Library implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetRefreshLibraryMetadataResponseBody _out = Utils.mapper().readValue( + GetRefreshLibraryMetadataBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1300,6 +1409,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetRefreshLibraryMetadataUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1469,19 +1602,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetSearchLibraryResponseBody _out = Utils.mapper().readValue( + GetSearchLibraryBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1493,6 +1618,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetSearchLibraryUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1612,19 +1761,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyResponseBody _out = Utils.mapper().readValue( + GetMetaDataByRatingKeyBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1636,6 +1777,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetMetaDataByRatingKeyUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1777,19 +1942,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetMetadataChildrenResponseBody _out = Utils.mapper().readValue( + GetMetadataChildrenBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1801,6 +1958,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetMetadataChildrenUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1952,19 +2133,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetTopWatchedContentResponseBody _out = Utils.mapper().readValue( + GetTopWatchedContentBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1976,6 +2149,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetTopWatchedContentUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -2085,19 +2282,11 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetOnDeckResponseBody _out = Utils.mapper().readValue( + GetOnDeckBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -2109,6 +2298,30 @@ public class Library implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetOnDeckUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Log.java b/src/main/java/dev/plexapi/sdk/Log.java index d08c5eed..0be2a085 100644 --- a/src/main/java/dev/plexapi/sdk/Log.java +++ b/src/main/java/dev/plexapi/sdk/Log.java @@ -5,9 +5,12 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.EnablePaperTrailResponseBody; -import dev.plexapi.sdk.models.errors.LogLineResponseBody; -import dev.plexapi.sdk.models.errors.LogMultiLineResponseBody; +import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest; +import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized; +import dev.plexapi.sdk.models.errors.LogLineBadRequest; +import dev.plexapi.sdk.models.errors.LogLineUnauthorized; +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.EnablePaperTrailRequestBuilder; import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse; @@ -165,19 +168,11 @@ public class Log implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - LogLineResponseBody _out = Utils.mapper().readValue( + LogLineBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -189,6 +184,30 @@ public class Log implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + LogLineUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -342,19 +361,11 @@ public class Log implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - LogMultiLineResponseBody _out = Utils.mapper().readValue( + LogMultiLineBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -366,6 +377,30 @@ public class Log implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + LogMultiLineUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -464,19 +499,11 @@ public class Log implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - EnablePaperTrailResponseBody _out = Utils.mapper().readValue( + EnablePaperTrailBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -488,6 +515,30 @@ public class Log implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + EnablePaperTrailUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Media.java b/src/main/java/dev/plexapi/sdk/Media.java index a9079ebb..cdcc2759 100644 --- a/src/main/java/dev/plexapi/sdk/Media.java +++ b/src/main/java/dev/plexapi/sdk/Media.java @@ -5,12 +5,17 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.GetBannerImageResponseBody; -import dev.plexapi.sdk.models.errors.GetThumbImageResponseBody; -import dev.plexapi.sdk.models.errors.MarkPlayedResponseBody; -import dev.plexapi.sdk.models.errors.MarkUnplayedResponseBody; +import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest; +import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized; +import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest; +import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized; +import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest; +import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized; +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.errors.UpdatePlayProgressResponseBody; +import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest; +import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized; import dev.plexapi.sdk.models.operations.GetBannerImageRequest; import dev.plexapi.sdk.models.operations.GetBannerImageRequestBuilder; import dev.plexapi.sdk.models.operations.GetBannerImageResponse; @@ -159,19 +164,11 @@ public class Media implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - MarkPlayedResponseBody _out = Utils.mapper().readValue( + MarkPlayedBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -183,6 +180,30 @@ public class Media implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + MarkPlayedUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -292,19 +313,11 @@ public class Media implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - MarkUnplayedResponseBody _out = Utils.mapper().readValue( + MarkUnplayedBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -316,6 +329,30 @@ public class Media implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + MarkUnplayedUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -433,19 +470,11 @@ public class Media implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - UpdatePlayProgressResponseBody _out = Utils.mapper().readValue( + UpdatePlayProgressBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -457,6 +486,30 @@ public class Media implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + UpdatePlayProgressUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -573,19 +626,11 @@ public class Media implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetBannerImageResponseBody _out = Utils.mapper().readValue( + GetBannerImageBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -597,6 +642,30 @@ public class Media implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetBannerImageUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -713,19 +782,11 @@ public class Media implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetThumbImageResponseBody _out = Utils.mapper().readValue( + GetThumbImageBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -737,6 +798,30 @@ public class Media implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetThumbImageUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Playlists.java b/src/main/java/dev/plexapi/sdk/Playlists.java index b22ea546..893e13ab 100644 --- a/src/main/java/dev/plexapi/sdk/Playlists.java +++ b/src/main/java/dev/plexapi/sdk/Playlists.java @@ -5,11 +5,25 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.ClearPlaylistContentsResponseBody; -import dev.plexapi.sdk.models.errors.DeletePlaylistResponseBody; +import dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest; +import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized; +import dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest; +import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized; +import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest; +import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized; +import dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest; +import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized; +import dev.plexapi.sdk.models.errors.GetPlaylistBadRequest; +import dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest; +import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized; +import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized; +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.errors.UpdatePlaylistResponseBody; -import dev.plexapi.sdk.models.errors.UploadPlaylistResponseBody; +import dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest; +import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized; +import dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest; +import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized; import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequest; import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequestBuilder; import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse; @@ -198,19 +212,11 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.CreatePlaylistResponseBody _out = Utils.mapper().readValue( + CreatePlaylistBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -222,6 +228,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + CreatePlaylistUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -355,19 +385,11 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetPlaylistsResponseBody _out = Utils.mapper().readValue( + GetPlaylistsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -379,6 +401,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetPlaylistsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -500,19 +546,11 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetPlaylistResponseBody _out = Utils.mapper().readValue( + GetPlaylistBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -524,6 +562,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetPlaylistUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -632,19 +694,11 @@ public class Playlists implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - DeletePlaylistResponseBody _out = Utils.mapper().readValue( + DeletePlaylistBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -656,6 +710,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + DeletePlaylistUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -788,19 +866,11 @@ public class Playlists implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - UpdatePlaylistResponseBody _out = Utils.mapper().readValue( + UpdatePlaylistBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -812,6 +882,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + UpdatePlaylistUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -951,19 +1045,11 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetPlaylistContentsResponseBody _out = Utils.mapper().readValue( + GetPlaylistContentsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -975,6 +1061,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetPlaylistContentsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1083,19 +1193,11 @@ public class Playlists implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - ClearPlaylistContentsResponseBody _out = Utils.mapper().readValue( + ClearPlaylistContentsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1107,6 +1209,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClearPlaylistContentsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1255,19 +1381,11 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.AddPlaylistContentsResponseBody _out = Utils.mapper().readValue( + AddPlaylistContentsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1279,6 +1397,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + AddPlaylistContentsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1403,19 +1545,11 @@ public class Playlists implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - UploadPlaylistResponseBody _out = Utils.mapper().readValue( + UploadPlaylistBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1427,6 +1561,30 @@ public class Playlists implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + UploadPlaylistUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Plex.java b/src/main/java/dev/plexapi/sdk/Plex.java index e098c93e..4ba00aab 100644 --- a/src/main/java/dev/plexapi/sdk/Plex.java +++ b/src/main/java/dev/plexapi/sdk/Plex.java @@ -5,13 +5,19 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.GetCompanionsDataResponseBody; -import dev.plexapi.sdk.models.errors.GetGeoDataResponseBody; -import dev.plexapi.sdk.models.errors.GetPinResponseBody; -import dev.plexapi.sdk.models.errors.GetServerResourcesResponseBody; -import dev.plexapi.sdk.models.errors.GetTokenByPinIdPlexResponseBody; +import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest; +import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized; +import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest; +import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized; +import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest; +import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized; +import dev.plexapi.sdk.models.errors.GetPinBadRequest; +import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest; +import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized; +import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest; import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody; -import dev.plexapi.sdk.models.errors.GetUserFriendsResponseBody; +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.GetCompanionsDataRequestBuilder; @@ -35,6 +41,9 @@ 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.models.operations.PlexDevice; import dev.plexapi.sdk.models.operations.ResponseBody; import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*; @@ -71,42 +80,42 @@ public class Plex implements * 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", + "https://plex.tv/api/v2/", }; /** * 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", + "https://plex.tv/api/v2/", }; /** * 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", + "https://plex.tv/api/v2/", }; /** * 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", + "https://plex.tv/api/v2/", }; /** * 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", + "https://plex.tv/api/v2/", }; /** * 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", + "https://plex.tv/api/v2/", }; private final SDKConfiguration sdkConfiguration; @@ -228,19 +237,11 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetCompanionsDataResponseBody _out = Utils.mapper().readValue( + GetCompanionsDataBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -252,6 +253,30 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetCompanionsDataUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -373,19 +398,11 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetUserFriendsResponseBody _out = Utils.mapper().readValue( + GetUserFriendsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -397,6 +414,30 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetUserFriendsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -515,19 +556,11 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetGeoDataResponseBody _out = Utils.mapper().readValue( + GetGeoDataBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -539,6 +572,30 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetGeoDataUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -646,19 +703,11 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetHomeDataResponseBody _out = Utils.mapper().readValue( + GetHomeDataBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -670,6 +719,30 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetHomeDataUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -691,26 +764,44 @@ public class Plex implements /** * Get Server Resources * Get Plex server access tokens and server connections - * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetServerResourcesResponse getServerResources( - GetServerResourcesRequest request) throws Exception { - return getServerResources(request, Optional.empty()); + public GetServerResourcesResponse getServerResourcesDirect() throws Exception { + return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** * Get Server Resources * Get Plex server access tokens and server connections - * @param request The request object containing all of the parameters for the API call. + * @param xPlexClientIdentifier The unique identifier for the client application + This is used to track the client application and its usage + (UUID, serial number, or other number unique per device) + + * @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 serverURL Overrides the server URL. * @return The response from the API call * @throws Exception if the API call fails */ public GetServerResourcesResponse getServerResources( - GetServerResourcesRequest request, + Optional xPlexClientIdentifier, + Optional includeHttps, + Optional includeRelay, + Optional includeIPv6, Optional serverURL) throws Exception { + GetServerResourcesRequest request = + GetServerResourcesRequest + .builder() + .xPlexClientIdentifier(xPlexClientIdentifier) + .includeHttps(includeHttps) + .includeRelay(includeRelay) + .includeIPv6(includeIPv6) + .build(); + String _baseUrl = Utils.templateUrl(GET_SERVER_RESOURCES_SERVERS[0], new HashMap()); if (serverURL.isPresent() && !serverURL.get().isBlank()) { _baseUrl = serverURL.get(); @@ -800,19 +891,11 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetServerResourcesResponseBody _out = Utils.mapper().readValue( + GetServerResourcesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -824,6 +907,30 @@ public class Plex implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetServerResourcesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -969,9 +1076,9 @@ public class Plex implements } if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetPinResponseBody _out = Utils.mapper().readValue( + GetPinBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1134,9 +1241,9 @@ public class Plex implements } if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetTokenByPinIdResponseBody _out = Utils.mapper().readValue( + GetTokenByPinIdBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1150,9 +1257,9 @@ public class Plex implements } if (Utils.statusCodeMatches(_httpRes.statusCode(), "404")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetTokenByPinIdPlexResponseBody _out = Utils.mapper().readValue( + GetTokenByPinIdResponseBody _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; diff --git a/src/main/java/dev/plexapi/sdk/PlexAPI.java b/src/main/java/dev/plexapi/sdk/PlexAPI.java index 5922eb94..d628b630 100644 --- a/src/main/java/dev/plexapi/sdk/PlexAPI.java +++ b/src/main/java/dev/plexapi/sdk/PlexAPI.java @@ -363,6 +363,9 @@ public class PlexAPI { this.sdkConfiguration.retryConfig = Optional.of(retryConfig); return this; } + /** + * ServerProtocol - The protocol to use for the server connection + */ public enum ServerProtocol { HTTP("http"), HTTPS("https"); diff --git a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java index 5f2304ff..9a89bf2d 100644 --- a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java +++ b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java @@ -36,9 +36,9 @@ class SDKConfiguration { } }; public String language = "java"; public String openapiDocVersion = "0.0.3"; - public String sdkVersion = "0.2.2"; - public String genVersion = "2.411.9"; - public String userAgent = "speakeasy-sdk/java 0.2.2 2.411.9 0.0.3 dev.plexapi.sdk"; + public String sdkVersion = "0.3.0"; + public String genVersion = "2.415.6"; + public String userAgent = "speakeasy-sdk/java 0.3.0 2.415.6 0.0.3 dev.plexapi.sdk"; private Hooks _hooks = createHooks(); diff --git a/src/main/java/dev/plexapi/sdk/Search.java b/src/main/java/dev/plexapi/sdk/Search.java index a6356961..00bc1ccf 100644 --- a/src/main/java/dev/plexapi/sdk/Search.java +++ b/src/main/java/dev/plexapi/sdk/Search.java @@ -5,8 +5,12 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.PerformSearchResponseBody; -import dev.plexapi.sdk.models.errors.PerformVoiceSearchResponseBody; +import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest; +import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized; +import dev.plexapi.sdk.models.errors.PerformSearchBadRequest; +import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized; +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.GetSearchResultsRequest; import dev.plexapi.sdk.models.operations.GetSearchResultsRequestBuilder; @@ -204,19 +208,11 @@ public class Search implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - PerformSearchResponseBody _out = Utils.mapper().readValue( + PerformSearchBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -228,6 +224,30 @@ public class Search implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + PerformSearchUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -367,19 +387,11 @@ public class Search implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - PerformVoiceSearchResponseBody _out = Utils.mapper().readValue( + PerformVoiceSearchBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -391,6 +403,30 @@ public class Search implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + PerformVoiceSearchUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -511,19 +547,11 @@ public class Search implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetSearchResultsResponseBody _out = Utils.mapper().readValue( + GetSearchResultsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -535,6 +563,30 @@ public class Search implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetSearchResultsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Server.java b/src/main/java/dev/plexapi/sdk/Server.java index c9bbbeb9..26d6caf6 100644 --- a/src/main/java/dev/plexapi/sdk/Server.java +++ b/src/main/java/dev/plexapi/sdk/Server.java @@ -5,7 +5,23 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.GetResizedPhotoResponseBody; +import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest; +import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized; +import dev.plexapi.sdk.models.errors.GetDevicesBadRequest; +import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized; +import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest; +import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized; +import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest; +import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized; +import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest; +import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized; +import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; +import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; +import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout; +import dev.plexapi.sdk.models.errors.GetServerListBadRequest; +import dev.plexapi.sdk.models.errors.GetServerListUnauthorized; +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.GetAvailableClientsRequestBuilder; import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse; @@ -170,19 +186,11 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody _out = Utils.mapper().readValue( + GetServerCapabilitiesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -194,6 +202,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetServerCapabilitiesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -301,19 +333,11 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetServerPreferencesResponseBody _out = Utils.mapper().readValue( + GetServerPreferencesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -325,6 +349,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetServerPreferencesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -432,19 +480,11 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetAvailableClientsResponseBody _out = Utils.mapper().readValue( + GetAvailableClientsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -456,6 +496,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetAvailableClientsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -563,19 +627,11 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetDevicesResponseBody _out = Utils.mapper().readValue( + GetDevicesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -587,6 +643,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetDevicesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -693,9 +773,9 @@ public class Server implements } if (Utils.statusCodeMatches(_httpRes.statusCode(), "408")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetServerIdentityResponseBody _out = Utils.mapper().readValue( + GetServerIdentityRequestTimeout _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -822,19 +902,11 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetMyPlexAccountResponseBody _out = Utils.mapper().readValue( + GetMyPlexAccountBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -846,6 +918,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetMyPlexAccountUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -951,19 +1047,11 @@ public class Server implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetResizedPhotoResponseBody _out = Utils.mapper().readValue( + GetResizedPhotoBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -975,6 +1063,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetResizedPhotoUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1095,19 +1207,11 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetMediaProvidersResponseBody _out = Utils.mapper().readValue( + GetMediaProvidersBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1119,6 +1223,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetMediaProvidersUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -1226,19 +1354,11 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetServerListResponseBody _out = Utils.mapper().readValue( + GetServerListBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1250,6 +1370,30 @@ public class Server implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetServerListUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Sessions.java b/src/main/java/dev/plexapi/sdk/Sessions.java index d2f5ce89..a0ef451e 100644 --- a/src/main/java/dev/plexapi/sdk/Sessions.java +++ b/src/main/java/dev/plexapi/sdk/Sessions.java @@ -5,8 +5,15 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest; +import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized; +import dev.plexapi.sdk.models.errors.GetSessionsBadRequest; +import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized; +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.errors.StopTranscodeSessionResponseBody; +import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest; +import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized; import dev.plexapi.sdk.models.operations.GetSessionHistoryRequest; import dev.plexapi.sdk.models.operations.GetSessionHistoryRequestBuilder; import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse; @@ -152,19 +159,11 @@ public class Sessions implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetSessionsResponseBody _out = Utils.mapper().readValue( + GetSessionsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -176,6 +175,30 @@ public class Sessions implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetSessionsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -320,19 +343,11 @@ public class Sessions implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetSessionHistoryResponseBody _out = Utils.mapper().readValue( + GetSessionHistoryBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -344,6 +359,30 @@ public class Sessions implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetSessionHistoryUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -451,19 +490,11 @@ public class Sessions implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetTranscodeSessionsResponseBody _out = Utils.mapper().readValue( + GetTranscodeSessionsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -475,6 +506,30 @@ public class Sessions implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetTranscodeSessionsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -581,19 +636,11 @@ public class Sessions implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - StopTranscodeSessionResponseBody _out = Utils.mapper().readValue( + StopTranscodeSessionBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -605,6 +652,30 @@ public class Sessions implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + StopTranscodeSessionUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Statistics.java b/src/main/java/dev/plexapi/sdk/Statistics.java index dbae41b5..1a5192fe 100644 --- a/src/main/java/dev/plexapi/sdk/Statistics.java +++ b/src/main/java/dev/plexapi/sdk/Statistics.java @@ -5,6 +5,12 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest; +import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized; +import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest; +import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized; +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.GetBandwidthStatisticsRequest; import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequestBuilder; @@ -173,19 +179,11 @@ public class Statistics implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetStatisticsResponseBody _out = Utils.mapper().readValue( + GetStatisticsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -197,6 +195,30 @@ public class Statistics implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetStatisticsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -329,19 +351,11 @@ public class Statistics implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetResourcesStatisticsResponseBody _out = Utils.mapper().readValue( + GetResourcesStatisticsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -353,6 +367,30 @@ public class Statistics implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetResourcesStatisticsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -485,19 +523,11 @@ public class Statistics implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetBandwidthStatisticsResponseBody _out = Utils.mapper().readValue( + GetBandwidthStatisticsBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -509,6 +539,30 @@ public class Statistics implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetBandwidthStatisticsUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Updater.java b/src/main/java/dev/plexapi/sdk/Updater.java index 45dec68f..b1789b06 100644 --- a/src/main/java/dev/plexapi/sdk/Updater.java +++ b/src/main/java/dev/plexapi/sdk/Updater.java @@ -5,8 +5,12 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.ApplyUpdatesResponseBody; -import dev.plexapi.sdk.models.errors.CheckForUpdatesResponseBody; +import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest; +import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized; +import dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest; +import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized; +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.ApplyUpdatesRequest; import dev.plexapi.sdk.models.operations.ApplyUpdatesRequestBuilder; @@ -150,19 +154,11 @@ public class Updater implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetUpdateStatusResponseBody _out = Utils.mapper().readValue( + GetUpdateStatusBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -174,6 +170,30 @@ public class Updater implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetUpdateStatusUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -293,19 +313,11 @@ public class Updater implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - CheckForUpdatesResponseBody _out = Utils.mapper().readValue( + CheckForUpdatesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -317,6 +329,30 @@ public class Updater implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + CheckForUpdatesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -442,19 +478,11 @@ public class Updater implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "500", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - ApplyUpdatesResponseBody _out = Utils.mapper().readValue( + ApplyUpdatesBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -466,6 +494,30 @@ public class Updater implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ApplyUpdatesUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "500", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Video.java b/src/main/java/dev/plexapi/sdk/Video.java index 3abddf67..110a8e33 100644 --- a/src/main/java/dev/plexapi/sdk/Video.java +++ b/src/main/java/dev/plexapi/sdk/Video.java @@ -5,9 +5,11 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.models.errors.GetTimelineResponseBody; +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.errors.StartUniversalTranscodeResponseBody; +import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest; +import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized; import dev.plexapi.sdk.models.operations.GetTimelineRequest; import dev.plexapi.sdk.models.operations.GetTimelineRequestBuilder; import dev.plexapi.sdk.models.operations.GetTimelineResponse; @@ -138,19 +140,11 @@ public class Video implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetTimelineResponseBody _out = Utils.mapper().readValue( + GetTimelineBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -162,6 +156,30 @@ public class Video implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetTimelineUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -265,19 +283,11 @@ public class Video implements // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - StartUniversalTranscodeResponseBody _out = Utils.mapper().readValue( + StartUniversalTranscodeBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -289,6 +299,30 @@ public class Video implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + StartUniversalTranscodeUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/Watchlist.java b/src/main/java/dev/plexapi/sdk/Watchlist.java index 37adf61f..1317e3c4 100644 --- a/src/main/java/dev/plexapi/sdk/Watchlist.java +++ b/src/main/java/dev/plexapi/sdk/Watchlist.java @@ -5,6 +5,8 @@ package dev.plexapi.sdk; import com.fasterxml.jackson.core.type.TypeReference; +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.GetWatchListRequestBuilder; @@ -173,19 +175,11 @@ public class Watchlist implements Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - dev.plexapi.sdk.models.errors.GetWatchListResponseBody _out = Utils.mapper().readValue( + GetWatchListBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -197,6 +191,30 @@ public class Watchlist implements Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetWatchListUnauthorized _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _out.withRawResponse(Optional.ofNullable(_httpRes)); + + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsBadRequest.java index af0bc9dd..b71f7349 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * AddPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * AddPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class AddPlaylistContentsResponseBody extends RuntimeException { +public class AddPlaylistContentsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public AddPlaylistContentsResponseBody( + public AddPlaylistContentsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public AddPlaylistContentsResponseBody() { + public AddPlaylistContentsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { return new Builder(); } - public AddPlaylistContentsResponseBody withErrors(List errors) { + public AddPlaylistContentsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public AddPlaylistContentsResponseBody withErrors(Optional> errors) { + public AddPlaylistContentsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public AddPlaylistContentsResponseBody withRawResponse(HttpResponse rawResponse) { + public AddPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public AddPlaylistContentsResponseBody withRawResponse(Optional> rawResponse) { + public AddPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - AddPlaylistContentsResponseBody other = (AddPlaylistContentsResponseBody) o; + AddPlaylistContentsBadRequest other = (AddPlaylistContentsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(AddPlaylistContentsResponseBody.class, + return Utils.toString(AddPlaylistContentsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class AddPlaylistContentsResponseBody extends RuntimeException { return this; } - public AddPlaylistContentsResponseBody build() { - return new AddPlaylistContentsResponseBody( + 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 index 690b9614..b57e2132 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class AddPlaylistContentsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class AddPlaylistContentsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public AddPlaylistContentsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class AddPlaylistContentsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class AddPlaylistContentsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class AddPlaylistContentsErrors { return new Builder(); } - public AddPlaylistContentsErrors withCode(double code) { + public AddPlaylistContentsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public AddPlaylistContentsErrors withCode(Optional code) { + public AddPlaylistContentsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class AddPlaylistContentsErrors { return this; } - public AddPlaylistContentsErrors withStatus(double status) { + public AddPlaylistContentsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public AddPlaylistContentsErrors withStatus(Optional status) { + public AddPlaylistContentsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class AddPlaylistContentsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class AddPlaylistContentsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsPlaylistsErrors.java new file mode 100644 index 00000000..25c6ac2f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public AddPlaylistContentsPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..62d0ca1c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * AddPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public AddPlaylistContentsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/ApplyUpdatesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesBadRequest.java index 6f8f9f7f..36f08252 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * ApplyUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * ApplyUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class ApplyUpdatesResponseBody extends RuntimeException { +public class ApplyUpdatesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public ApplyUpdatesResponseBody( + public ApplyUpdatesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public ApplyUpdatesResponseBody() { + public ApplyUpdatesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class ApplyUpdatesResponseBody extends RuntimeException { return new Builder(); } - public ApplyUpdatesResponseBody withErrors(List errors) { + public ApplyUpdatesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public ApplyUpdatesResponseBody withErrors(Optional> errors) { + public ApplyUpdatesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public ApplyUpdatesResponseBody withRawResponse(HttpResponse rawResponse) { + public ApplyUpdatesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public ApplyUpdatesResponseBody withRawResponse(Optional> rawResponse) { + public ApplyUpdatesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - ApplyUpdatesResponseBody other = (ApplyUpdatesResponseBody) o; + ApplyUpdatesBadRequest other = (ApplyUpdatesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(ApplyUpdatesResponseBody.class, + return Utils.toString(ApplyUpdatesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class ApplyUpdatesResponseBody extends RuntimeException { return this; } - public ApplyUpdatesResponseBody build() { - return new ApplyUpdatesResponseBody( + 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 index b2a6b5cf..7eda6fe1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class ApplyUpdatesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class ApplyUpdatesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public ApplyUpdatesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class ApplyUpdatesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class ApplyUpdatesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class ApplyUpdatesErrors { return new Builder(); } - public ApplyUpdatesErrors withCode(double code) { + public ApplyUpdatesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public ApplyUpdatesErrors withCode(Optional code) { + public ApplyUpdatesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class ApplyUpdatesErrors { return this; } - public ApplyUpdatesErrors withStatus(double status) { + public ApplyUpdatesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public ApplyUpdatesErrors withStatus(Optional status) { + public ApplyUpdatesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class ApplyUpdatesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class ApplyUpdatesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUnauthorized.java new file mode 100644 index 00000000..073e846d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * ApplyUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public ApplyUpdatesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ApplyUpdatesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..7837c082 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUpdaterErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public ApplyUpdatesUpdaterErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(ApplyUpdatesUpdaterErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..fbe27363 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesActivitiesErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public CancelServerActivitiesActivitiesErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(CancelServerActivitiesActivitiesErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 CancelServerActivitiesActivitiesErrors build() { + return new CancelServerActivitiesActivitiesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesBadRequest.java index 6f4e7dd3..36ddeb6c 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * CancelServerActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * CancelServerActivitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class CancelServerActivitiesResponseBody extends RuntimeException { +public class CancelServerActivitiesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public CancelServerActivitiesResponseBody( + public CancelServerActivitiesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public CancelServerActivitiesResponseBody() { + public CancelServerActivitiesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { return new Builder(); } - public CancelServerActivitiesResponseBody withErrors(List errors) { + public CancelServerActivitiesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public CancelServerActivitiesResponseBody withErrors(Optional> errors) { + public CancelServerActivitiesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public CancelServerActivitiesResponseBody withRawResponse(HttpResponse rawResponse) { + public CancelServerActivitiesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public CancelServerActivitiesResponseBody withRawResponse(Optional> rawResponse) { + public CancelServerActivitiesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - CancelServerActivitiesResponseBody other = (CancelServerActivitiesResponseBody) o; + CancelServerActivitiesBadRequest other = (CancelServerActivitiesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(CancelServerActivitiesResponseBody.class, + return Utils.toString(CancelServerActivitiesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class CancelServerActivitiesResponseBody extends RuntimeException { return this; } - public CancelServerActivitiesResponseBody build() { - return new CancelServerActivitiesResponseBody( + 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 index a9772a4a..3658bec3 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class CancelServerActivitiesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class CancelServerActivitiesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public CancelServerActivitiesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class CancelServerActivitiesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class CancelServerActivitiesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class CancelServerActivitiesErrors { return new Builder(); } - public CancelServerActivitiesErrors withCode(double code) { + public CancelServerActivitiesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public CancelServerActivitiesErrors withCode(Optional code) { + public CancelServerActivitiesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class CancelServerActivitiesErrors { return this; } - public CancelServerActivitiesErrors withStatus(double status) { + public CancelServerActivitiesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public CancelServerActivitiesErrors withStatus(Optional status) { + public CancelServerActivitiesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class CancelServerActivitiesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class CancelServerActivitiesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesUnauthorized.java new file mode 100644 index 00000000..f5ed2580 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * CancelServerActivitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public CancelServerActivitiesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CancelServerActivitiesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/CheckForUpdatesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesBadRequest.java index d379dbc9..5339e430 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * CheckForUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * CheckForUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class CheckForUpdatesResponseBody extends RuntimeException { +public class CheckForUpdatesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public CheckForUpdatesResponseBody( + public CheckForUpdatesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public CheckForUpdatesResponseBody() { + public CheckForUpdatesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class CheckForUpdatesResponseBody extends RuntimeException { return new Builder(); } - public CheckForUpdatesResponseBody withErrors(List errors) { + public CheckForUpdatesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public CheckForUpdatesResponseBody withErrors(Optional> errors) { + public CheckForUpdatesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public CheckForUpdatesResponseBody withRawResponse(HttpResponse rawResponse) { + public CheckForUpdatesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public CheckForUpdatesResponseBody withRawResponse(Optional> rawResponse) { + public CheckForUpdatesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - CheckForUpdatesResponseBody other = (CheckForUpdatesResponseBody) o; + CheckForUpdatesBadRequest other = (CheckForUpdatesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(CheckForUpdatesResponseBody.class, + return Utils.toString(CheckForUpdatesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class CheckForUpdatesResponseBody extends RuntimeException { return this; } - public CheckForUpdatesResponseBody build() { - return new CheckForUpdatesResponseBody( + 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 index aed88815..d2f64b37 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class CheckForUpdatesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class CheckForUpdatesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public CheckForUpdatesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class CheckForUpdatesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class CheckForUpdatesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class CheckForUpdatesErrors { return new Builder(); } - public CheckForUpdatesErrors withCode(double code) { + public CheckForUpdatesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public CheckForUpdatesErrors withCode(Optional code) { + public CheckForUpdatesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class CheckForUpdatesErrors { return this; } - public CheckForUpdatesErrors withStatus(double status) { + public CheckForUpdatesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public CheckForUpdatesErrors withStatus(Optional status) { + public CheckForUpdatesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class CheckForUpdatesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class CheckForUpdatesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUnauthorized.java new file mode 100644 index 00000000..b82727b5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * CheckForUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public CheckForUpdatesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CheckForUpdatesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..3ec2d552 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUpdaterErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public CheckForUpdatesUpdaterErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(CheckForUpdatesUpdaterErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 CheckForUpdatesUpdaterErrors build() { + return new CheckForUpdatesUpdaterErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsBadRequest.java index ffa4ae78..cd1e3e74 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * ClearPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * ClearPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class ClearPlaylistContentsResponseBody extends RuntimeException { +public class ClearPlaylistContentsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public ClearPlaylistContentsResponseBody( + public ClearPlaylistContentsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public ClearPlaylistContentsResponseBody() { + public ClearPlaylistContentsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { return new Builder(); } - public ClearPlaylistContentsResponseBody withErrors(List errors) { + public ClearPlaylistContentsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public ClearPlaylistContentsResponseBody withErrors(Optional> errors) { + public ClearPlaylistContentsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public ClearPlaylistContentsResponseBody withRawResponse(HttpResponse rawResponse) { + public ClearPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public ClearPlaylistContentsResponseBody withRawResponse(Optional> rawResponse) { + public ClearPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - ClearPlaylistContentsResponseBody other = (ClearPlaylistContentsResponseBody) o; + ClearPlaylistContentsBadRequest other = (ClearPlaylistContentsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(ClearPlaylistContentsResponseBody.class, + return Utils.toString(ClearPlaylistContentsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException { return this; } - public ClearPlaylistContentsResponseBody build() { - return new ClearPlaylistContentsResponseBody( + 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 index 0f9552e0..3183422e 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class ClearPlaylistContentsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class ClearPlaylistContentsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public ClearPlaylistContentsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class ClearPlaylistContentsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class ClearPlaylistContentsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class ClearPlaylistContentsErrors { return new Builder(); } - public ClearPlaylistContentsErrors withCode(double code) { + public ClearPlaylistContentsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public ClearPlaylistContentsErrors withCode(Optional code) { + public ClearPlaylistContentsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class ClearPlaylistContentsErrors { return this; } - public ClearPlaylistContentsErrors withStatus(double status) { + public ClearPlaylistContentsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public ClearPlaylistContentsErrors withStatus(Optional status) { + public ClearPlaylistContentsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class ClearPlaylistContentsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class ClearPlaylistContentsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsPlaylistsErrors.java new file mode 100644 index 00000000..7fc06215 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public ClearPlaylistContentsPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistContentsPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..9cb6365f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * ClearPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public ClearPlaylistContentsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistContentsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/CreatePlaylistResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistBadRequest.java index 05b8824c..2f4e04ab 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * CreatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * CreatePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class CreatePlaylistResponseBody extends RuntimeException { +public class CreatePlaylistBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class CreatePlaylistResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public CreatePlaylistResponseBody( + public CreatePlaylistBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class CreatePlaylistResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public CreatePlaylistResponseBody() { + public CreatePlaylistBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class CreatePlaylistResponseBody extends RuntimeException { return new Builder(); } - public CreatePlaylistResponseBody withErrors(List errors) { + public CreatePlaylistBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public CreatePlaylistResponseBody withErrors(Optional> errors) { + public CreatePlaylistBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class CreatePlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public CreatePlaylistResponseBody withRawResponse(HttpResponse rawResponse) { + public CreatePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class CreatePlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public CreatePlaylistResponseBody withRawResponse(Optional> rawResponse) { + public CreatePlaylistBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class CreatePlaylistResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - CreatePlaylistResponseBody other = (CreatePlaylistResponseBody) o; + CreatePlaylistBadRequest other = (CreatePlaylistBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class CreatePlaylistResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(CreatePlaylistResponseBody.class, + return Utils.toString(CreatePlaylistBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class CreatePlaylistResponseBody extends RuntimeException { return this; } - public CreatePlaylistResponseBody build() { - return new CreatePlaylistResponseBody( + 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 index 3c18e765..67b2bb53 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class CreatePlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class CreatePlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public CreatePlaylistErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class CreatePlaylistErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class CreatePlaylistErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class CreatePlaylistErrors { return new Builder(); } - public CreatePlaylistErrors withCode(double code) { + public CreatePlaylistErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public CreatePlaylistErrors withCode(Optional code) { + public CreatePlaylistErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class CreatePlaylistErrors { return this; } - public CreatePlaylistErrors withStatus(double status) { + public CreatePlaylistErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public CreatePlaylistErrors withStatus(Optional status) { + public CreatePlaylistErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class CreatePlaylistErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class CreatePlaylistErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistPlaylistsErrors.java new file mode 100644 index 00000000..50d8b0cd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public CreatePlaylistPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..819f42f1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * CreatePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public CreatePlaylistUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/DeleteLibraryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryBadRequest.java index e8263939..94a700e1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * DeleteLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * DeleteLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class DeleteLibraryResponseBody extends RuntimeException { +public class DeleteLibraryBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class DeleteLibraryResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public DeleteLibraryResponseBody( + public DeleteLibraryBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class DeleteLibraryResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public DeleteLibraryResponseBody() { + public DeleteLibraryBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class DeleteLibraryResponseBody extends RuntimeException { return new Builder(); } - public DeleteLibraryResponseBody withErrors(List errors) { + public DeleteLibraryBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public DeleteLibraryResponseBody withErrors(Optional> errors) { + public DeleteLibraryBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class DeleteLibraryResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public DeleteLibraryResponseBody withRawResponse(HttpResponse rawResponse) { + public DeleteLibraryBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class DeleteLibraryResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public DeleteLibraryResponseBody withRawResponse(Optional> rawResponse) { + public DeleteLibraryBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class DeleteLibraryResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - DeleteLibraryResponseBody other = (DeleteLibraryResponseBody) o; + DeleteLibraryBadRequest other = (DeleteLibraryBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class DeleteLibraryResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(DeleteLibraryResponseBody.class, + return Utils.toString(DeleteLibraryBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class DeleteLibraryResponseBody extends RuntimeException { return this; } - public DeleteLibraryResponseBody build() { - return new DeleteLibraryResponseBody( + 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 index e941329b..a5e78c31 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class DeleteLibraryErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class DeleteLibraryErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public DeleteLibraryErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class DeleteLibraryErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class DeleteLibraryErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class DeleteLibraryErrors { return new Builder(); } - public DeleteLibraryErrors withCode(double code) { + public DeleteLibraryErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public DeleteLibraryErrors withCode(Optional code) { + public DeleteLibraryErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class DeleteLibraryErrors { return this; } - public DeleteLibraryErrors withStatus(double status) { + public DeleteLibraryErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public DeleteLibraryErrors withStatus(Optional status) { + public DeleteLibraryErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class DeleteLibraryErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class DeleteLibraryErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryLibraryErrors.java new file mode 100644 index 00000000..2733fa0e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public DeleteLibraryLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibraryLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..227cb3c9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * DeleteLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public DeleteLibraryUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibraryUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/DeletePlaylistResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistBadRequest.java index ffce654d..0c24d5cf 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * DeletePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * DeletePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class DeletePlaylistResponseBody extends RuntimeException { +public class DeletePlaylistBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class DeletePlaylistResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public DeletePlaylistResponseBody( + public DeletePlaylistBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class DeletePlaylistResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public DeletePlaylistResponseBody() { + public DeletePlaylistBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class DeletePlaylistResponseBody extends RuntimeException { return new Builder(); } - public DeletePlaylistResponseBody withErrors(List errors) { + public DeletePlaylistBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public DeletePlaylistResponseBody withErrors(Optional> errors) { + public DeletePlaylistBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class DeletePlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public DeletePlaylistResponseBody withRawResponse(HttpResponse rawResponse) { + public DeletePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class DeletePlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public DeletePlaylistResponseBody withRawResponse(Optional> rawResponse) { + public DeletePlaylistBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class DeletePlaylistResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - DeletePlaylistResponseBody other = (DeletePlaylistResponseBody) o; + DeletePlaylistBadRequest other = (DeletePlaylistBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class DeletePlaylistResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(DeletePlaylistResponseBody.class, + return Utils.toString(DeletePlaylistBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class DeletePlaylistResponseBody extends RuntimeException { return this; } - public DeletePlaylistResponseBody build() { - return new DeletePlaylistResponseBody( + 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 index 9b846de4..d8e603a1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class DeletePlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class DeletePlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public DeletePlaylistErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class DeletePlaylistErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class DeletePlaylistErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class DeletePlaylistErrors { return new Builder(); } - public DeletePlaylistErrors withCode(double code) { + public DeletePlaylistErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public DeletePlaylistErrors withCode(Optional code) { + public DeletePlaylistErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class DeletePlaylistErrors { return this; } - public DeletePlaylistErrors withStatus(double status) { + public DeletePlaylistErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public DeletePlaylistErrors withStatus(Optional status) { + public DeletePlaylistErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class DeletePlaylistErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class DeletePlaylistErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistPlaylistsErrors.java new file mode 100644 index 00000000..c0fdb952 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public DeletePlaylistPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..bbe4567f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * DeletePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public DeletePlaylistUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/EnablePaperTrailResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailBadRequest.java index 30cf8b71..45fcd5ee 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * EnablePaperTrailResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * EnablePaperTrailBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class EnablePaperTrailResponseBody extends RuntimeException { +public class EnablePaperTrailBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public EnablePaperTrailResponseBody( + public EnablePaperTrailBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public EnablePaperTrailResponseBody() { + public EnablePaperTrailBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class EnablePaperTrailResponseBody extends RuntimeException { return new Builder(); } - public EnablePaperTrailResponseBody withErrors(List errors) { + public EnablePaperTrailBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public EnablePaperTrailResponseBody withErrors(Optional> errors) { + public EnablePaperTrailBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public EnablePaperTrailResponseBody withRawResponse(HttpResponse rawResponse) { + public EnablePaperTrailBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public EnablePaperTrailResponseBody withRawResponse(Optional> rawResponse) { + public EnablePaperTrailBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - EnablePaperTrailResponseBody other = (EnablePaperTrailResponseBody) o; + EnablePaperTrailBadRequest other = (EnablePaperTrailBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(EnablePaperTrailResponseBody.class, + return Utils.toString(EnablePaperTrailBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class EnablePaperTrailResponseBody extends RuntimeException { return this; } - public EnablePaperTrailResponseBody build() { - return new EnablePaperTrailResponseBody( + 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 index ff5d8242..875cb723 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class EnablePaperTrailErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class EnablePaperTrailErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public EnablePaperTrailErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class EnablePaperTrailErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class EnablePaperTrailErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class EnablePaperTrailErrors { return new Builder(); } - public EnablePaperTrailErrors withCode(double code) { + public EnablePaperTrailErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public EnablePaperTrailErrors withCode(Optional code) { + public EnablePaperTrailErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class EnablePaperTrailErrors { return this; } - public EnablePaperTrailErrors withStatus(double status) { + public EnablePaperTrailErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public EnablePaperTrailErrors withStatus(Optional status) { + public EnablePaperTrailErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class EnablePaperTrailErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class EnablePaperTrailErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailLogErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailLogErrors.java new file mode 100644 index 00000000..3580b80f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailLogErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public EnablePaperTrailLogErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(EnablePaperTrailLogErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..78d69c3e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * EnablePaperTrailUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public EnablePaperTrailUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EnablePaperTrailUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 index 5aa2acdd..fcce5bd0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/Errors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/Errors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class Errors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class Errors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public Errors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class Errors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class Errors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class Errors { return new Builder(); } - public Errors withCode(double code) { + public Errors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Errors withCode(Optional code) { + public Errors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class Errors { return this; } - public Errors withStatus(double status) { + public Errors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Errors withStatus(Optional status) { + public Errors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class Errors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class Errors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesBadRequest.java index 1e8ff61b..7efe3afd 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetAllLibrariesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetAllLibrariesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetAllLibrariesResponseBody extends RuntimeException { +public class GetAllLibrariesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetAllLibrariesResponseBody( + public GetAllLibrariesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetAllLibrariesResponseBody() { + public GetAllLibrariesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetAllLibrariesResponseBody extends RuntimeException { return new Builder(); } - public GetAllLibrariesResponseBody withErrors(List errors) { + public GetAllLibrariesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetAllLibrariesResponseBody withErrors(Optional> errors) { + public GetAllLibrariesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetAllLibrariesResponseBody withRawResponse(HttpResponse rawResponse) { + public GetAllLibrariesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetAllLibrariesResponseBody withRawResponse(Optional> rawResponse) { + public GetAllLibrariesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetAllLibrariesResponseBody other = (GetAllLibrariesResponseBody) o; + GetAllLibrariesBadRequest other = (GetAllLibrariesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetAllLibrariesResponseBody.class, + return Utils.toString(GetAllLibrariesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetAllLibrariesResponseBody extends RuntimeException { return this; } - public GetAllLibrariesResponseBody build() { - return new GetAllLibrariesResponseBody( + 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 index 8f8b741e..b75fe580 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetAllLibrariesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetAllLibrariesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetAllLibrariesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetAllLibrariesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetAllLibrariesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetAllLibrariesErrors { return new Builder(); } - public GetAllLibrariesErrors withCode(double code) { + public GetAllLibrariesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetAllLibrariesErrors withCode(Optional code) { + public GetAllLibrariesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetAllLibrariesErrors { return this; } - public GetAllLibrariesErrors withStatus(double status) { + public GetAllLibrariesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetAllLibrariesErrors withStatus(Optional status) { + public GetAllLibrariesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetAllLibrariesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetAllLibrariesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesLibraryErrors.java new file mode 100644 index 00000000..faf982b5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetAllLibrariesLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetAllLibrariesLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..65b7fc81 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetAllLibrariesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetAllLibrariesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAllLibrariesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetAvailableClientsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsBadRequest.java index 5613c3b1..e8498935 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetAvailableClientsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetAvailableClientsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetAvailableClientsResponseBody extends RuntimeException { +public class GetAvailableClientsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetAvailableClientsResponseBody( + public GetAvailableClientsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetAvailableClientsResponseBody() { + public GetAvailableClientsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetAvailableClientsResponseBody extends RuntimeException { return new Builder(); } - public GetAvailableClientsResponseBody withErrors(List errors) { + public GetAvailableClientsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetAvailableClientsResponseBody withErrors(Optional> errors) { + public GetAvailableClientsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetAvailableClientsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetAvailableClientsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetAvailableClientsResponseBody withRawResponse(Optional> rawResponse) { + public GetAvailableClientsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetAvailableClientsResponseBody other = (GetAvailableClientsResponseBody) o; + GetAvailableClientsBadRequest other = (GetAvailableClientsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetAvailableClientsResponseBody.class, + return Utils.toString(GetAvailableClientsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetAvailableClientsResponseBody extends RuntimeException { return this; } - public GetAvailableClientsResponseBody build() { - return new GetAvailableClientsResponseBody( + 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 index e2f5fada..5d881339 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetAvailableClientsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetAvailableClientsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetAvailableClientsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetAvailableClientsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetAvailableClientsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetAvailableClientsErrors { return new Builder(); } - public GetAvailableClientsErrors withCode(double code) { + public GetAvailableClientsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetAvailableClientsErrors withCode(Optional code) { + public GetAvailableClientsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetAvailableClientsErrors { return this; } - public GetAvailableClientsErrors withStatus(double status) { + public GetAvailableClientsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetAvailableClientsErrors withStatus(Optional status) { + public GetAvailableClientsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetAvailableClientsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetAvailableClientsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsServerErrors.java new file mode 100644 index 00000000..31fcc8e1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsServerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetAvailableClientsServerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableClientsServerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..17d63999 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetAvailableClientsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetAvailableClientsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableClientsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetBandwidthStatisticsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsBadRequest.java index ffe0abf7..41ad878c 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetBandwidthStatisticsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetBandwidthStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetBandwidthStatisticsResponseBody extends RuntimeException { +public class GetBandwidthStatisticsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetBandwidthStatisticsResponseBody( + public GetBandwidthStatisticsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetBandwidthStatisticsResponseBody() { + public GetBandwidthStatisticsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { return new Builder(); } - public GetBandwidthStatisticsResponseBody withErrors(List errors) { + public GetBandwidthStatisticsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetBandwidthStatisticsResponseBody withErrors(Optional> errors) { + public GetBandwidthStatisticsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetBandwidthStatisticsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetBandwidthStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetBandwidthStatisticsResponseBody withRawResponse(Optional> rawResponse) { + public GetBandwidthStatisticsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetBandwidthStatisticsResponseBody other = (GetBandwidthStatisticsResponseBody) o; + GetBandwidthStatisticsBadRequest other = (GetBandwidthStatisticsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetBandwidthStatisticsResponseBody.class, + return Utils.toString(GetBandwidthStatisticsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException { return this; } - public GetBandwidthStatisticsResponseBody build() { - return new GetBandwidthStatisticsResponseBody( + 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 index bba5ec7a..88c81754 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetBandwidthStatisticsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetBandwidthStatisticsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetBandwidthStatisticsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetBandwidthStatisticsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetBandwidthStatisticsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetBandwidthStatisticsErrors { return new Builder(); } - public GetBandwidthStatisticsErrors withCode(double code) { + public GetBandwidthStatisticsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetBandwidthStatisticsErrors withCode(Optional code) { + public GetBandwidthStatisticsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetBandwidthStatisticsErrors { return this; } - public GetBandwidthStatisticsErrors withStatus(double status) { + public GetBandwidthStatisticsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetBandwidthStatisticsErrors withStatus(Optional status) { + public GetBandwidthStatisticsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetBandwidthStatisticsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetBandwidthStatisticsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsStatisticsErrors.java new file mode 100644 index 00000000..2f96087b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsStatisticsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetBandwidthStatisticsStatisticsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetBandwidthStatisticsStatisticsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..f96a8e6c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetBandwidthStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetBandwidthStatisticsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetBandwidthStatisticsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetBannerImageResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageBadRequest.java index c40f249b..af0ed4ea 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetBannerImageResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetBannerImageBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetBannerImageResponseBody extends RuntimeException { +public class GetBannerImageBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetBannerImageResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetBannerImageResponseBody( + public GetBannerImageBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetBannerImageResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetBannerImageResponseBody() { + public GetBannerImageBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetBannerImageResponseBody extends RuntimeException { return new Builder(); } - public GetBannerImageResponseBody withErrors(List errors) { + public GetBannerImageBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetBannerImageResponseBody withErrors(Optional> errors) { + public GetBannerImageBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetBannerImageResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetBannerImageResponseBody withRawResponse(HttpResponse rawResponse) { + public GetBannerImageBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetBannerImageResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetBannerImageResponseBody withRawResponse(Optional> rawResponse) { + public GetBannerImageBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetBannerImageResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetBannerImageResponseBody other = (GetBannerImageResponseBody) o; + GetBannerImageBadRequest other = (GetBannerImageBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetBannerImageResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetBannerImageResponseBody.class, + return Utils.toString(GetBannerImageBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetBannerImageResponseBody extends RuntimeException { return this; } - public GetBannerImageResponseBody build() { - return new GetBannerImageResponseBody( + 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 index 15d7d8f3..06d946f7 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetBannerImageErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetBannerImageErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetBannerImageErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetBannerImageErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetBannerImageErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetBannerImageErrors { return new Builder(); } - public GetBannerImageErrors withCode(double code) { + public GetBannerImageErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetBannerImageErrors withCode(Optional code) { + public GetBannerImageErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetBannerImageErrors { return this; } - public GetBannerImageErrors withStatus(double status) { + public GetBannerImageErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetBannerImageErrors withStatus(Optional status) { + public GetBannerImageErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetBannerImageErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetBannerImageErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageMediaErrors.java new file mode 100644 index 00000000..b5175e7c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageMediaErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetBannerImageMediaErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetBannerImageMediaErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..0ab802ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetBannerImageUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetBannerImageUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetBannerImageUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetButlerTasksResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksBadRequest.java index 8f87249d..5b4945f1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetButlerTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetButlerTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetButlerTasksResponseBody extends RuntimeException { +public class GetButlerTasksBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetButlerTasksResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetButlerTasksResponseBody( + public GetButlerTasksBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetButlerTasksResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetButlerTasksResponseBody() { + public GetButlerTasksBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetButlerTasksResponseBody extends RuntimeException { return new Builder(); } - public GetButlerTasksResponseBody withErrors(List errors) { + public GetButlerTasksBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetButlerTasksResponseBody withErrors(Optional> errors) { + public GetButlerTasksBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetButlerTasksResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetButlerTasksResponseBody withRawResponse(HttpResponse rawResponse) { + public GetButlerTasksBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetButlerTasksResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetButlerTasksResponseBody withRawResponse(Optional> rawResponse) { + public GetButlerTasksBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetButlerTasksResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetButlerTasksResponseBody other = (GetButlerTasksResponseBody) o; + GetButlerTasksBadRequest other = (GetButlerTasksBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetButlerTasksResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetButlerTasksResponseBody.class, + return Utils.toString(GetButlerTasksBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetButlerTasksResponseBody extends RuntimeException { return this; } - public GetButlerTasksResponseBody build() { - return new GetButlerTasksResponseBody( + 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 new file mode 100644 index 00000000..660cd17c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksButlerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetButlerTasksButlerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetButlerTasksButlerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 index ee7411ff..69ad3298 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetButlerTasksErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetButlerTasksErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetButlerTasksErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetButlerTasksErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetButlerTasksErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetButlerTasksErrors { return new Builder(); } - public GetButlerTasksErrors withCode(double code) { + public GetButlerTasksErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetButlerTasksErrors withCode(Optional code) { + public GetButlerTasksErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetButlerTasksErrors { return this; } - public GetButlerTasksErrors withStatus(double status) { + public GetButlerTasksErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetButlerTasksErrors withStatus(Optional status) { + public GetButlerTasksErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetButlerTasksErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetButlerTasksErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksUnauthorized.java new file mode 100644 index 00000000..9f0fc698 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetButlerTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetButlerTasksUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetButlerTasksUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetCompanionsDataResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataBadRequest.java index 5e88c13b..f5f77f4b 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetCompanionsDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetCompanionsDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetCompanionsDataResponseBody extends RuntimeException { +public class GetCompanionsDataBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetCompanionsDataResponseBody( + public GetCompanionsDataBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetCompanionsDataResponseBody() { + public GetCompanionsDataBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetCompanionsDataResponseBody extends RuntimeException { return new Builder(); } - public GetCompanionsDataResponseBody withErrors(List errors) { + public GetCompanionsDataBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetCompanionsDataResponseBody withErrors(Optional> errors) { + public GetCompanionsDataBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetCompanionsDataResponseBody withRawResponse(HttpResponse rawResponse) { + public GetCompanionsDataBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetCompanionsDataResponseBody withRawResponse(Optional> rawResponse) { + public GetCompanionsDataBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetCompanionsDataResponseBody other = (GetCompanionsDataResponseBody) o; + GetCompanionsDataBadRequest other = (GetCompanionsDataBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetCompanionsDataResponseBody.class, + return Utils.toString(GetCompanionsDataBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetCompanionsDataResponseBody extends RuntimeException { return this; } - public GetCompanionsDataResponseBody build() { - return new GetCompanionsDataResponseBody( + 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 index a2cf190d..b629b239 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetCompanionsDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetCompanionsDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetCompanionsDataErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetCompanionsDataErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetCompanionsDataErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetCompanionsDataErrors { return new Builder(); } - public GetCompanionsDataErrors withCode(double code) { + public GetCompanionsDataErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetCompanionsDataErrors withCode(Optional code) { + public GetCompanionsDataErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetCompanionsDataErrors { return this; } - public GetCompanionsDataErrors withStatus(double status) { + public GetCompanionsDataErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetCompanionsDataErrors withStatus(Optional status) { + public GetCompanionsDataErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetCompanionsDataErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetCompanionsDataErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataPlexErrors.java new file mode 100644 index 00000000..f823dc52 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataPlexErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetCompanionsDataPlexErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetCompanionsDataPlexErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..4f9b908f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetCompanionsDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetCompanionsDataUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetCompanionsDataUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetDevicesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetDevicesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetDevicesBadRequest.java index 8d269da6..b89f0b19 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetDevicesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetDevicesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetDevicesResponseBody extends RuntimeException { +public class GetDevicesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetDevicesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetDevicesResponseBody( + public GetDevicesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetDevicesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetDevicesResponseBody() { + public GetDevicesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetDevicesResponseBody extends RuntimeException { return new Builder(); } - public GetDevicesResponseBody withErrors(List errors) { + public GetDevicesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetDevicesResponseBody withErrors(Optional> errors) { + public GetDevicesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetDevicesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetDevicesResponseBody withRawResponse(HttpResponse rawResponse) { + public GetDevicesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetDevicesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetDevicesResponseBody withRawResponse(Optional> rawResponse) { + public GetDevicesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetDevicesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetDevicesResponseBody other = (GetDevicesResponseBody) o; + GetDevicesBadRequest other = (GetDevicesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetDevicesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetDevicesResponseBody.class, + return Utils.toString(GetDevicesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetDevicesResponseBody extends RuntimeException { return this; } - public GetDevicesResponseBody build() { - return new GetDevicesResponseBody( + 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 index 5ca2be81..ab0b6c01 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetDevicesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetDevicesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetDevicesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetDevicesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetDevicesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetDevicesErrors { return new Builder(); } - public GetDevicesErrors withCode(double code) { + public GetDevicesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetDevicesErrors withCode(Optional code) { + public GetDevicesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetDevicesErrors { return this; } - public GetDevicesErrors withStatus(double status) { + public GetDevicesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetDevicesErrors withStatus(Optional status) { + public GetDevicesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetDevicesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetDevicesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesServerErrors.java similarity index 75% rename from src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsErrors.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetDevicesServerErrors.java index 3a964334..1efbfe30 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesServerErrors.java @@ -11,18 +11,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.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; import java.util.Optional; -public class GetUserDetailsErrors { +public class GetDevicesServerErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetUserDetailsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator - public GetUserDetailsErrors( - @JsonProperty("code") Optional code, + public GetDevicesServerErrors( + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -45,12 +45,12 @@ public class GetUserDetailsErrors { this.status = status; } - public GetUserDetailsErrors() { + public GetDevicesServerErrors() { this(Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetUserDetailsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,37 +68,37 @@ public class GetUserDetailsErrors { return new Builder(); } - public GetUserDetailsErrors withCode(double code) { + public GetDevicesServerErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetUserDetailsErrors withCode(Optional code) { + public GetDevicesServerErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; } - public GetUserDetailsErrors withMessage(String message) { + public GetDevicesServerErrors withMessage(String message) { Utils.checkNotNull(message, "message"); this.message = Optional.ofNullable(message); return this; } - public GetUserDetailsErrors withMessage(Optional message) { + public GetDevicesServerErrors withMessage(Optional message) { Utils.checkNotNull(message, "message"); this.message = message; return this; } - public GetUserDetailsErrors withStatus(double status) { + public GetDevicesServerErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetUserDetailsErrors withStatus(Optional status) { + public GetDevicesServerErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -112,7 +112,7 @@ public class GetUserDetailsErrors { if (o == null || getClass() != o.getClass()) { return false; } - GetUserDetailsErrors other = (GetUserDetailsErrors) o; + GetDevicesServerErrors other = (GetDevicesServerErrors) o; return Objects.deepEquals(this.code, other.code) && Objects.deepEquals(this.message, other.message) && @@ -129,7 +129,7 @@ public class GetUserDetailsErrors { @Override public String toString() { - return Utils.toString(GetUserDetailsErrors.class, + return Utils.toString(GetDevicesServerErrors.class, "code", code, "message", message, "status", status); @@ -137,23 +137,23 @@ public class GetUserDetailsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,20 +171,20 @@ public class GetUserDetailsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; } - public GetUserDetailsErrors build() { - return new GetUserDetailsErrors( + 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 new file mode 100644 index 00000000..d032aded --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetDevicesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetDevicesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetFileHashResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetFileHashResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetFileHashBadRequest.java index b9376112..989ffb44 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetFileHashResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetFileHashBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetFileHashResponseBody extends RuntimeException { +public class GetFileHashBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetFileHashResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetFileHashResponseBody( + public GetFileHashBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetFileHashResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetFileHashResponseBody() { + public GetFileHashBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetFileHashResponseBody extends RuntimeException { return new Builder(); } - public GetFileHashResponseBody withErrors(List errors) { + public GetFileHashBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetFileHashResponseBody withErrors(Optional> errors) { + public GetFileHashBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetFileHashResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetFileHashResponseBody withRawResponse(HttpResponse rawResponse) { + public GetFileHashBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetFileHashResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetFileHashResponseBody withRawResponse(Optional> rawResponse) { + public GetFileHashBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetFileHashResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetFileHashResponseBody other = (GetFileHashResponseBody) o; + GetFileHashBadRequest other = (GetFileHashBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetFileHashResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetFileHashResponseBody.class, + return Utils.toString(GetFileHashBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetFileHashResponseBody extends RuntimeException { return this; } - public GetFileHashResponseBody build() { - return new GetFileHashResponseBody( + 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 index 92973ca6..5b15b581 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetFileHashErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetFileHashErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetFileHashErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetFileHashErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetFileHashErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetFileHashErrors { return new Builder(); } - public GetFileHashErrors withCode(double code) { + public GetFileHashErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetFileHashErrors withCode(Optional code) { + public GetFileHashErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetFileHashErrors { return this; } - public GetFileHashErrors withStatus(double status) { + public GetFileHashErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetFileHashErrors withStatus(Optional status) { + public GetFileHashErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetFileHashErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetFileHashErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashLibraryErrors.java new file mode 100644 index 00000000..a9956592 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetFileHashLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetFileHashLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..9c2f1876 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetFileHashUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetFileHashUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetFileHashUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetGeoDataResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataBadRequest.java index e89f541c..e7b67a71 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetGeoDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetGeoDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetGeoDataResponseBody extends RuntimeException { +public class GetGeoDataBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetGeoDataResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetGeoDataResponseBody( + public GetGeoDataBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetGeoDataResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetGeoDataResponseBody() { + public GetGeoDataBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetGeoDataResponseBody extends RuntimeException { return new Builder(); } - public GetGeoDataResponseBody withErrors(List errors) { + public GetGeoDataBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetGeoDataResponseBody withErrors(Optional> errors) { + public GetGeoDataBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetGeoDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetGeoDataResponseBody withRawResponse(HttpResponse rawResponse) { + public GetGeoDataBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetGeoDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetGeoDataResponseBody withRawResponse(Optional> rawResponse) { + public GetGeoDataBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetGeoDataResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetGeoDataResponseBody other = (GetGeoDataResponseBody) o; + GetGeoDataBadRequest other = (GetGeoDataBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetGeoDataResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetGeoDataResponseBody.class, + return Utils.toString(GetGeoDataBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetGeoDataResponseBody extends RuntimeException { return this; } - public GetGeoDataResponseBody build() { - return new GetGeoDataResponseBody( + 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 index 16be4fde..ed8a0baf 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetGeoDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetGeoDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetGeoDataErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetGeoDataErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetGeoDataErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetGeoDataErrors { return new Builder(); } - public GetGeoDataErrors withCode(double code) { + public GetGeoDataErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetGeoDataErrors withCode(Optional code) { + public GetGeoDataErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetGeoDataErrors { return this; } - public GetGeoDataErrors withStatus(double status) { + public GetGeoDataErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetGeoDataErrors withStatus(Optional status) { + public GetGeoDataErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetGeoDataErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetGeoDataErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataPlexErrors.java new file mode 100644 index 00000000..fbd2d134 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataPlexErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetGeoDataPlexErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetGeoDataPlexErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..f70fb679 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetGeoDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetGeoDataUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetGeoDataUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetGlobalHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsBadRequest.java index d7673e3c..9a930b4d 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetGlobalHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetGlobalHubsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetGlobalHubsResponseBody extends RuntimeException { +public class GetGlobalHubsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetGlobalHubsResponseBody( + public GetGlobalHubsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetGlobalHubsResponseBody() { + public GetGlobalHubsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetGlobalHubsResponseBody extends RuntimeException { return new Builder(); } - public GetGlobalHubsResponseBody withErrors(List errors) { + public GetGlobalHubsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetGlobalHubsResponseBody withErrors(Optional> errors) { + public GetGlobalHubsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetGlobalHubsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetGlobalHubsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetGlobalHubsResponseBody withRawResponse(Optional> rawResponse) { + public GetGlobalHubsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetGlobalHubsResponseBody other = (GetGlobalHubsResponseBody) o; + GetGlobalHubsBadRequest other = (GetGlobalHubsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetGlobalHubsResponseBody.class, + return Utils.toString(GetGlobalHubsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetGlobalHubsResponseBody extends RuntimeException { return this; } - public GetGlobalHubsResponseBody build() { - return new GetGlobalHubsResponseBody( + 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 index c73528fc..baf8a55b 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetGlobalHubsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetGlobalHubsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetGlobalHubsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetGlobalHubsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetGlobalHubsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetGlobalHubsErrors { return new Builder(); } - public GetGlobalHubsErrors withCode(double code) { + public GetGlobalHubsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetGlobalHubsErrors withCode(Optional code) { + public GetGlobalHubsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetGlobalHubsErrors { return this; } - public GetGlobalHubsErrors withStatus(double status) { + public GetGlobalHubsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetGlobalHubsErrors withStatus(Optional status) { + public GetGlobalHubsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetGlobalHubsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetGlobalHubsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsHubsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsHubsErrors.java new file mode 100644 index 00000000..d7e29ea4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsHubsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetGlobalHubsHubsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsHubsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..95493262 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetGlobalHubsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetGlobalHubsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetHomeDataResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataBadRequest.java index 97112763..462aed97 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetHomeDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetHomeDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetHomeDataResponseBody extends RuntimeException { +public class GetHomeDataBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetHomeDataResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetHomeDataResponseBody( + public GetHomeDataBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetHomeDataResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetHomeDataResponseBody() { + public GetHomeDataBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetHomeDataResponseBody extends RuntimeException { return new Builder(); } - public GetHomeDataResponseBody withErrors(List errors) { + public GetHomeDataBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetHomeDataResponseBody withErrors(Optional> errors) { + public GetHomeDataBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetHomeDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetHomeDataResponseBody withRawResponse(HttpResponse rawResponse) { + public GetHomeDataBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetHomeDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetHomeDataResponseBody withRawResponse(Optional> rawResponse) { + public GetHomeDataBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetHomeDataResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetHomeDataResponseBody other = (GetHomeDataResponseBody) o; + GetHomeDataBadRequest other = (GetHomeDataBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetHomeDataResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetHomeDataResponseBody.class, + return Utils.toString(GetHomeDataBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetHomeDataResponseBody extends RuntimeException { return this; } - public GetHomeDataResponseBody build() { - return new GetHomeDataResponseBody( + 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 index 99570f79..2b274fb9 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetHomeDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetHomeDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetHomeDataErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetHomeDataErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetHomeDataErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetHomeDataErrors { return new Builder(); } - public GetHomeDataErrors withCode(double code) { + public GetHomeDataErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetHomeDataErrors withCode(Optional code) { + public GetHomeDataErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetHomeDataErrors { return this; } - public GetHomeDataErrors withStatus(double status) { + public GetHomeDataErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetHomeDataErrors withStatus(Optional status) { + public GetHomeDataErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetHomeDataErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetHomeDataErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataPlexErrors.java new file mode 100644 index 00000000..d68daa30 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataPlexErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetHomeDataPlexErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetHomeDataPlexErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..b6c7f6df --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetHomeDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetHomeDataUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetHomeDataUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetLibraryDetailsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsBadRequest.java index 1900e419..3331bf91 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetLibraryDetailsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetLibraryDetailsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetLibraryDetailsResponseBody extends RuntimeException { +public class GetLibraryDetailsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetLibraryDetailsResponseBody( + public GetLibraryDetailsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetLibraryDetailsResponseBody() { + public GetLibraryDetailsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { return new Builder(); } - public GetLibraryDetailsResponseBody withErrors(List errors) { + public GetLibraryDetailsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetLibraryDetailsResponseBody withErrors(Optional> errors) { + public GetLibraryDetailsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetLibraryDetailsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetLibraryDetailsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetLibraryDetailsResponseBody withRawResponse(Optional> rawResponse) { + public GetLibraryDetailsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetLibraryDetailsResponseBody other = (GetLibraryDetailsResponseBody) o; + GetLibraryDetailsBadRequest other = (GetLibraryDetailsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetLibraryDetailsResponseBody.class, + return Utils.toString(GetLibraryDetailsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetLibraryDetailsResponseBody extends RuntimeException { return this; } - public GetLibraryDetailsResponseBody build() { - return new GetLibraryDetailsResponseBody( + 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 index cb2c456e..be92b17f 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetLibraryDetailsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetLibraryDetailsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetLibraryDetailsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetLibraryDetailsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetLibraryDetailsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetLibraryDetailsErrors { return new Builder(); } - public GetLibraryDetailsErrors withCode(double code) { + public GetLibraryDetailsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetLibraryDetailsErrors withCode(Optional code) { + public GetLibraryDetailsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetLibraryDetailsErrors { return this; } - public GetLibraryDetailsErrors withStatus(double status) { + public GetLibraryDetailsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetLibraryDetailsErrors withStatus(Optional status) { + public GetLibraryDetailsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetLibraryDetailsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetLibraryDetailsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsLibraryErrors.java new file mode 100644 index 00000000..cb229978 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetLibraryDetailsLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryDetailsLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..c7481d3c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetLibraryDetailsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetLibraryDetailsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryDetailsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetLibraryHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsBadRequest.java index 7bf9ee98..33047182 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetLibraryHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetLibraryHubsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetLibraryHubsResponseBody extends RuntimeException { +public class GetLibraryHubsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetLibraryHubsResponseBody( + public GetLibraryHubsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetLibraryHubsResponseBody() { + public GetLibraryHubsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetLibraryHubsResponseBody extends RuntimeException { return new Builder(); } - public GetLibraryHubsResponseBody withErrors(List errors) { + public GetLibraryHubsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetLibraryHubsResponseBody withErrors(Optional> errors) { + public GetLibraryHubsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetLibraryHubsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetLibraryHubsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetLibraryHubsResponseBody withRawResponse(Optional> rawResponse) { + public GetLibraryHubsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetLibraryHubsResponseBody other = (GetLibraryHubsResponseBody) o; + GetLibraryHubsBadRequest other = (GetLibraryHubsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetLibraryHubsResponseBody.class, + return Utils.toString(GetLibraryHubsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetLibraryHubsResponseBody extends RuntimeException { return this; } - public GetLibraryHubsResponseBody build() { - return new GetLibraryHubsResponseBody( + 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 index c00f75ac..bea19a2d 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetLibraryHubsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetLibraryHubsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetLibraryHubsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetLibraryHubsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetLibraryHubsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetLibraryHubsErrors { return new Builder(); } - public GetLibraryHubsErrors withCode(double code) { + public GetLibraryHubsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetLibraryHubsErrors withCode(Optional code) { + public GetLibraryHubsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetLibraryHubsErrors { return this; } - public GetLibraryHubsErrors withStatus(double status) { + public GetLibraryHubsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetLibraryHubsErrors withStatus(Optional status) { + public GetLibraryHubsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetLibraryHubsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetLibraryHubsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsHubsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsHubsErrors.java new file mode 100644 index 00000000..782505f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsHubsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsHubsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsHubsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..176afa21 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetLibraryHubsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetLibraryHubsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetLibraryItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsBadRequest.java index 59cd5390..4e5395ce 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetLibraryItemsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetLibraryItemsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetLibraryItemsResponseBody extends RuntimeException { +public class GetLibraryItemsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetLibraryItemsResponseBody( + public GetLibraryItemsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetLibraryItemsResponseBody() { + public GetLibraryItemsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetLibraryItemsResponseBody extends RuntimeException { return new Builder(); } - public GetLibraryItemsResponseBody withErrors(List errors) { + public GetLibraryItemsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetLibraryItemsResponseBody withErrors(Optional> errors) { + public GetLibraryItemsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetLibraryItemsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetLibraryItemsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetLibraryItemsResponseBody withRawResponse(Optional> rawResponse) { + public GetLibraryItemsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetLibraryItemsResponseBody other = (GetLibraryItemsResponseBody) o; + GetLibraryItemsBadRequest other = (GetLibraryItemsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetLibraryItemsResponseBody.class, + return Utils.toString(GetLibraryItemsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetLibraryItemsResponseBody extends RuntimeException { return this; } - public GetLibraryItemsResponseBody build() { - return new GetLibraryItemsResponseBody( + 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 index e39789cd..f2b6c71c 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetLibraryItemsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetLibraryItemsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetLibraryItemsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetLibraryItemsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetLibraryItemsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetLibraryItemsErrors { return new Builder(); } - public GetLibraryItemsErrors withCode(double code) { + public GetLibraryItemsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetLibraryItemsErrors withCode(Optional code) { + public GetLibraryItemsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetLibraryItemsErrors { return this; } - public GetLibraryItemsErrors withStatus(double status) { + public GetLibraryItemsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetLibraryItemsErrors withStatus(Optional status) { + public GetLibraryItemsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetLibraryItemsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetLibraryItemsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsLibraryErrors.java new file mode 100644 index 00000000..489be724 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..366e24b5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetLibraryItemsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetLibraryItemsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetMediaProvidersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersBadRequest.java index 28063653..4a91b461 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetMediaProvidersResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetMediaProvidersBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetMediaProvidersResponseBody extends RuntimeException { +public class GetMediaProvidersBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetMediaProvidersResponseBody( + public GetMediaProvidersBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetMediaProvidersResponseBody() { + public GetMediaProvidersBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetMediaProvidersResponseBody extends RuntimeException { return new Builder(); } - public GetMediaProvidersResponseBody withErrors(List errors) { + public GetMediaProvidersBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetMediaProvidersResponseBody withErrors(Optional> errors) { + public GetMediaProvidersBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMediaProvidersResponseBody withRawResponse(HttpResponse rawResponse) { + public GetMediaProvidersBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMediaProvidersResponseBody withRawResponse(Optional> rawResponse) { + public GetMediaProvidersBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetMediaProvidersResponseBody other = (GetMediaProvidersResponseBody) o; + GetMediaProvidersBadRequest other = (GetMediaProvidersBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetMediaProvidersResponseBody.class, + return Utils.toString(GetMediaProvidersBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetMediaProvidersResponseBody extends RuntimeException { return this; } - public GetMediaProvidersResponseBody build() { - return new GetMediaProvidersResponseBody( + 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 index e680c187..53c01f5a 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetMediaProvidersErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetMediaProvidersErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetMediaProvidersErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetMediaProvidersErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetMediaProvidersErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetMediaProvidersErrors { return new Builder(); } - public GetMediaProvidersErrors withCode(double code) { + public GetMediaProvidersErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetMediaProvidersErrors withCode(Optional code) { + public GetMediaProvidersErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetMediaProvidersErrors { return this; } - public GetMediaProvidersErrors withStatus(double status) { + public GetMediaProvidersErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetMediaProvidersErrors withStatus(Optional status) { + public GetMediaProvidersErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetMediaProvidersErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetMediaProvidersErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersServerErrors.java new file mode 100644 index 00000000..9be0d1e6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersServerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetMediaProvidersServerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetMediaProvidersServerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..c1b3f2f1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMediaProvidersUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetMediaProvidersUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetMediaProvidersUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetMetaDataByRatingKeyResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyBadRequest.java index 8368641c..c56ee8e0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetMetaDataByRatingKeyResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetMetaDataByRatingKeyBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { +public class GetMetaDataByRatingKeyBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetMetaDataByRatingKeyResponseBody( + public GetMetaDataByRatingKeyBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetMetaDataByRatingKeyResponseBody() { + public GetMetaDataByRatingKeyBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { return new Builder(); } - public GetMetaDataByRatingKeyResponseBody withErrors(List errors) { + public GetMetaDataByRatingKeyBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetMetaDataByRatingKeyResponseBody withErrors(Optional> errors) { + public GetMetaDataByRatingKeyBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMetaDataByRatingKeyResponseBody withRawResponse(HttpResponse rawResponse) { + public GetMetaDataByRatingKeyBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMetaDataByRatingKeyResponseBody withRawResponse(Optional> rawResponse) { + public GetMetaDataByRatingKeyBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetMetaDataByRatingKeyResponseBody other = (GetMetaDataByRatingKeyResponseBody) o; + GetMetaDataByRatingKeyBadRequest other = (GetMetaDataByRatingKeyBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetMetaDataByRatingKeyResponseBody.class, + return Utils.toString(GetMetaDataByRatingKeyBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException { return this; } - public GetMetaDataByRatingKeyResponseBody build() { - return new GetMetaDataByRatingKeyResponseBody( + public GetMetaDataByRatingKeyBadRequest build() { + return new GetMetaDataByRatingKeyBadRequest( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyErrors.java index 0a673ca9..a1beefd4 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetMetaDataByRatingKeyErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetMetaDataByRatingKeyErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetMetaDataByRatingKeyErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetMetaDataByRatingKeyErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetMetaDataByRatingKeyErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetMetaDataByRatingKeyErrors { return new Builder(); } - public GetMetaDataByRatingKeyErrors withCode(double code) { + public GetMetaDataByRatingKeyErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetMetaDataByRatingKeyErrors withCode(Optional code) { + public GetMetaDataByRatingKeyErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetMetaDataByRatingKeyErrors { return this; } - public GetMetaDataByRatingKeyErrors withStatus(double status) { + public GetMetaDataByRatingKeyErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetMetaDataByRatingKeyErrors withStatus(Optional status) { + public GetMetaDataByRatingKeyErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetMetaDataByRatingKeyErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetMetaDataByRatingKeyErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyLibraryErrors.java new file mode 100644 index 00000000..915b0b27 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetMetaDataByRatingKeyLibraryErrors { + + @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 GetMetaDataByRatingKeyLibraryErrors( + @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 GetMetaDataByRatingKeyLibraryErrors() { + 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 final static Builder builder() { + return new Builder(); + } + + public GetMetaDataByRatingKeyLibraryErrors withCode(long code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetMetaDataByRatingKeyLibraryErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetMetaDataByRatingKeyLibraryErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetMetaDataByRatingKeyLibraryErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetMetaDataByRatingKeyLibraryErrors withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetMetaDataByRatingKeyLibraryErrors 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; + } + GetMetaDataByRatingKeyLibraryErrors other = (GetMetaDataByRatingKeyLibraryErrors) o; + return + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetMetaDataByRatingKeyLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetMetaDataByRatingKeyLibraryErrors build() { + return new GetMetaDataByRatingKeyLibraryErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyUnauthorized.java new file mode 100644 index 00000000..e163e791 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetaDataByRatingKeyUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMetaDataByRatingKeyUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +public class GetMetaDataByRatingKeyUnauthorized extends RuntimeException { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("RawResponse") + private Optional> rawResponse; + + @JsonCreator + public GetMetaDataByRatingKeyUnauthorized( + @JsonProperty("errors") Optional> errors, + @JsonProperty("RawResponse") Optional> rawResponse) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetMetaDataByRatingKeyUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetaDataByRatingKeyUnauthorized withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetMetaDataByRatingKeyUnauthorized withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetaDataByRatingKeyUnauthorized withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetaDataByRatingKeyUnauthorized withRawResponse(Optional> rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetaDataByRatingKeyUnauthorized other = (GetMetaDataByRatingKeyUnauthorized) o; + return + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetMetaDataByRatingKeyUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(Optional> rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetMetaDataByRatingKeyUnauthorized build() { + return new GetMetaDataByRatingKeyUnauthorized( + errors, + rawResponse); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenBadRequest.java index 1b7d5a49..621bd79f 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetMetadataChildrenResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetMetadataChildrenBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetMetadataChildrenResponseBody extends RuntimeException { +public class GetMetadataChildrenBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetMetadataChildrenResponseBody( + public GetMetadataChildrenBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetMetadataChildrenResponseBody() { + public GetMetadataChildrenBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { return new Builder(); } - public GetMetadataChildrenResponseBody withErrors(List errors) { + public GetMetadataChildrenBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetMetadataChildrenResponseBody withErrors(Optional> errors) { + public GetMetadataChildrenBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMetadataChildrenResponseBody withRawResponse(HttpResponse rawResponse) { + public GetMetadataChildrenBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMetadataChildrenResponseBody withRawResponse(Optional> rawResponse) { + public GetMetadataChildrenBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetMetadataChildrenResponseBody other = (GetMetadataChildrenResponseBody) o; + GetMetadataChildrenBadRequest other = (GetMetadataChildrenBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetMetadataChildrenResponseBody.class, + return Utils.toString(GetMetadataChildrenBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetMetadataChildrenResponseBody extends RuntimeException { return this; } - public GetMetadataChildrenResponseBody build() { - return new GetMetadataChildrenResponseBody( + 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 index 9782d79f..a761fca0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetMetadataChildrenErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetMetadataChildrenErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetMetadataChildrenErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetMetadataChildrenErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetMetadataChildrenErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetMetadataChildrenErrors { return new Builder(); } - public GetMetadataChildrenErrors withCode(double code) { + public GetMetadataChildrenErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetMetadataChildrenErrors withCode(Optional code) { + public GetMetadataChildrenErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetMetadataChildrenErrors { return this; } - public GetMetadataChildrenErrors withStatus(double status) { + public GetMetadataChildrenErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetMetadataChildrenErrors withStatus(Optional status) { + public GetMetadataChildrenErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetMetadataChildrenErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetMetadataChildrenErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenLibraryErrors.java new file mode 100644 index 00000000..cb33f542 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetMetadataChildrenLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..a4bbdf94 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMetadataChildrenUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetMetadataChildrenUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetMyPlexAccountResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountBadRequest.java index b67972cb..c8191bae 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetMyPlexAccountResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetMyPlexAccountBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetMyPlexAccountResponseBody extends RuntimeException { +public class GetMyPlexAccountBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetMyPlexAccountResponseBody( + public GetMyPlexAccountBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetMyPlexAccountResponseBody() { + public GetMyPlexAccountBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { return new Builder(); } - public GetMyPlexAccountResponseBody withErrors(List errors) { + public GetMyPlexAccountBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetMyPlexAccountResponseBody withErrors(Optional> errors) { + public GetMyPlexAccountBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMyPlexAccountResponseBody withRawResponse(HttpResponse rawResponse) { + public GetMyPlexAccountBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetMyPlexAccountResponseBody withRawResponse(Optional> rawResponse) { + public GetMyPlexAccountBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetMyPlexAccountResponseBody other = (GetMyPlexAccountResponseBody) o; + GetMyPlexAccountBadRequest other = (GetMyPlexAccountBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetMyPlexAccountResponseBody.class, + return Utils.toString(GetMyPlexAccountBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetMyPlexAccountResponseBody extends RuntimeException { return this; } - public GetMyPlexAccountResponseBody build() { - return new GetMyPlexAccountResponseBody( + 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 index 65f9320a..e8a70e6e 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetMyPlexAccountErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetMyPlexAccountErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetMyPlexAccountErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetMyPlexAccountErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetMyPlexAccountErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetMyPlexAccountErrors { return new Builder(); } - public GetMyPlexAccountErrors withCode(double code) { + public GetMyPlexAccountErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetMyPlexAccountErrors withCode(Optional code) { + public GetMyPlexAccountErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetMyPlexAccountErrors { return this; } - public GetMyPlexAccountErrors withStatus(double status) { + public GetMyPlexAccountErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetMyPlexAccountErrors withStatus(Optional status) { + public GetMyPlexAccountErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetMyPlexAccountErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetMyPlexAccountErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountServerErrors.java new file mode 100644 index 00000000..da93f3ac --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountServerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetMyPlexAccountServerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetMyPlexAccountServerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..938702f5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetMyPlexAccountUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetMyPlexAccountUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetMyPlexAccountUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetOnDeckResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckBadRequest.java index 592e0303..f13af948 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetOnDeckResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetOnDeckBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetOnDeckResponseBody extends RuntimeException { +public class GetOnDeckBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetOnDeckResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetOnDeckResponseBody( + public GetOnDeckBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetOnDeckResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetOnDeckResponseBody() { + public GetOnDeckBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetOnDeckResponseBody extends RuntimeException { return new Builder(); } - public GetOnDeckResponseBody withErrors(List errors) { + public GetOnDeckBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetOnDeckResponseBody withErrors(Optional> errors) { + public GetOnDeckBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetOnDeckResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetOnDeckResponseBody withRawResponse(HttpResponse rawResponse) { + public GetOnDeckBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetOnDeckResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetOnDeckResponseBody withRawResponse(Optional> rawResponse) { + public GetOnDeckBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetOnDeckResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetOnDeckResponseBody other = (GetOnDeckResponseBody) o; + GetOnDeckBadRequest other = (GetOnDeckBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetOnDeckResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetOnDeckResponseBody.class, + return Utils.toString(GetOnDeckBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetOnDeckResponseBody extends RuntimeException { return this; } - public GetOnDeckResponseBody build() { - return new GetOnDeckResponseBody( + public GetOnDeckBadRequest build() { + return new GetOnDeckBadRequest( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckErrors.java index cd0ac041..e116e5fe 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetOnDeckErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetOnDeckErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetOnDeckErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetOnDeckErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetOnDeckErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetOnDeckErrors { return new Builder(); } - public GetOnDeckErrors withCode(double code) { + public GetOnDeckErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetOnDeckErrors withCode(Optional code) { + public GetOnDeckErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetOnDeckErrors { return this; } - public GetOnDeckErrors withStatus(double status) { + public GetOnDeckErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetOnDeckErrors withStatus(Optional status) { + public GetOnDeckErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetOnDeckErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetOnDeckErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckLibraryErrors.java new file mode 100644 index 00000000..d9819883 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetOnDeckLibraryErrors { + + @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 GetOnDeckLibraryErrors( + @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 GetOnDeckLibraryErrors() { + 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 final static Builder builder() { + return new Builder(); + } + + public GetOnDeckLibraryErrors withCode(long code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetOnDeckLibraryErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetOnDeckLibraryErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetOnDeckLibraryErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetOnDeckLibraryErrors withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetOnDeckLibraryErrors 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; + } + GetOnDeckLibraryErrors other = (GetOnDeckLibraryErrors) o; + return + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetOnDeckLibraryErrors build() { + return new GetOnDeckLibraryErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckUnauthorized.java new file mode 100644 index 00000000..8ab2a412 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetOnDeckUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetOnDeckUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +public class GetOnDeckUnauthorized extends RuntimeException { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("RawResponse") + private Optional> rawResponse; + + @JsonCreator + public GetOnDeckUnauthorized( + @JsonProperty("errors") Optional> errors, + @JsonProperty("RawResponse") Optional> rawResponse) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetOnDeckUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckUnauthorized withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetOnDeckUnauthorized withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetOnDeckUnauthorized withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetOnDeckUnauthorized withRawResponse(Optional> rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckUnauthorized other = (GetOnDeckUnauthorized) o; + return + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(Optional> rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetOnDeckUnauthorized build() { + return new GetOnDeckUnauthorized( + errors, + rawResponse); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPinResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPinBadRequest.java similarity index 85% rename from src/main/java/dev/plexapi/sdk/models/errors/GetPinResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetPinBadRequest.java index c38243d4..f0dd7203 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPinResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPinBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetPinResponseBody - Bad Request response when the X-Plex-Client-Identifier is missing + * GetPinBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetPinResponseBody extends RuntimeException { +public class GetPinBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetPinResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetPinResponseBody( + public GetPinBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetPinResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetPinResponseBody() { + public GetPinBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetPinResponseBody extends RuntimeException { return new Builder(); } - public GetPinResponseBody withErrors(List errors) { + public GetPinBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetPinResponseBody withErrors(Optional> errors) { + public GetPinBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetPinResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPinResponseBody withRawResponse(HttpResponse rawResponse) { + public GetPinBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetPinResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPinResponseBody withRawResponse(Optional> rawResponse) { + public GetPinBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetPinResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetPinResponseBody other = (GetPinResponseBody) o; + GetPinBadRequest other = (GetPinBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetPinResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetPinResponseBody.class, + return Utils.toString(GetPinBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetPinResponseBody extends RuntimeException { return this; } - public GetPinResponseBody build() { - return new GetPinResponseBody( + public GetPinBadRequest build() { + return new GetPinBadRequest( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistBadRequest.java index 222ffe97..679711c9 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetPlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetPlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetPlaylistResponseBody extends RuntimeException { +public class GetPlaylistBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetPlaylistResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetPlaylistResponseBody( + public GetPlaylistBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetPlaylistResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetPlaylistResponseBody() { + public GetPlaylistBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetPlaylistResponseBody extends RuntimeException { return new Builder(); } - public GetPlaylistResponseBody withErrors(List errors) { + public GetPlaylistBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetPlaylistResponseBody withErrors(Optional> errors) { + public GetPlaylistBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetPlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPlaylistResponseBody withRawResponse(HttpResponse rawResponse) { + public GetPlaylistBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetPlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPlaylistResponseBody withRawResponse(Optional> rawResponse) { + public GetPlaylistBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetPlaylistResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetPlaylistResponseBody other = (GetPlaylistResponseBody) o; + GetPlaylistBadRequest other = (GetPlaylistBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetPlaylistResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetPlaylistResponseBody.class, + return Utils.toString(GetPlaylistBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetPlaylistResponseBody extends RuntimeException { return this; } - public GetPlaylistResponseBody build() { - return new GetPlaylistResponseBody( + public GetPlaylistBadRequest build() { + return new GetPlaylistBadRequest( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsBadRequest.java index dfec2bd8..1cc40a60 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetPlaylistContentsResponseBody extends RuntimeException { +public class GetPlaylistContentsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetPlaylistContentsResponseBody( + public GetPlaylistContentsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetPlaylistContentsResponseBody() { + public GetPlaylistContentsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { return new Builder(); } - public GetPlaylistContentsResponseBody withErrors(List errors) { + public GetPlaylistContentsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetPlaylistContentsResponseBody withErrors(Optional> errors) { + public GetPlaylistContentsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPlaylistContentsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPlaylistContentsResponseBody withRawResponse(Optional> rawResponse) { + public GetPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetPlaylistContentsResponseBody other = (GetPlaylistContentsResponseBody) o; + GetPlaylistContentsBadRequest other = (GetPlaylistContentsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetPlaylistContentsResponseBody.class, + return Utils.toString(GetPlaylistContentsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetPlaylistContentsResponseBody extends RuntimeException { return this; } - public GetPlaylistContentsResponseBody build() { - return new GetPlaylistContentsResponseBody( + 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 index 83b5eb66..ce0d96b2 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetPlaylistContentsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetPlaylistContentsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetPlaylistContentsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetPlaylistContentsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetPlaylistContentsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetPlaylistContentsErrors { return new Builder(); } - public GetPlaylistContentsErrors withCode(double code) { + public GetPlaylistContentsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetPlaylistContentsErrors withCode(Optional code) { + public GetPlaylistContentsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetPlaylistContentsErrors { return this; } - public GetPlaylistContentsErrors withStatus(double status) { + public GetPlaylistContentsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetPlaylistContentsErrors withStatus(Optional status) { + public GetPlaylistContentsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetPlaylistContentsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetPlaylistContentsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsPlaylistsErrors.java new file mode 100644 index 00000000..3255675a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..b31865f0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetPlaylistContentsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 index 29b6df49..c19c82c0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetPlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetPlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetPlaylistErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetPlaylistErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetPlaylistErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetPlaylistErrors { return new Builder(); } - public GetPlaylistErrors withCode(double code) { + public GetPlaylistErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetPlaylistErrors withCode(Optional code) { + public GetPlaylistErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetPlaylistErrors { return this; } - public GetPlaylistErrors withStatus(double status) { + public GetPlaylistErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetPlaylistErrors withStatus(Optional status) { + public GetPlaylistErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetPlaylistErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetPlaylistErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistPlaylistsErrors.java new file mode 100644 index 00000000..3ba0e3d9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetPlaylistPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..3b36b74d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetPlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetPlaylistUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetPlaylistsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsBadRequest.java index 55555e20..dc03f1ad 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetPlaylistsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetPlaylistsResponseBody extends RuntimeException { +public class GetPlaylistsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetPlaylistsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetPlaylistsResponseBody( + public GetPlaylistsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetPlaylistsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetPlaylistsResponseBody() { + public GetPlaylistsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetPlaylistsResponseBody extends RuntimeException { return new Builder(); } - public GetPlaylistsResponseBody withErrors(List errors) { + public GetPlaylistsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetPlaylistsResponseBody withErrors(Optional> errors) { + public GetPlaylistsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetPlaylistsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPlaylistsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetPlaylistsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetPlaylistsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetPlaylistsResponseBody withRawResponse(Optional> rawResponse) { + public GetPlaylistsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetPlaylistsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetPlaylistsResponseBody other = (GetPlaylistsResponseBody) o; + GetPlaylistsBadRequest other = (GetPlaylistsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetPlaylistsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetPlaylistsResponseBody.class, + return Utils.toString(GetPlaylistsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetPlaylistsResponseBody extends RuntimeException { return this; } - public GetPlaylistsResponseBody build() { - return new GetPlaylistsResponseBody( + 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 index a6ed3815..c74a493b 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetPlaylistsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetPlaylistsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetPlaylistsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetPlaylistsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetPlaylistsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetPlaylistsErrors { return new Builder(); } - public GetPlaylistsErrors withCode(double code) { + public GetPlaylistsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetPlaylistsErrors withCode(Optional code) { + public GetPlaylistsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetPlaylistsErrors { return this; } - public GetPlaylistsErrors withStatus(double status) { + public GetPlaylistsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetPlaylistsErrors withStatus(Optional status) { + public GetPlaylistsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetPlaylistsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetPlaylistsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java new file mode 100644 index 00000000..a59cdcc9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetPlaylistsPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..081252ca --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetPlaylistsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetPlaylistsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetRecentlyAddedResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java index 4252e09c..4d4153f9 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetRecentlyAddedResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetRecentlyAddedBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetRecentlyAddedResponseBody extends RuntimeException { +public class GetRecentlyAddedBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetRecentlyAddedResponseBody( + public GetRecentlyAddedBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetRecentlyAddedResponseBody() { + public GetRecentlyAddedBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { return new Builder(); } - public GetRecentlyAddedResponseBody withErrors(List errors) { + public GetRecentlyAddedBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetRecentlyAddedResponseBody withErrors(Optional> errors) { + public GetRecentlyAddedBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRecentlyAddedResponseBody withRawResponse(HttpResponse rawResponse) { + public GetRecentlyAddedBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRecentlyAddedResponseBody withRawResponse(Optional> rawResponse) { + public GetRecentlyAddedBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetRecentlyAddedResponseBody other = (GetRecentlyAddedResponseBody) o; + GetRecentlyAddedBadRequest other = (GetRecentlyAddedBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetRecentlyAddedResponseBody.class, + return Utils.toString(GetRecentlyAddedBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetRecentlyAddedResponseBody extends RuntimeException { return this; } - public GetRecentlyAddedResponseBody build() { - return new GetRecentlyAddedResponseBody( + public GetRecentlyAddedBadRequest build() { + return new GetRecentlyAddedBadRequest( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java index 9ee63da4..1b173570 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetRecentlyAddedErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetRecentlyAddedErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetRecentlyAddedErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetRecentlyAddedErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetRecentlyAddedErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetRecentlyAddedErrors { return new Builder(); } - public GetRecentlyAddedErrors withCode(double code) { + public GetRecentlyAddedErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetRecentlyAddedErrors withCode(Optional code) { + public GetRecentlyAddedErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetRecentlyAddedErrors { return this; } - public GetRecentlyAddedErrors withStatus(double status) { + public GetRecentlyAddedErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetRecentlyAddedErrors withStatus(Optional status) { + public GetRecentlyAddedErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetRecentlyAddedErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetRecentlyAddedErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java new file mode 100644 index 00000000..4153a5f0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetRecentlyAddedLibraryErrors build() { + return new GetRecentlyAddedLibraryErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedUnauthorized.java new file mode 100644 index 00000000..956b28fa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetRecentlyAddedUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +public class GetRecentlyAddedUnauthorized extends RuntimeException { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("RawResponse") + private Optional> rawResponse; + + @JsonCreator + public GetRecentlyAddedUnauthorized( + @JsonProperty("errors") Optional> errors, + @JsonProperty("RawResponse") Optional> rawResponse) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetRecentlyAddedUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedUnauthorized withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetRecentlyAddedUnauthorized withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRecentlyAddedUnauthorized withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRecentlyAddedUnauthorized withRawResponse(Optional> rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedUnauthorized other = (GetRecentlyAddedUnauthorized) o; + return + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(Optional> rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetRecentlyAddedUnauthorized build() { + return new GetRecentlyAddedUnauthorized( + errors, + rawResponse); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java similarity index 81% rename from src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java index da882abc..772e01c1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetRefreshLibraryMetadataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetRefreshLibraryMetadataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { +public class GetRefreshLibraryMetadataBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetRefreshLibraryMetadataResponseBody( + public GetRefreshLibraryMetadataBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetRefreshLibraryMetadataResponseBody() { + public GetRefreshLibraryMetadataBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { return new Builder(); } - public GetRefreshLibraryMetadataResponseBody withErrors(List errors) { + public GetRefreshLibraryMetadataBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetRefreshLibraryMetadataResponseBody withErrors(Optional> errors) { + public GetRefreshLibraryMetadataBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRefreshLibraryMetadataResponseBody withRawResponse(HttpResponse rawResponse) { + public GetRefreshLibraryMetadataBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRefreshLibraryMetadataResponseBody withRawResponse(Optional> rawResponse) { + public GetRefreshLibraryMetadataBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetRefreshLibraryMetadataResponseBody other = (GetRefreshLibraryMetadataResponseBody) o; + GetRefreshLibraryMetadataBadRequest other = (GetRefreshLibraryMetadataBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetRefreshLibraryMetadataResponseBody.class, + return Utils.toString(GetRefreshLibraryMetadataBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetRefreshLibraryMetadataResponseBody extends RuntimeException { return this; } - public GetRefreshLibraryMetadataResponseBody build() { - return new GetRefreshLibraryMetadataResponseBody( + 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 index a8b00bb5..73653378 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetRefreshLibraryMetadataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetRefreshLibraryMetadataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetRefreshLibraryMetadataErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetRefreshLibraryMetadataErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetRefreshLibraryMetadataErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetRefreshLibraryMetadataErrors { return new Builder(); } - public GetRefreshLibraryMetadataErrors withCode(double code) { + public GetRefreshLibraryMetadataErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetRefreshLibraryMetadataErrors withCode(Optional code) { + public GetRefreshLibraryMetadataErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetRefreshLibraryMetadataErrors { return this; } - public GetRefreshLibraryMetadataErrors withStatus(double status) { + public GetRefreshLibraryMetadataErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetRefreshLibraryMetadataErrors withStatus(Optional status) { + public GetRefreshLibraryMetadataErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetRefreshLibraryMetadataErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetRefreshLibraryMetadataErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataLibraryErrors.java new file mode 100644 index 00000000..492e9097 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetRefreshLibraryMetadataLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetRefreshLibraryMetadataLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..87426238 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetRefreshLibraryMetadataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetRefreshLibraryMetadataUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetRefreshLibraryMetadataUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetResizedPhotoResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoBadRequest.java index e8e330a4..a61a88a1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetResizedPhotoResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetResizedPhotoBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetResizedPhotoResponseBody extends RuntimeException { +public class GetResizedPhotoBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetResizedPhotoResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetResizedPhotoResponseBody( + public GetResizedPhotoBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetResizedPhotoResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetResizedPhotoResponseBody() { + public GetResizedPhotoBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetResizedPhotoResponseBody extends RuntimeException { return new Builder(); } - public GetResizedPhotoResponseBody withErrors(List errors) { + public GetResizedPhotoBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetResizedPhotoResponseBody withErrors(Optional> errors) { + public GetResizedPhotoBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetResizedPhotoResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetResizedPhotoResponseBody withRawResponse(HttpResponse rawResponse) { + public GetResizedPhotoBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetResizedPhotoResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetResizedPhotoResponseBody withRawResponse(Optional> rawResponse) { + public GetResizedPhotoBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetResizedPhotoResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetResizedPhotoResponseBody other = (GetResizedPhotoResponseBody) o; + GetResizedPhotoBadRequest other = (GetResizedPhotoBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetResizedPhotoResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetResizedPhotoResponseBody.class, + return Utils.toString(GetResizedPhotoBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetResizedPhotoResponseBody extends RuntimeException { return this; } - public GetResizedPhotoResponseBody build() { - return new GetResizedPhotoResponseBody( + 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 index 87767fd1..ff87f646 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetResizedPhotoErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetResizedPhotoErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetResizedPhotoErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetResizedPhotoErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetResizedPhotoErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetResizedPhotoErrors { return new Builder(); } - public GetResizedPhotoErrors withCode(double code) { + public GetResizedPhotoErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetResizedPhotoErrors withCode(Optional code) { + public GetResizedPhotoErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetResizedPhotoErrors { return this; } - public GetResizedPhotoErrors withStatus(double status) { + public GetResizedPhotoErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetResizedPhotoErrors withStatus(Optional status) { + public GetResizedPhotoErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetResizedPhotoErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetResizedPhotoErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoServerErrors.java new file mode 100644 index 00000000..ce299fdf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoServerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetResizedPhotoServerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetResizedPhotoServerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..da1583b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetResizedPhotoUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetResizedPhotoUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetResizedPhotoUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetResourcesStatisticsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsBadRequest.java index 9d082535..5ccbb7c8 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetResourcesStatisticsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetResourcesStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetResourcesStatisticsResponseBody extends RuntimeException { +public class GetResourcesStatisticsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetResourcesStatisticsResponseBody( + public GetResourcesStatisticsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetResourcesStatisticsResponseBody() { + public GetResourcesStatisticsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { return new Builder(); } - public GetResourcesStatisticsResponseBody withErrors(List errors) { + public GetResourcesStatisticsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetResourcesStatisticsResponseBody withErrors(Optional> errors) { + public GetResourcesStatisticsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetResourcesStatisticsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetResourcesStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetResourcesStatisticsResponseBody withRawResponse(Optional> rawResponse) { + public GetResourcesStatisticsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetResourcesStatisticsResponseBody other = (GetResourcesStatisticsResponseBody) o; + GetResourcesStatisticsBadRequest other = (GetResourcesStatisticsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetResourcesStatisticsResponseBody.class, + return Utils.toString(GetResourcesStatisticsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetResourcesStatisticsResponseBody extends RuntimeException { return this; } - public GetResourcesStatisticsResponseBody build() { - return new GetResourcesStatisticsResponseBody( + 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 index 2a2ecccf..4e242e18 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetResourcesStatisticsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetResourcesStatisticsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetResourcesStatisticsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetResourcesStatisticsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetResourcesStatisticsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetResourcesStatisticsErrors { return new Builder(); } - public GetResourcesStatisticsErrors withCode(double code) { + public GetResourcesStatisticsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetResourcesStatisticsErrors withCode(Optional code) { + public GetResourcesStatisticsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetResourcesStatisticsErrors { return this; } - public GetResourcesStatisticsErrors withStatus(double status) { + public GetResourcesStatisticsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetResourcesStatisticsErrors withStatus(Optional status) { + public GetResourcesStatisticsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetResourcesStatisticsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetResourcesStatisticsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsStatisticsErrors.java new file mode 100644 index 00000000..e099a8fc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsStatisticsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetResourcesStatisticsStatisticsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetResourcesStatisticsStatisticsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..857ec1db --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetResourcesStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetResourcesStatisticsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetResourcesStatisticsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetSearchLibraryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryBadRequest.java index ac183447..ad92b888 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetSearchLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetSearchLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetSearchLibraryResponseBody extends RuntimeException { +public class GetSearchLibraryBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetSearchLibraryResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetSearchLibraryResponseBody( + public GetSearchLibraryBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetSearchLibraryResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetSearchLibraryResponseBody() { + public GetSearchLibraryBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetSearchLibraryResponseBody extends RuntimeException { return new Builder(); } - public GetSearchLibraryResponseBody withErrors(List errors) { + public GetSearchLibraryBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetSearchLibraryResponseBody withErrors(Optional> errors) { + public GetSearchLibraryBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetSearchLibraryResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSearchLibraryResponseBody withRawResponse(HttpResponse rawResponse) { + public GetSearchLibraryBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetSearchLibraryResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSearchLibraryResponseBody withRawResponse(Optional> rawResponse) { + public GetSearchLibraryBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetSearchLibraryResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetSearchLibraryResponseBody other = (GetSearchLibraryResponseBody) o; + GetSearchLibraryBadRequest other = (GetSearchLibraryBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetSearchLibraryResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetSearchLibraryResponseBody.class, + return Utils.toString(GetSearchLibraryBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetSearchLibraryResponseBody extends RuntimeException { return this; } - public GetSearchLibraryResponseBody build() { - return new GetSearchLibraryResponseBody( + 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 index ed47bbd5..8e0b5ec1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetSearchLibraryErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetSearchLibraryErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetSearchLibraryErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetSearchLibraryErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetSearchLibraryErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetSearchLibraryErrors { return new Builder(); } - public GetSearchLibraryErrors withCode(double code) { + public GetSearchLibraryErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetSearchLibraryErrors withCode(Optional code) { + public GetSearchLibraryErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetSearchLibraryErrors { return this; } - public GetSearchLibraryErrors withStatus(double status) { + public GetSearchLibraryErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetSearchLibraryErrors withStatus(Optional status) { + public GetSearchLibraryErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetSearchLibraryErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetSearchLibraryErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryLibraryErrors.java new file mode 100644 index 00000000..7065e389 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetSearchLibraryLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSearchLibraryLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..8f226c1b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetSearchLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetSearchLibraryUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSearchLibraryUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetSearchResultsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsBadRequest.java index da48beb3..869b33f5 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetSearchResultsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetSearchResultsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetSearchResultsResponseBody extends RuntimeException { +public class GetSearchResultsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetSearchResultsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetSearchResultsResponseBody( + public GetSearchResultsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetSearchResultsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetSearchResultsResponseBody() { + public GetSearchResultsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetSearchResultsResponseBody extends RuntimeException { return new Builder(); } - public GetSearchResultsResponseBody withErrors(List errors) { + public GetSearchResultsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetSearchResultsResponseBody withErrors(Optional> errors) { + public GetSearchResultsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetSearchResultsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSearchResultsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetSearchResultsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetSearchResultsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSearchResultsResponseBody withRawResponse(Optional> rawResponse) { + public GetSearchResultsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetSearchResultsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetSearchResultsResponseBody other = (GetSearchResultsResponseBody) o; + GetSearchResultsBadRequest other = (GetSearchResultsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetSearchResultsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetSearchResultsResponseBody.class, + return Utils.toString(GetSearchResultsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetSearchResultsResponseBody extends RuntimeException { return this; } - public GetSearchResultsResponseBody build() { - return new GetSearchResultsResponseBody( + 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 index e85a6126..b33aa8f4 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetSearchResultsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetSearchResultsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetSearchResultsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetSearchResultsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetSearchResultsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetSearchResultsErrors { return new Builder(); } - public GetSearchResultsErrors withCode(double code) { + public GetSearchResultsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetSearchResultsErrors withCode(Optional code) { + public GetSearchResultsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetSearchResultsErrors { return this; } - public GetSearchResultsErrors withStatus(double status) { + public GetSearchResultsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetSearchResultsErrors withStatus(Optional status) { + public GetSearchResultsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetSearchResultsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetSearchResultsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsSearchErrors.java new file mode 100644 index 00000000..da2d8710 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsSearchErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsSearchErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsSearchErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..2936d1ec --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetSearchResultsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetSearchResultsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..d6f0814b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesActivitiesErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetServerActivitiesActivitiesErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerActivitiesActivitiesErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetServerActivitiesActivitiesErrors build() { + return new GetServerActivitiesActivitiesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesBadRequest.java index d1751feb..b869d8a2 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetServerActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetServerActivitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetServerActivitiesResponseBody extends RuntimeException { +public class GetServerActivitiesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetServerActivitiesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetServerActivitiesResponseBody( + public GetServerActivitiesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetServerActivitiesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetServerActivitiesResponseBody() { + public GetServerActivitiesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetServerActivitiesResponseBody extends RuntimeException { return new Builder(); } - public GetServerActivitiesResponseBody withErrors(List errors) { + public GetServerActivitiesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetServerActivitiesResponseBody withErrors(Optional> errors) { + public GetServerActivitiesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetServerActivitiesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerActivitiesResponseBody withRawResponse(HttpResponse rawResponse) { + public GetServerActivitiesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetServerActivitiesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerActivitiesResponseBody withRawResponse(Optional> rawResponse) { + public GetServerActivitiesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetServerActivitiesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetServerActivitiesResponseBody other = (GetServerActivitiesResponseBody) o; + GetServerActivitiesBadRequest other = (GetServerActivitiesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetServerActivitiesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetServerActivitiesResponseBody.class, + return Utils.toString(GetServerActivitiesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetServerActivitiesResponseBody extends RuntimeException { return this; } - public GetServerActivitiesResponseBody build() { - return new GetServerActivitiesResponseBody( + 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 index cad9d4f4..41e59664 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetServerActivitiesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetServerActivitiesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetServerActivitiesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetServerActivitiesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetServerActivitiesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetServerActivitiesErrors { return new Builder(); } - public GetServerActivitiesErrors withCode(double code) { + public GetServerActivitiesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetServerActivitiesErrors withCode(Optional code) { + public GetServerActivitiesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetServerActivitiesErrors { return this; } - public GetServerActivitiesErrors withStatus(double status) { + public GetServerActivitiesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetServerActivitiesErrors withStatus(Optional status) { + public GetServerActivitiesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetServerActivitiesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetServerActivitiesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesUnauthorized.java new file mode 100644 index 00000000..8f22dbcc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetServerActivitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetServerActivitiesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetServerActivitiesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetServerCapabilitiesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesBadRequest.java index d72d4a91..ed9d6648 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetServerCapabilitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetServerCapabilitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetServerCapabilitiesResponseBody extends RuntimeException { +public class GetServerCapabilitiesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetServerCapabilitiesResponseBody( + public GetServerCapabilitiesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetServerCapabilitiesResponseBody() { + public GetServerCapabilitiesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { return new Builder(); } - public GetServerCapabilitiesResponseBody withErrors(List errors) { + public GetServerCapabilitiesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetServerCapabilitiesResponseBody withErrors(Optional> errors) { + public GetServerCapabilitiesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerCapabilitiesResponseBody withRawResponse(HttpResponse rawResponse) { + public GetServerCapabilitiesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerCapabilitiesResponseBody withRawResponse(Optional> rawResponse) { + public GetServerCapabilitiesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetServerCapabilitiesResponseBody other = (GetServerCapabilitiesResponseBody) o; + GetServerCapabilitiesBadRequest other = (GetServerCapabilitiesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetServerCapabilitiesResponseBody.class, + return Utils.toString(GetServerCapabilitiesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetServerCapabilitiesResponseBody extends RuntimeException { return this; } - public GetServerCapabilitiesResponseBody build() { - return new GetServerCapabilitiesResponseBody( + 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 new file mode 100644 index 00000000..f4e24d57 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetServerCapabilitiesErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerCapabilitiesErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..fb2acc79 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetServerCapabilitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetServerCapabilitiesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetServerCapabilitiesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetServerIdentityResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityRequestTimeout.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityRequestTimeout.java index 380ddbf8..8284842c 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityRequestTimeout.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetServerIdentityResponseBody - Request Timeout + * GetServerIdentityRequestTimeout - Request Timeout */ -public class GetServerIdentityResponseBody extends RuntimeException { +public class GetServerIdentityRequestTimeout extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") @@ -39,7 +39,7 @@ public class GetServerIdentityResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetServerIdentityResponseBody( + public GetServerIdentityRequestTimeout( @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, @JsonProperty("RawResponse") Optional> rawResponse) { @@ -51,7 +51,7 @@ public class GetServerIdentityResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetServerIdentityResponseBody() { + public GetServerIdentityRequestTimeout() { this(Optional.empty(), Optional.empty(), Optional.empty()); } @@ -75,25 +75,25 @@ public class GetServerIdentityResponseBody extends RuntimeException { return new Builder(); } - public GetServerIdentityResponseBody withCode(long code) { + public GetServerIdentityRequestTimeout withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetServerIdentityResponseBody withCode(Optional code) { + public GetServerIdentityRequestTimeout withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; } - public GetServerIdentityResponseBody withMessage(String message) { + public GetServerIdentityRequestTimeout withMessage(String message) { Utils.checkNotNull(message, "message"); this.message = Optional.ofNullable(message); return this; } - public GetServerIdentityResponseBody withMessage(Optional message) { + public GetServerIdentityRequestTimeout withMessage(Optional message) { Utils.checkNotNull(message, "message"); this.message = message; return this; @@ -102,7 +102,7 @@ public class GetServerIdentityResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerIdentityResponseBody withRawResponse(HttpResponse rawResponse) { + public GetServerIdentityRequestTimeout withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -111,7 +111,7 @@ public class GetServerIdentityResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerIdentityResponseBody withRawResponse(Optional> rawResponse) { + public GetServerIdentityRequestTimeout withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -125,7 +125,7 @@ public class GetServerIdentityResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetServerIdentityResponseBody other = (GetServerIdentityResponseBody) o; + GetServerIdentityRequestTimeout other = (GetServerIdentityRequestTimeout) o; return Objects.deepEquals(this.code, other.code) && Objects.deepEquals(this.message, other.message) && @@ -142,7 +142,7 @@ public class GetServerIdentityResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetServerIdentityResponseBody.class, + return Utils.toString(GetServerIdentityRequestTimeout.class, "code", code, "message", message, "rawResponse", rawResponse); @@ -202,8 +202,8 @@ public class GetServerIdentityResponseBody extends RuntimeException { return this; } - public GetServerIdentityResponseBody build() { - return new GetServerIdentityResponseBody( + public GetServerIdentityRequestTimeout build() { + return new GetServerIdentityRequestTimeout( code, message, rawResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetServerListResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetServerListBadRequest.java index 01c15c0d..a4620b6e 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetServerListResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetServerListBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetServerListResponseBody extends RuntimeException { +public class GetServerListBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetServerListResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetServerListResponseBody( + public GetServerListBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetServerListResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetServerListResponseBody() { + public GetServerListBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetServerListResponseBody extends RuntimeException { return new Builder(); } - public GetServerListResponseBody withErrors(List errors) { + public GetServerListBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetServerListResponseBody withErrors(Optional> errors) { + public GetServerListBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetServerListResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerListResponseBody withRawResponse(HttpResponse rawResponse) { + public GetServerListBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetServerListResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerListResponseBody withRawResponse(Optional> rawResponse) { + public GetServerListBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetServerListResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetServerListResponseBody other = (GetServerListResponseBody) o; + GetServerListBadRequest other = (GetServerListBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetServerListResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetServerListResponseBody.class, + return Utils.toString(GetServerListBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetServerListResponseBody extends RuntimeException { return this; } - public GetServerListResponseBody build() { - return new GetServerListResponseBody( + 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 index 4fbbdb3f..50dc79fc 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetServerListErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetServerListErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetServerListErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetServerListErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetServerListErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetServerListErrors { return new Builder(); } - public GetServerListErrors withCode(double code) { + public GetServerListErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetServerListErrors withCode(Optional code) { + public GetServerListErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetServerListErrors { return this; } - public GetServerListErrors withStatus(double status) { + public GetServerListErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetServerListErrors withStatus(Optional status) { + public GetServerListErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetServerListErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetServerListErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListServerErrors.java new file mode 100644 index 00000000..faa4821e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListServerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetServerListServerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerListServerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..d07d4d3c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetServerListUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetServerListUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetServerListUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetServerPreferencesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesBadRequest.java index 76adc3a3..ed5384c1 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetServerPreferencesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetServerPreferencesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetServerPreferencesResponseBody extends RuntimeException { +public class GetServerPreferencesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetServerPreferencesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetServerPreferencesResponseBody( + public GetServerPreferencesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetServerPreferencesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetServerPreferencesResponseBody() { + public GetServerPreferencesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetServerPreferencesResponseBody extends RuntimeException { return new Builder(); } - public GetServerPreferencesResponseBody withErrors(List errors) { + public GetServerPreferencesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetServerPreferencesResponseBody withErrors(Optional> errors) { + public GetServerPreferencesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetServerPreferencesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerPreferencesResponseBody withRawResponse(HttpResponse rawResponse) { + public GetServerPreferencesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetServerPreferencesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerPreferencesResponseBody withRawResponse(Optional> rawResponse) { + public GetServerPreferencesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetServerPreferencesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetServerPreferencesResponseBody other = (GetServerPreferencesResponseBody) o; + GetServerPreferencesBadRequest other = (GetServerPreferencesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetServerPreferencesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetServerPreferencesResponseBody.class, + return Utils.toString(GetServerPreferencesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetServerPreferencesResponseBody extends RuntimeException { return this; } - public GetServerPreferencesResponseBody build() { - return new GetServerPreferencesResponseBody( + 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 index fa22ec5a..1541edff 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetServerPreferencesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetServerPreferencesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetServerPreferencesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetServerPreferencesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetServerPreferencesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetServerPreferencesErrors { return new Builder(); } - public GetServerPreferencesErrors withCode(double code) { + public GetServerPreferencesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetServerPreferencesErrors withCode(Optional code) { + public GetServerPreferencesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetServerPreferencesErrors { return this; } - public GetServerPreferencesErrors withStatus(double status) { + public GetServerPreferencesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetServerPreferencesErrors withStatus(Optional status) { + public GetServerPreferencesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetServerPreferencesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetServerPreferencesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesServerErrors.java new file mode 100644 index 00000000..789a2ada --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesServerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetServerPreferencesServerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerPreferencesServerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..65a69d52 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetServerPreferencesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetServerPreferencesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetServerPreferencesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetServerResourcesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesBadRequest.java index efa33bea..82f3c5d5 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetServerResourcesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetServerResourcesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetServerResourcesResponseBody extends RuntimeException { +public class GetServerResourcesBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetServerResourcesResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetServerResourcesResponseBody( + public GetServerResourcesBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetServerResourcesResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetServerResourcesResponseBody() { + public GetServerResourcesBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetServerResourcesResponseBody extends RuntimeException { return new Builder(); } - public GetServerResourcesResponseBody withErrors(List errors) { + public GetServerResourcesBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetServerResourcesResponseBody withErrors(Optional> errors) { + public GetServerResourcesBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetServerResourcesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerResourcesResponseBody withRawResponse(HttpResponse rawResponse) { + public GetServerResourcesBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetServerResourcesResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetServerResourcesResponseBody withRawResponse(Optional> rawResponse) { + public GetServerResourcesBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetServerResourcesResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetServerResourcesResponseBody other = (GetServerResourcesResponseBody) o; + GetServerResourcesBadRequest other = (GetServerResourcesBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetServerResourcesResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetServerResourcesResponseBody.class, + return Utils.toString(GetServerResourcesBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetServerResourcesResponseBody extends RuntimeException { return this; } - public GetServerResourcesResponseBody build() { - return new GetServerResourcesResponseBody( + 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 index 74252a94..164a2650 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetServerResourcesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetServerResourcesErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetServerResourcesErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetServerResourcesErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetServerResourcesErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetServerResourcesErrors { return new Builder(); } - public GetServerResourcesErrors withCode(double code) { + public GetServerResourcesErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetServerResourcesErrors withCode(Optional code) { + public GetServerResourcesErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetServerResourcesErrors { return this; } - public GetServerResourcesErrors withStatus(double status) { + public GetServerResourcesErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetServerResourcesErrors withStatus(Optional status) { + public GetServerResourcesErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetServerResourcesErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetServerResourcesErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesPlexErrors.java new file mode 100644 index 00000000..04725f94 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesPlexErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetServerResourcesPlexErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerResourcesPlexErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..59070fb9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetServerResourcesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetServerResourcesUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetServerResourcesUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetSessionHistoryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryBadRequest.java index b5804d72..65b78382 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetSessionHistoryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetSessionHistoryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetSessionHistoryResponseBody extends RuntimeException { +public class GetSessionHistoryBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetSessionHistoryResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetSessionHistoryResponseBody( + public GetSessionHistoryBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetSessionHistoryResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetSessionHistoryResponseBody() { + public GetSessionHistoryBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetSessionHistoryResponseBody extends RuntimeException { return new Builder(); } - public GetSessionHistoryResponseBody withErrors(List errors) { + public GetSessionHistoryBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetSessionHistoryResponseBody withErrors(Optional> errors) { + public GetSessionHistoryBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetSessionHistoryResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSessionHistoryResponseBody withRawResponse(HttpResponse rawResponse) { + public GetSessionHistoryBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetSessionHistoryResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSessionHistoryResponseBody withRawResponse(Optional> rawResponse) { + public GetSessionHistoryBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetSessionHistoryResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetSessionHistoryResponseBody other = (GetSessionHistoryResponseBody) o; + GetSessionHistoryBadRequest other = (GetSessionHistoryBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetSessionHistoryResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetSessionHistoryResponseBody.class, + return Utils.toString(GetSessionHistoryBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetSessionHistoryResponseBody extends RuntimeException { return this; } - public GetSessionHistoryResponseBody build() { - return new GetSessionHistoryResponseBody( + 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 index ac9812b5..ca70c4d2 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetSessionHistoryErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetSessionHistoryErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetSessionHistoryErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetSessionHistoryErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetSessionHistoryErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetSessionHistoryErrors { return new Builder(); } - public GetSessionHistoryErrors withCode(double code) { + public GetSessionHistoryErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetSessionHistoryErrors withCode(Optional code) { + public GetSessionHistoryErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetSessionHistoryErrors { return this; } - public GetSessionHistoryErrors withStatus(double status) { + public GetSessionHistoryErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetSessionHistoryErrors withStatus(Optional status) { + public GetSessionHistoryErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetSessionHistoryErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetSessionHistoryErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistorySessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistorySessionsErrors.java new file mode 100644 index 00000000..537bf7f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistorySessionsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetSessionHistorySessionsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistorySessionsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..5272ea93 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetSessionHistoryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetSessionHistoryUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistoryUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetSessionsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetSessionsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetSessionsBadRequest.java index 8a8cd22b..f03913a8 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetSessionsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetSessionsResponseBody extends RuntimeException { +public class GetSessionsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetSessionsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetSessionsResponseBody( + public GetSessionsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetSessionsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetSessionsResponseBody() { + public GetSessionsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetSessionsResponseBody extends RuntimeException { return new Builder(); } - public GetSessionsResponseBody withErrors(List errors) { + public GetSessionsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetSessionsResponseBody withErrors(Optional> errors) { + public GetSessionsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetSessionsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSessionsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetSessionsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetSessionsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetSessionsResponseBody withRawResponse(Optional> rawResponse) { + public GetSessionsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetSessionsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetSessionsResponseBody other = (GetSessionsResponseBody) o; + GetSessionsBadRequest other = (GetSessionsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetSessionsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetSessionsResponseBody.class, + return Utils.toString(GetSessionsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetSessionsResponseBody extends RuntimeException { return this; } - public GetSessionsResponseBody build() { - return new GetSessionsResponseBody( + 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 index ac0e8d4f..e5199ad7 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetSessionsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetSessionsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetSessionsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetSessionsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetSessionsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetSessionsErrors { return new Builder(); } - public GetSessionsErrors withCode(double code) { + public GetSessionsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetSessionsErrors withCode(Optional code) { + public GetSessionsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetSessionsErrors { return this; } - public GetSessionsErrors withStatus(double status) { + public GetSessionsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetSessionsErrors withStatus(Optional status) { + public GetSessionsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetSessionsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetSessionsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsSessionsErrors.java new file mode 100644 index 00000000..7f1f154e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsSessionsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetSessionsSessionsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsSessionsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..fe559dc6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetSessionsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetSessionsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..4b8f2b06 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationAuthenticationErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetSourceConnectionInformationAuthenticationErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationAuthenticationErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetSourceConnectionInformationAuthenticationErrors build() { + return new GetSourceConnectionInformationAuthenticationErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationBadRequest.java similarity index 80% rename from src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationBadRequest.java index 3e051533..e5079168 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetSourceConnectionInformationResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetSourceConnectionInformationBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetSourceConnectionInformationResponseBody extends RuntimeException { +public class GetSourceConnectionInformationBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException private Optional> rawResponse; @JsonCreator - public GetSourceConnectionInformationResponseBody( + public GetSourceConnectionInformationBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException this.rawResponse = rawResponse; } - public GetSourceConnectionInformationResponseBody() { + public GetSourceConnectionInformationBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException return new Builder(); } - public GetSourceConnectionInformationResponseBody withErrors(List errors) { + public GetSourceConnectionInformationBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetSourceConnectionInformationResponseBody withErrors(Optional> errors) { + public GetSourceConnectionInformationBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException /** * Raw HTTP response; suitable for custom response parsing */ - public GetSourceConnectionInformationResponseBody withRawResponse(HttpResponse rawResponse) { + public GetSourceConnectionInformationBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException /** * Raw HTTP response; suitable for custom response parsing */ - public GetSourceConnectionInformationResponseBody withRawResponse(Optional> rawResponse) { + public GetSourceConnectionInformationBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException if (o == null || getClass() != o.getClass()) { return false; } - GetSourceConnectionInformationResponseBody other = (GetSourceConnectionInformationResponseBody) o; + GetSourceConnectionInformationBadRequest other = (GetSourceConnectionInformationBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException @Override public String toString() { - return Utils.toString(GetSourceConnectionInformationResponseBody.class, + return Utils.toString(GetSourceConnectionInformationBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetSourceConnectionInformationResponseBody extends RuntimeException return this; } - public GetSourceConnectionInformationResponseBody build() { - return new GetSourceConnectionInformationResponseBody( + 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 index 5b8c0601..cfc768a4 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetSourceConnectionInformationErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetSourceConnectionInformationErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetSourceConnectionInformationErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetSourceConnectionInformationErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetSourceConnectionInformationErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetSourceConnectionInformationErrors { return new Builder(); } - public GetSourceConnectionInformationErrors withCode(double code) { + public GetSourceConnectionInformationErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetSourceConnectionInformationErrors withCode(Optional code) { + public GetSourceConnectionInformationErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetSourceConnectionInformationErrors { return this; } - public GetSourceConnectionInformationErrors withStatus(double status) { + public GetSourceConnectionInformationErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetSourceConnectionInformationErrors withStatus(Optional status) { + public GetSourceConnectionInformationErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetSourceConnectionInformationErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetSourceConnectionInformationErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationUnauthorized.java new file mode 100644 index 00000000..6420f6cf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetSourceConnectionInformationUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetSourceConnectionInformationUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetStatisticsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsBadRequest.java index 6aae97cd..82d34e75 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetStatisticsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetStatisticsResponseBody extends RuntimeException { +public class GetStatisticsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetStatisticsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetStatisticsResponseBody( + public GetStatisticsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetStatisticsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetStatisticsResponseBody() { + public GetStatisticsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetStatisticsResponseBody extends RuntimeException { return new Builder(); } - public GetStatisticsResponseBody withErrors(List errors) { + public GetStatisticsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetStatisticsResponseBody withErrors(Optional> errors) { + public GetStatisticsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetStatisticsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetStatisticsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetStatisticsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetStatisticsResponseBody withRawResponse(Optional> rawResponse) { + public GetStatisticsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetStatisticsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetStatisticsResponseBody other = (GetStatisticsResponseBody) o; + GetStatisticsBadRequest other = (GetStatisticsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetStatisticsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetStatisticsResponseBody.class, + return Utils.toString(GetStatisticsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetStatisticsResponseBody extends RuntimeException { return this; } - public GetStatisticsResponseBody build() { - return new GetStatisticsResponseBody( + 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 index 61e131ea..b2bf46e7 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetStatisticsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetStatisticsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetStatisticsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetStatisticsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetStatisticsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetStatisticsErrors { return new Builder(); } - public GetStatisticsErrors withCode(double code) { + public GetStatisticsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetStatisticsErrors withCode(Optional code) { + public GetStatisticsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetStatisticsErrors { return this; } - public GetStatisticsErrors withStatus(double status) { + public GetStatisticsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetStatisticsErrors withStatus(Optional status) { + public GetStatisticsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetStatisticsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetStatisticsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsStatisticsErrors.java new file mode 100644 index 00000000..12a43001 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsStatisticsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetStatisticsStatisticsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsStatisticsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..be7ef523 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetStatisticsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetThumbImageResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageBadRequest.java index b07cca4f..ca6cb5a5 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetThumbImageResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetThumbImageBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetThumbImageResponseBody extends RuntimeException { +public class GetThumbImageBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetThumbImageResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetThumbImageResponseBody( + public GetThumbImageBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetThumbImageResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetThumbImageResponseBody() { + public GetThumbImageBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetThumbImageResponseBody extends RuntimeException { return new Builder(); } - public GetThumbImageResponseBody withErrors(List errors) { + public GetThumbImageBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetThumbImageResponseBody withErrors(Optional> errors) { + public GetThumbImageBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetThumbImageResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetThumbImageResponseBody withRawResponse(HttpResponse rawResponse) { + public GetThumbImageBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetThumbImageResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetThumbImageResponseBody withRawResponse(Optional> rawResponse) { + public GetThumbImageBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetThumbImageResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetThumbImageResponseBody other = (GetThumbImageResponseBody) o; + GetThumbImageBadRequest other = (GetThumbImageBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetThumbImageResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetThumbImageResponseBody.class, + return Utils.toString(GetThumbImageBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetThumbImageResponseBody extends RuntimeException { return this; } - public GetThumbImageResponseBody build() { - return new GetThumbImageResponseBody( + 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 index 24dc2e98..3db0a2a9 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetThumbImageErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetThumbImageErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetThumbImageErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetThumbImageErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetThumbImageErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetThumbImageErrors { return new Builder(); } - public GetThumbImageErrors withCode(double code) { + public GetThumbImageErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetThumbImageErrors withCode(Optional code) { + public GetThumbImageErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetThumbImageErrors { return this; } - public GetThumbImageErrors withStatus(double status) { + public GetThumbImageErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetThumbImageErrors withStatus(Optional status) { + public GetThumbImageErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetThumbImageErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetThumbImageErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageMediaErrors.java new file mode 100644 index 00000000..00e5d70f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageMediaErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetThumbImageMediaErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetThumbImageMediaErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..2a065b51 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetThumbImageUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetThumbImageUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetThumbImageUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetTimelineResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetTimelineResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetTimelineBadRequest.java index e8c4dadd..b3769f6d 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetTimelineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetTimelineBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetTimelineResponseBody extends RuntimeException { +public class GetTimelineBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetTimelineResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetTimelineResponseBody( + public GetTimelineBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetTimelineResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetTimelineResponseBody() { + public GetTimelineBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetTimelineResponseBody extends RuntimeException { return new Builder(); } - public GetTimelineResponseBody withErrors(List errors) { + public GetTimelineBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetTimelineResponseBody withErrors(Optional> errors) { + public GetTimelineBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetTimelineResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTimelineResponseBody withRawResponse(HttpResponse rawResponse) { + public GetTimelineBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetTimelineResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTimelineResponseBody withRawResponse(Optional> rawResponse) { + public GetTimelineBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetTimelineResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetTimelineResponseBody other = (GetTimelineResponseBody) o; + GetTimelineBadRequest other = (GetTimelineBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetTimelineResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetTimelineResponseBody.class, + return Utils.toString(GetTimelineBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetTimelineResponseBody extends RuntimeException { return this; } - public GetTimelineResponseBody build() { - return new GetTimelineResponseBody( + 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 index a7075fe4..2ad32f9d 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetTimelineErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetTimelineErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetTimelineErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetTimelineErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetTimelineErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetTimelineErrors { return new Builder(); } - public GetTimelineErrors withCode(double code) { + public GetTimelineErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetTimelineErrors withCode(Optional code) { + public GetTimelineErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetTimelineErrors { return this; } - public GetTimelineErrors withStatus(double status) { + public GetTimelineErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetTimelineErrors withStatus(Optional status) { + public GetTimelineErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetTimelineErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetTimelineErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineUnauthorized.java new file mode 100644 index 00000000..80982694 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetTimelineUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetTimelineUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetTimelineUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..f1dcb3ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineVideoErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetTimelineVideoErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTimelineVideoErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetTimelineVideoErrors build() { + return new GetTimelineVideoErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdPlexResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdBadRequest.java similarity index 75% rename from src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdPlexResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdBadRequest.java index bfab92a2..51b8a836 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdPlexResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdBadRequest.java @@ -19,13 +19,13 @@ import java.util.Objects; import java.util.Optional; /** - * GetTokenByPinIdPlexResponseBody - Not Found or Expired + * GetTokenByPinIdBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetTokenByPinIdPlexResponseBody extends RuntimeException { +public class GetTokenByPinIdBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") - private Optional> errors; + private Optional> errors; /** * Raw HTTP response; suitable for custom response parsing @@ -35,8 +35,8 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetTokenByPinIdPlexResponseBody( - @JsonProperty("errors") Optional> errors, + public GetTokenByPinIdBadRequest( + @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); Utils.checkNotNull(rawResponse, "rawResponse"); @@ -44,13 +44,13 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetTokenByPinIdPlexResponseBody() { + public GetTokenByPinIdBadRequest() { this(Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") - public Optional> errors(){ - return (Optional>) errors; + public Optional> errors(){ + return (Optional>) errors; } /** @@ -65,13 +65,13 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { return new Builder(); } - public GetTokenByPinIdPlexResponseBody withErrors(List errors) { + public GetTokenByPinIdBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetTokenByPinIdPlexResponseBody withErrors(Optional> errors) { + public GetTokenByPinIdBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTokenByPinIdPlexResponseBody withRawResponse(HttpResponse rawResponse) { + public GetTokenByPinIdBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTokenByPinIdPlexResponseBody withRawResponse(Optional> rawResponse) { + public GetTokenByPinIdBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetTokenByPinIdPlexResponseBody other = (GetTokenByPinIdPlexResponseBody) o; + GetTokenByPinIdBadRequest other = (GetTokenByPinIdBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,14 +118,14 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetTokenByPinIdPlexResponseBody.class, + return Utils.toString(GetTokenByPinIdBadRequest.class, "errors", errors, "rawResponse", rawResponse); } public final static class Builder { - private Optional> errors = Optional.empty(); + private Optional> errors = Optional.empty(); private Optional> rawResponse; @@ -133,13 +133,13 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { // force use of static builder() method } - public Builder errors(List errors) { + public Builder errors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public Builder errors(Optional> errors) { + public Builder errors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -163,8 +163,8 @@ public class GetTokenByPinIdPlexResponseBody extends RuntimeException { return this; } - public GetTokenByPinIdPlexResponseBody build() { - return new GetTokenByPinIdPlexResponseBody( + public GetTokenByPinIdBadRequest build() { + return new GetTokenByPinIdBadRequest( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java index 6e69052a..e9d754c0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java @@ -19,13 +19,13 @@ import java.util.Objects; import java.util.Optional; /** - * GetTokenByPinIdResponseBody - Bad Request response when the X-Plex-Client-Identifier is missing + * GetTokenByPinIdResponseBody - Not Found or Expired */ public class GetTokenByPinIdResponseBody extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") - private Optional> errors; + private Optional> errors; /** * Raw HTTP response; suitable for custom response parsing @@ -36,7 +36,7 @@ public class GetTokenByPinIdResponseBody extends RuntimeException { @JsonCreator public GetTokenByPinIdResponseBody( - @JsonProperty("errors") Optional> errors, + @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); Utils.checkNotNull(rawResponse, "rawResponse"); @@ -49,8 +49,8 @@ public class GetTokenByPinIdResponseBody extends RuntimeException { } @SuppressWarnings("unchecked") - public Optional> errors(){ - return (Optional>) errors; + public Optional> errors(){ + return (Optional>) errors; } /** @@ -65,13 +65,13 @@ public class GetTokenByPinIdResponseBody extends RuntimeException { return new Builder(); } - public GetTokenByPinIdResponseBody withErrors(List errors) { + public GetTokenByPinIdResponseBody withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetTokenByPinIdResponseBody withErrors(Optional> errors) { + public GetTokenByPinIdResponseBody withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -125,7 +125,7 @@ public class GetTokenByPinIdResponseBody extends RuntimeException { public final static class Builder { - private Optional> errors = Optional.empty(); + private Optional> errors = Optional.empty(); private Optional> rawResponse; @@ -133,13 +133,13 @@ public class GetTokenByPinIdResponseBody extends RuntimeException { // force use of static builder() method } - public Builder errors(List errors) { + public Builder errors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public Builder errors(Optional> errors) { + public Builder errors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsAuthenticationErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsAuthenticationErrors.java new file mode 100644 index 00000000..ac4645b5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsAuthenticationErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetTokenDetailsAuthenticationErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTokenDetailsAuthenticationErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..de50368a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsBadRequest.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetTokenDetailsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetTokenDetailsBadRequest() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetTokenDetailsBadRequest.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..b110d955 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetTokenDetailsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTokenDetailsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..60d001cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetTokenDetailsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetTokenDetailsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetTokenDetailsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetTopWatchedContentResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentBadRequest.java index 98b22ddd..6dfc4d68 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetTopWatchedContentResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetTopWatchedContentBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetTopWatchedContentResponseBody extends RuntimeException { +public class GetTopWatchedContentBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetTopWatchedContentResponseBody( + public GetTopWatchedContentBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetTopWatchedContentResponseBody() { + public GetTopWatchedContentBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { return new Builder(); } - public GetTopWatchedContentResponseBody withErrors(List errors) { + public GetTopWatchedContentBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetTopWatchedContentResponseBody withErrors(Optional> errors) { + public GetTopWatchedContentBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTopWatchedContentResponseBody withRawResponse(HttpResponse rawResponse) { + public GetTopWatchedContentBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTopWatchedContentResponseBody withRawResponse(Optional> rawResponse) { + public GetTopWatchedContentBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetTopWatchedContentResponseBody other = (GetTopWatchedContentResponseBody) o; + GetTopWatchedContentBadRequest other = (GetTopWatchedContentBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetTopWatchedContentResponseBody.class, + return Utils.toString(GetTopWatchedContentBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetTopWatchedContentResponseBody extends RuntimeException { return this; } - public GetTopWatchedContentResponseBody build() { - return new GetTopWatchedContentResponseBody( + 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 index d7e97635..046d2780 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetTopWatchedContentErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetTopWatchedContentErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetTopWatchedContentErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetTopWatchedContentErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetTopWatchedContentErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetTopWatchedContentErrors { return new Builder(); } - public GetTopWatchedContentErrors withCode(double code) { + public GetTopWatchedContentErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetTopWatchedContentErrors withCode(Optional code) { + public GetTopWatchedContentErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetTopWatchedContentErrors { return this; } - public GetTopWatchedContentErrors withStatus(double status) { + public GetTopWatchedContentErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetTopWatchedContentErrors withStatus(Optional status) { + public GetTopWatchedContentErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetTopWatchedContentErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetTopWatchedContentErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentLibraryErrors.java new file mode 100644 index 00000000..ee8340ae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentLibraryErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetTopWatchedContentLibraryErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTopWatchedContentLibraryErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..f68bc34e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetTopWatchedContentUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetTopWatchedContentUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetTopWatchedContentUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetTranscodeSessionsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsBadRequest.java index 1450f8d8..39953f19 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetTranscodeSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetTranscodeSessionsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetTranscodeSessionsResponseBody extends RuntimeException { +public class GetTranscodeSessionsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetTranscodeSessionsResponseBody( + public GetTranscodeSessionsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetTranscodeSessionsResponseBody() { + public GetTranscodeSessionsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { return new Builder(); } - public GetTranscodeSessionsResponseBody withErrors(List errors) { + public GetTranscodeSessionsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetTranscodeSessionsResponseBody withErrors(Optional> errors) { + public GetTranscodeSessionsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTranscodeSessionsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetTranscodeSessionsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTranscodeSessionsResponseBody withRawResponse(Optional> rawResponse) { + public GetTranscodeSessionsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetTranscodeSessionsResponseBody other = (GetTranscodeSessionsResponseBody) o; + GetTranscodeSessionsBadRequest other = (GetTranscodeSessionsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetTranscodeSessionsResponseBody.class, + return Utils.toString(GetTranscodeSessionsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetTranscodeSessionsResponseBody extends RuntimeException { return this; } - public GetTranscodeSessionsResponseBody build() { - return new GetTranscodeSessionsResponseBody( + 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 index ce54d313..100f5a15 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetTranscodeSessionsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetTranscodeSessionsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetTranscodeSessionsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetTranscodeSessionsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetTranscodeSessionsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetTranscodeSessionsErrors { return new Builder(); } - public GetTranscodeSessionsErrors withCode(double code) { + public GetTranscodeSessionsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetTranscodeSessionsErrors withCode(Optional code) { + public GetTranscodeSessionsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetTranscodeSessionsErrors { return this; } - public GetTranscodeSessionsErrors withStatus(double status) { + public GetTranscodeSessionsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetTranscodeSessionsErrors withStatus(Optional status) { + public GetTranscodeSessionsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetTranscodeSessionsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetTranscodeSessionsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsSessionsErrors.java new file mode 100644 index 00000000..e979a224 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsSessionsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetTranscodeSessionsSessionsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTranscodeSessionsSessionsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..e7ab437d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetTranscodeSessionsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetTranscodeSessionsUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetTranscodeSessionsUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..cf32aa79 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenAuthenticationErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetTransientTokenAuthenticationErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenAuthenticationErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetTransientTokenAuthenticationErrors build() { + return new GetTransientTokenAuthenticationErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenBadRequest.java index f2a3f366..1476fe3a 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetTransientTokenResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetTransientTokenBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetTransientTokenResponseBody extends RuntimeException { +public class GetTransientTokenBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetTransientTokenResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetTransientTokenResponseBody( + public GetTransientTokenBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetTransientTokenResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetTransientTokenResponseBody() { + public GetTransientTokenBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetTransientTokenResponseBody extends RuntimeException { return new Builder(); } - public GetTransientTokenResponseBody withErrors(List errors) { + public GetTransientTokenBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetTransientTokenResponseBody withErrors(Optional> errors) { + public GetTransientTokenBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetTransientTokenResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTransientTokenResponseBody withRawResponse(HttpResponse rawResponse) { + public GetTransientTokenBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetTransientTokenResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetTransientTokenResponseBody withRawResponse(Optional> rawResponse) { + public GetTransientTokenBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetTransientTokenResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetTransientTokenResponseBody other = (GetTransientTokenResponseBody) o; + GetTransientTokenBadRequest other = (GetTransientTokenBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetTransientTokenResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetTransientTokenResponseBody.class, + return Utils.toString(GetTransientTokenBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetTransientTokenResponseBody extends RuntimeException { return this; } - public GetTransientTokenResponseBody build() { - return new GetTransientTokenResponseBody( + 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 index 5b3f7dfe..75f04c7e 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetTransientTokenErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetTransientTokenErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetTransientTokenErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetTransientTokenErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetTransientTokenErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetTransientTokenErrors { return new Builder(); } - public GetTransientTokenErrors withCode(double code) { + public GetTransientTokenErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetTransientTokenErrors withCode(Optional code) { + public GetTransientTokenErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetTransientTokenErrors { return this; } - public GetTransientTokenErrors withStatus(double status) { + public GetTransientTokenErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetTransientTokenErrors withStatus(Optional status) { + public GetTransientTokenErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetTransientTokenErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetTransientTokenErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenUnauthorized.java new file mode 100644 index 00000000..6fb1ad7f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetTransientTokenUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetTransientTokenUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetUpdateStatusResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusBadRequest.java index e80d0dbd..c3d7fb97 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetUpdateStatusResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetUpdateStatusBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetUpdateStatusResponseBody extends RuntimeException { +public class GetUpdateStatusBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetUpdateStatusResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetUpdateStatusResponseBody( + public GetUpdateStatusBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetUpdateStatusResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetUpdateStatusResponseBody() { + public GetUpdateStatusBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetUpdateStatusResponseBody extends RuntimeException { return new Builder(); } - public GetUpdateStatusResponseBody withErrors(List errors) { + public GetUpdateStatusBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetUpdateStatusResponseBody withErrors(Optional> errors) { + public GetUpdateStatusBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetUpdateStatusResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetUpdateStatusResponseBody withRawResponse(HttpResponse rawResponse) { + public GetUpdateStatusBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetUpdateStatusResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetUpdateStatusResponseBody withRawResponse(Optional> rawResponse) { + public GetUpdateStatusBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetUpdateStatusResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetUpdateStatusResponseBody other = (GetUpdateStatusResponseBody) o; + GetUpdateStatusBadRequest other = (GetUpdateStatusBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetUpdateStatusResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetUpdateStatusResponseBody.class, + return Utils.toString(GetUpdateStatusBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetUpdateStatusResponseBody extends RuntimeException { return this; } - public GetUpdateStatusResponseBody build() { - return new GetUpdateStatusResponseBody( + 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 index 330f79e9..e13d79d5 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetUpdateStatusErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetUpdateStatusErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetUpdateStatusErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetUpdateStatusErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetUpdateStatusErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetUpdateStatusErrors { return new Builder(); } - public GetUpdateStatusErrors withCode(double code) { + public GetUpdateStatusErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetUpdateStatusErrors withCode(Optional code) { + public GetUpdateStatusErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetUpdateStatusErrors { return this; } - public GetUpdateStatusErrors withStatus(double status) { + public GetUpdateStatusErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetUpdateStatusErrors withStatus(Optional status) { + public GetUpdateStatusErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetUpdateStatusErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetUpdateStatusErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUnauthorized.java new file mode 100644 index 00000000..b020ee52 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetUpdateStatusUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetUpdateStatusUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetUpdateStatusUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..7be916e1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUpdaterErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetUpdateStatusUpdaterErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetUpdateStatusUpdaterErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetUpdateStatusUpdaterErrors build() { + return new GetUpdateStatusUpdaterErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsBadRequest.java index 6d0d7349..6368ed8b 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetUserFriendsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetUserFriendsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetUserFriendsResponseBody extends RuntimeException { +public class GetUserFriendsBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetUserFriendsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetUserFriendsResponseBody( + public GetUserFriendsBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetUserFriendsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetUserFriendsResponseBody() { + public GetUserFriendsBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetUserFriendsResponseBody extends RuntimeException { return new Builder(); } - public GetUserFriendsResponseBody withErrors(List errors) { + public GetUserFriendsBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetUserFriendsResponseBody withErrors(Optional> errors) { + public GetUserFriendsBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetUserFriendsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetUserFriendsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetUserFriendsBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetUserFriendsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetUserFriendsResponseBody withRawResponse(Optional> rawResponse) { + public GetUserFriendsBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetUserFriendsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetUserFriendsResponseBody other = (GetUserFriendsResponseBody) o; + GetUserFriendsBadRequest other = (GetUserFriendsBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetUserFriendsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetUserFriendsResponseBody.class, + return Utils.toString(GetUserFriendsBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetUserFriendsResponseBody extends RuntimeException { return this; } - public GetUserFriendsResponseBody build() { - return new GetUserFriendsResponseBody( + 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 index 261e9451..bb904d43 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetUserFriendsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetUserFriendsErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetUserFriendsErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetUserFriendsErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetUserFriendsErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetUserFriendsErrors { return new Builder(); } - public GetUserFriendsErrors withCode(double code) { + public GetUserFriendsErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetUserFriendsErrors withCode(Optional code) { + public GetUserFriendsErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetUserFriendsErrors { return this; } - public GetUserFriendsErrors withStatus(double status) { + public GetUserFriendsErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetUserFriendsErrors withStatus(Optional status) { + public GetUserFriendsErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetUserFriendsErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetUserFriendsErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsPlexErrors.java new file mode 100644 index 00000000..093a748b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsPlexErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetUserFriendsPlexErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetUserFriendsPlexErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetUserFriendsPlexErrors build() { + return new GetUserFriendsPlexErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsUnauthorized.java similarity index 77% rename from src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsUnauthorized.java index b2bd7c19..88ca7616 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserDetailsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsUnauthorized.java @@ -19,13 +19,13 @@ import java.util.Objects; import java.util.Optional; /** - * GetUserDetailsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetUserFriendsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -public class GetUserDetailsResponseBody extends RuntimeException { +public class GetUserFriendsUnauthorized extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") - private Optional> errors; + private Optional> errors; /** * Raw HTTP response; suitable for custom response parsing @@ -35,8 +35,8 @@ public class GetUserDetailsResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetUserDetailsResponseBody( - @JsonProperty("errors") Optional> errors, + public GetUserFriendsUnauthorized( + @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); Utils.checkNotNull(rawResponse, "rawResponse"); @@ -44,13 +44,13 @@ public class GetUserDetailsResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetUserDetailsResponseBody() { + public GetUserFriendsUnauthorized() { this(Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") - public Optional> errors(){ - return (Optional>) errors; + public Optional> errors(){ + return (Optional>) errors; } /** @@ -65,13 +65,13 @@ public class GetUserDetailsResponseBody extends RuntimeException { return new Builder(); } - public GetUserDetailsResponseBody withErrors(List errors) { + public GetUserFriendsUnauthorized withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetUserDetailsResponseBody withErrors(Optional> errors) { + public GetUserFriendsUnauthorized withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetUserDetailsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetUserDetailsResponseBody withRawResponse(HttpResponse rawResponse) { + public GetUserFriendsUnauthorized withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetUserDetailsResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetUserDetailsResponseBody withRawResponse(Optional> rawResponse) { + public GetUserFriendsUnauthorized withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetUserDetailsResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetUserDetailsResponseBody other = (GetUserDetailsResponseBody) o; + GetUserFriendsUnauthorized other = (GetUserFriendsUnauthorized) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,14 +118,14 @@ public class GetUserDetailsResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetUserDetailsResponseBody.class, + return Utils.toString(GetUserFriendsUnauthorized.class, "errors", errors, "rawResponse", rawResponse); } public final static class Builder { - private Optional> errors = Optional.empty(); + private Optional> errors = Optional.empty(); private Optional> rawResponse; @@ -133,13 +133,13 @@ public class GetUserDetailsResponseBody extends RuntimeException { // force use of static builder() method } - public Builder errors(List errors) { + public Builder errors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public Builder errors(Optional> errors) { + public Builder errors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -163,8 +163,8 @@ public class GetUserDetailsResponseBody extends RuntimeException { return this; } - public GetUserDetailsResponseBody build() { - return new GetUserDetailsResponseBody( + public GetUserFriendsUnauthorized build() { + return new GetUserFriendsUnauthorized( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/GetWatchListResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetWatchListBadRequest.java index d9e19dad..ebf76cf0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetWatchListResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetWatchListBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetWatchListResponseBody extends RuntimeException { +public class GetWatchListBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetWatchListResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetWatchListResponseBody( + public GetWatchListBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetWatchListResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public GetWatchListResponseBody() { + public GetWatchListBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetWatchListResponseBody extends RuntimeException { return new Builder(); } - public GetWatchListResponseBody withErrors(List errors) { + public GetWatchListBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetWatchListResponseBody withErrors(Optional> errors) { + public GetWatchListBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetWatchListResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetWatchListResponseBody withRawResponse(HttpResponse rawResponse) { + public GetWatchListBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetWatchListResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetWatchListResponseBody withRawResponse(Optional> rawResponse) { + public GetWatchListBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetWatchListResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetWatchListResponseBody other = (GetWatchListResponseBody) o; + GetWatchListBadRequest other = (GetWatchListBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetWatchListResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(GetWatchListResponseBody.class, + return Utils.toString(GetWatchListBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetWatchListResponseBody extends RuntimeException { return this; } - public GetWatchListResponseBody build() { - return new GetWatchListResponseBody( + 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 index cb6bf899..d81acf69 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class GetWatchListErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class GetWatchListErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public GetWatchListErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class GetWatchListErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class GetWatchListErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class GetWatchListErrors { return new Builder(); } - public GetWatchListErrors withCode(double code) { + public GetWatchListErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetWatchListErrors withCode(Optional code) { + public GetWatchListErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class GetWatchListErrors { return this; } - public GetWatchListErrors withStatus(double status) { + public GetWatchListErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetWatchListErrors withStatus(Optional status) { + public GetWatchListErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class GetWatchListErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class GetWatchListErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListUnauthorized.java new file mode 100644 index 00000000..842443ff --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetWatchListUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public GetWatchListUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetWatchListUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..628f8b9a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListWatchlistErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public GetWatchListWatchlistErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetWatchListWatchlistErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 GetWatchListWatchlistErrors build() { + return new GetWatchListWatchlistErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogLineResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/LogLineBadRequest.java similarity index 85% rename from src/main/java/dev/plexapi/sdk/models/errors/LogLineResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/LogLineBadRequest.java index edf8af26..1bab9d31 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogLineResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogLineBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * LogLineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * LogLineBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class LogLineResponseBody extends RuntimeException { +public class LogLineBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class LogLineResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public LogLineResponseBody( + public LogLineBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class LogLineResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public LogLineResponseBody() { + public LogLineBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class LogLineResponseBody extends RuntimeException { return new Builder(); } - public LogLineResponseBody withErrors(List errors) { + public LogLineBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public LogLineResponseBody withErrors(Optional> errors) { + public LogLineBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class LogLineResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public LogLineResponseBody withRawResponse(HttpResponse rawResponse) { + public LogLineBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class LogLineResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public LogLineResponseBody withRawResponse(Optional> rawResponse) { + public LogLineBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class LogLineResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - LogLineResponseBody other = (LogLineResponseBody) o; + LogLineBadRequest other = (LogLineBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class LogLineResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(LogLineResponseBody.class, + return Utils.toString(LogLineBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class LogLineResponseBody extends RuntimeException { return this; } - public LogLineResponseBody build() { - return new LogLineResponseBody( + 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 index f0739a02..42e25cfd 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogLineErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogLineErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class LogLineErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class LogLineErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public LogLineErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class LogLineErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class LogLineErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class LogLineErrors { return new Builder(); } - public LogLineErrors withCode(double code) { + public LogLineErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public LogLineErrors withCode(Optional code) { + public LogLineErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class LogLineErrors { return this; } - public LogLineErrors withStatus(double status) { + public LogLineErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public LogLineErrors withStatus(Optional status) { + public LogLineErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class LogLineErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class LogLineErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogLineLogErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/LogLineLogErrors.java new file mode 100644 index 00000000..20ab7410 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogLineLogErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public LogLineLogErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(LogLineLogErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..bfa50d48 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogLineUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * LogLineUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public LogLineUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(LogLineUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/LogMultiLineResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineBadRequest.java index 5e59a4e0..117dea76 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * LogMultiLineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * LogMultiLineBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class LogMultiLineResponseBody extends RuntimeException { +public class LogMultiLineBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class LogMultiLineResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public LogMultiLineResponseBody( + public LogMultiLineBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class LogMultiLineResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public LogMultiLineResponseBody() { + public LogMultiLineBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class LogMultiLineResponseBody extends RuntimeException { return new Builder(); } - public LogMultiLineResponseBody withErrors(List errors) { + public LogMultiLineBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public LogMultiLineResponseBody withErrors(Optional> errors) { + public LogMultiLineBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class LogMultiLineResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public LogMultiLineResponseBody withRawResponse(HttpResponse rawResponse) { + public LogMultiLineBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class LogMultiLineResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public LogMultiLineResponseBody withRawResponse(Optional> rawResponse) { + public LogMultiLineBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class LogMultiLineResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - LogMultiLineResponseBody other = (LogMultiLineResponseBody) o; + LogMultiLineBadRequest other = (LogMultiLineBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class LogMultiLineResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(LogMultiLineResponseBody.class, + return Utils.toString(LogMultiLineBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class LogMultiLineResponseBody extends RuntimeException { return this; } - public LogMultiLineResponseBody build() { - return new LogMultiLineResponseBody( + 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 index 831ffb55..de658861 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class LogMultiLineErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class LogMultiLineErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public LogMultiLineErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class LogMultiLineErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class LogMultiLineErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class LogMultiLineErrors { return new Builder(); } - public LogMultiLineErrors withCode(double code) { + public LogMultiLineErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public LogMultiLineErrors withCode(Optional code) { + public LogMultiLineErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class LogMultiLineErrors { return this; } - public LogMultiLineErrors withStatus(double status) { + public LogMultiLineErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public LogMultiLineErrors withStatus(Optional status) { + public LogMultiLineErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class LogMultiLineErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class LogMultiLineErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineLogErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineLogErrors.java new file mode 100644 index 00000000..1a29ff49 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineLogErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public LogMultiLineLogErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(LogMultiLineLogErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..863198f3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * LogMultiLineUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public LogMultiLineUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(LogMultiLineUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/MarkPlayedResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedBadRequest.java index 8b883b78..19092586 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * MarkPlayedResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * MarkPlayedBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class MarkPlayedResponseBody extends RuntimeException { +public class MarkPlayedBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class MarkPlayedResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public MarkPlayedResponseBody( + public MarkPlayedBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class MarkPlayedResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public MarkPlayedResponseBody() { + public MarkPlayedBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class MarkPlayedResponseBody extends RuntimeException { return new Builder(); } - public MarkPlayedResponseBody withErrors(List errors) { + public MarkPlayedBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public MarkPlayedResponseBody withErrors(Optional> errors) { + public MarkPlayedBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class MarkPlayedResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public MarkPlayedResponseBody withRawResponse(HttpResponse rawResponse) { + public MarkPlayedBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class MarkPlayedResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public MarkPlayedResponseBody withRawResponse(Optional> rawResponse) { + public MarkPlayedBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class MarkPlayedResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - MarkPlayedResponseBody other = (MarkPlayedResponseBody) o; + MarkPlayedBadRequest other = (MarkPlayedBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class MarkPlayedResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(MarkPlayedResponseBody.class, + return Utils.toString(MarkPlayedBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class MarkPlayedResponseBody extends RuntimeException { return this; } - public MarkPlayedResponseBody build() { - return new MarkPlayedResponseBody( + 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 index c69118f3..4bf9b543 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class MarkPlayedErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class MarkPlayedErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public MarkPlayedErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class MarkPlayedErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class MarkPlayedErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class MarkPlayedErrors { return new Builder(); } - public MarkPlayedErrors withCode(double code) { + public MarkPlayedErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public MarkPlayedErrors withCode(Optional code) { + public MarkPlayedErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class MarkPlayedErrors { return this; } - public MarkPlayedErrors withStatus(double status) { + public MarkPlayedErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public MarkPlayedErrors withStatus(Optional status) { + public MarkPlayedErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class MarkPlayedErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class MarkPlayedErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedMediaErrors.java new file mode 100644 index 00000000..13569be3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedMediaErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public MarkPlayedMediaErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(MarkPlayedMediaErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..3a51bcfd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * MarkPlayedUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public MarkPlayedUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(MarkPlayedUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/MarkUnplayedResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedBadRequest.java index 93e94ad9..b296ee4a 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * MarkUnplayedResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * MarkUnplayedBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class MarkUnplayedResponseBody extends RuntimeException { +public class MarkUnplayedBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class MarkUnplayedResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public MarkUnplayedResponseBody( + public MarkUnplayedBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class MarkUnplayedResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public MarkUnplayedResponseBody() { + public MarkUnplayedBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class MarkUnplayedResponseBody extends RuntimeException { return new Builder(); } - public MarkUnplayedResponseBody withErrors(List errors) { + public MarkUnplayedBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public MarkUnplayedResponseBody withErrors(Optional> errors) { + public MarkUnplayedBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class MarkUnplayedResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public MarkUnplayedResponseBody withRawResponse(HttpResponse rawResponse) { + public MarkUnplayedBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class MarkUnplayedResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public MarkUnplayedResponseBody withRawResponse(Optional> rawResponse) { + public MarkUnplayedBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class MarkUnplayedResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - MarkUnplayedResponseBody other = (MarkUnplayedResponseBody) o; + MarkUnplayedBadRequest other = (MarkUnplayedBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class MarkUnplayedResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(MarkUnplayedResponseBody.class, + return Utils.toString(MarkUnplayedBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class MarkUnplayedResponseBody extends RuntimeException { return this; } - public MarkUnplayedResponseBody build() { - return new MarkUnplayedResponseBody( + 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 index 04c44168..59af176b 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class MarkUnplayedErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class MarkUnplayedErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public MarkUnplayedErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class MarkUnplayedErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class MarkUnplayedErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class MarkUnplayedErrors { return new Builder(); } - public MarkUnplayedErrors withCode(double code) { + public MarkUnplayedErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public MarkUnplayedErrors withCode(Optional code) { + public MarkUnplayedErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class MarkUnplayedErrors { return this; } - public MarkUnplayedErrors withStatus(double status) { + public MarkUnplayedErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public MarkUnplayedErrors withStatus(Optional status) { + public MarkUnplayedErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class MarkUnplayedErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class MarkUnplayedErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedMediaErrors.java new file mode 100644 index 00000000..efc35d3c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedMediaErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public MarkUnplayedMediaErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(MarkUnplayedMediaErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..3cb74782 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * MarkUnplayedUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public MarkUnplayedUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(MarkUnplayedUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/PerformSearchResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/PerformSearchResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/PerformSearchBadRequest.java index b788d737..a027c3a4 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * PerformSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * PerformSearchBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class PerformSearchResponseBody extends RuntimeException { +public class PerformSearchBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class PerformSearchResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public PerformSearchResponseBody( + public PerformSearchBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class PerformSearchResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public PerformSearchResponseBody() { + public PerformSearchBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class PerformSearchResponseBody extends RuntimeException { return new Builder(); } - public PerformSearchResponseBody withErrors(List errors) { + public PerformSearchBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public PerformSearchResponseBody withErrors(Optional> errors) { + public PerformSearchBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class PerformSearchResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public PerformSearchResponseBody withRawResponse(HttpResponse rawResponse) { + public PerformSearchBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class PerformSearchResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public PerformSearchResponseBody withRawResponse(Optional> rawResponse) { + public PerformSearchBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class PerformSearchResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - PerformSearchResponseBody other = (PerformSearchResponseBody) o; + PerformSearchBadRequest other = (PerformSearchBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class PerformSearchResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(PerformSearchResponseBody.class, + return Utils.toString(PerformSearchBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class PerformSearchResponseBody extends RuntimeException { return this; } - public PerformSearchResponseBody build() { - return new PerformSearchResponseBody( + 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 index 745fef65..24e3818e 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class PerformSearchErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class PerformSearchErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public PerformSearchErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class PerformSearchErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class PerformSearchErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class PerformSearchErrors { return new Builder(); } - public PerformSearchErrors withCode(double code) { + public PerformSearchErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public PerformSearchErrors withCode(Optional code) { + public PerformSearchErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class PerformSearchErrors { return this; } - public PerformSearchErrors withStatus(double status) { + public PerformSearchErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public PerformSearchErrors withStatus(Optional status) { + public PerformSearchErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class PerformSearchErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class PerformSearchErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchSearchErrors.java new file mode 100644 index 00000000..7d62afff --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchSearchErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public PerformSearchSearchErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(PerformSearchSearchErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..8445ebf8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * PerformSearchUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public PerformSearchUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PerformSearchUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/PerformVoiceSearchResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchBadRequest.java index ac10ae1f..46e68d71 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * PerformVoiceSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * PerformVoiceSearchBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class PerformVoiceSearchResponseBody extends RuntimeException { +public class PerformVoiceSearchBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public PerformVoiceSearchResponseBody( + public PerformVoiceSearchBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public PerformVoiceSearchResponseBody() { + public PerformVoiceSearchBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { return new Builder(); } - public PerformVoiceSearchResponseBody withErrors(List errors) { + public PerformVoiceSearchBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public PerformVoiceSearchResponseBody withErrors(Optional> errors) { + public PerformVoiceSearchBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public PerformVoiceSearchResponseBody withRawResponse(HttpResponse rawResponse) { + public PerformVoiceSearchBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public PerformVoiceSearchResponseBody withRawResponse(Optional> rawResponse) { + public PerformVoiceSearchBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - PerformVoiceSearchResponseBody other = (PerformVoiceSearchResponseBody) o; + PerformVoiceSearchBadRequest other = (PerformVoiceSearchBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(PerformVoiceSearchResponseBody.class, + return Utils.toString(PerformVoiceSearchBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class PerformVoiceSearchResponseBody extends RuntimeException { return this; } - public PerformVoiceSearchResponseBody build() { - return new PerformVoiceSearchResponseBody( + 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 index 9de28911..95b67b1c 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class PerformVoiceSearchErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class PerformVoiceSearchErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public PerformVoiceSearchErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class PerformVoiceSearchErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class PerformVoiceSearchErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class PerformVoiceSearchErrors { return new Builder(); } - public PerformVoiceSearchErrors withCode(double code) { + public PerformVoiceSearchErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public PerformVoiceSearchErrors withCode(Optional code) { + public PerformVoiceSearchErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class PerformVoiceSearchErrors { return this; } - public PerformVoiceSearchErrors withStatus(double status) { + public PerformVoiceSearchErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public PerformVoiceSearchErrors withStatus(Optional status) { + public PerformVoiceSearchErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class PerformVoiceSearchErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class PerformVoiceSearchErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchSearchErrors.java new file mode 100644 index 00000000..422c0525 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchSearchErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public PerformVoiceSearchSearchErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(PerformVoiceSearchSearchErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..62d2e195 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * PerformVoiceSearchUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public PerformVoiceSearchUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PerformVoiceSearchUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..823b5815 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataAuthenticationErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public PostUsersSignInDataAuthenticationErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(PostUsersSignInDataAuthenticationErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 PostUsersSignInDataAuthenticationErrors build() { + return new PostUsersSignInDataAuthenticationErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataBadRequest.java index c4c5d525..cdd0254a 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * PostUsersSignInDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * PostUsersSignInDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class PostUsersSignInDataResponseBody extends RuntimeException { +public class PostUsersSignInDataBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public PostUsersSignInDataResponseBody( + public PostUsersSignInDataBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public PostUsersSignInDataResponseBody() { + public PostUsersSignInDataBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { return new Builder(); } - public PostUsersSignInDataResponseBody withErrors(List errors) { + public PostUsersSignInDataBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public PostUsersSignInDataResponseBody withErrors(Optional> errors) { + public PostUsersSignInDataBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public PostUsersSignInDataResponseBody withRawResponse(HttpResponse rawResponse) { + public PostUsersSignInDataBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public PostUsersSignInDataResponseBody withRawResponse(Optional> rawResponse) { + public PostUsersSignInDataBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - PostUsersSignInDataResponseBody other = (PostUsersSignInDataResponseBody) o; + PostUsersSignInDataBadRequest other = (PostUsersSignInDataBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(PostUsersSignInDataResponseBody.class, + return Utils.toString(PostUsersSignInDataBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class PostUsersSignInDataResponseBody extends RuntimeException { return this; } - public PostUsersSignInDataResponseBody build() { - return new PostUsersSignInDataResponseBody( + 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 index 009caad3..5b5aef67 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class PostUsersSignInDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class PostUsersSignInDataErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public PostUsersSignInDataErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class PostUsersSignInDataErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class PostUsersSignInDataErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class PostUsersSignInDataErrors { return new Builder(); } - public PostUsersSignInDataErrors withCode(double code) { + public PostUsersSignInDataErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public PostUsersSignInDataErrors withCode(Optional code) { + public PostUsersSignInDataErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class PostUsersSignInDataErrors { return this; } - public PostUsersSignInDataErrors withStatus(double status) { + public PostUsersSignInDataErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public PostUsersSignInDataErrors withStatus(Optional status) { + public PostUsersSignInDataErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class PostUsersSignInDataErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class PostUsersSignInDataErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataUnauthorized.java new file mode 100644 index 00000000..44600dcb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * PostUsersSignInDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public PostUsersSignInDataUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PostUsersSignInDataUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/StartAllTasksResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksBadRequest.java index ee903e41..5aee4989 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * StartAllTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * StartAllTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class StartAllTasksResponseBody extends RuntimeException { +public class StartAllTasksBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class StartAllTasksResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public StartAllTasksResponseBody( + public StartAllTasksBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class StartAllTasksResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public StartAllTasksResponseBody() { + public StartAllTasksBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class StartAllTasksResponseBody extends RuntimeException { return new Builder(); } - public StartAllTasksResponseBody withErrors(List errors) { + public StartAllTasksBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public StartAllTasksResponseBody withErrors(Optional> errors) { + public StartAllTasksBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class StartAllTasksResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StartAllTasksResponseBody withRawResponse(HttpResponse rawResponse) { + public StartAllTasksBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class StartAllTasksResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StartAllTasksResponseBody withRawResponse(Optional> rawResponse) { + public StartAllTasksBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class StartAllTasksResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - StartAllTasksResponseBody other = (StartAllTasksResponseBody) o; + StartAllTasksBadRequest other = (StartAllTasksBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class StartAllTasksResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(StartAllTasksResponseBody.class, + return Utils.toString(StartAllTasksBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class StartAllTasksResponseBody extends RuntimeException { return this; } - public StartAllTasksResponseBody build() { - return new StartAllTasksResponseBody( + 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 new file mode 100644 index 00000000..8784d7d5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksButlerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public StartAllTasksButlerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StartAllTasksButlerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 index 97b4a04e..da2abc21 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class StartAllTasksErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class StartAllTasksErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public StartAllTasksErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class StartAllTasksErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class StartAllTasksErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class StartAllTasksErrors { return new Builder(); } - public StartAllTasksErrors withCode(double code) { + public StartAllTasksErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public StartAllTasksErrors withCode(Optional code) { + public StartAllTasksErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class StartAllTasksErrors { return this; } - public StartAllTasksErrors withStatus(double status) { + public StartAllTasksErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public StartAllTasksErrors withStatus(Optional status) { + public StartAllTasksErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class StartAllTasksErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class StartAllTasksErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksUnauthorized.java new file mode 100644 index 00000000..f63a97f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * StartAllTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public StartAllTasksUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartAllTasksUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/StartTaskResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/StartTaskResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/StartTaskBadRequest.java index 107d19dc..ba9b00c0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * StartTaskResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * StartTaskBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class StartTaskResponseBody extends RuntimeException { +public class StartTaskBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class StartTaskResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public StartTaskResponseBody( + public StartTaskBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class StartTaskResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public StartTaskResponseBody() { + public StartTaskBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class StartTaskResponseBody extends RuntimeException { return new Builder(); } - public StartTaskResponseBody withErrors(List errors) { + public StartTaskBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public StartTaskResponseBody withErrors(Optional> errors) { + public StartTaskBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class StartTaskResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StartTaskResponseBody withRawResponse(HttpResponse rawResponse) { + public StartTaskBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class StartTaskResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StartTaskResponseBody withRawResponse(Optional> rawResponse) { + public StartTaskBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class StartTaskResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - StartTaskResponseBody other = (StartTaskResponseBody) o; + StartTaskBadRequest other = (StartTaskBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class StartTaskResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(StartTaskResponseBody.class, + return Utils.toString(StartTaskBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class StartTaskResponseBody extends RuntimeException { return this; } - public StartTaskResponseBody build() { - return new StartTaskResponseBody( + 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 new file mode 100644 index 00000000..c2f5d4e1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskButlerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public StartTaskButlerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StartTaskButlerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 index 9af3cab5..f10e4e92 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class StartTaskErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class StartTaskErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public StartTaskErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class StartTaskErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class StartTaskErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class StartTaskErrors { return new Builder(); } - public StartTaskErrors withCode(double code) { + public StartTaskErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public StartTaskErrors withCode(Optional code) { + public StartTaskErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class StartTaskErrors { return this; } - public StartTaskErrors withStatus(double status) { + public StartTaskErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public StartTaskErrors withStatus(Optional status) { + public StartTaskErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class StartTaskErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class StartTaskErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskUnauthorized.java new file mode 100644 index 00000000..96eee535 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * StartTaskUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public StartTaskUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartTaskUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/StartUniversalTranscodeResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeBadRequest.java similarity index 81% rename from src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeBadRequest.java index 71c3bc13..785c03b9 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * StartUniversalTranscodeResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * StartUniversalTranscodeBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class StartUniversalTranscodeResponseBody extends RuntimeException { +public class StartUniversalTranscodeBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public StartUniversalTranscodeResponseBody( + public StartUniversalTranscodeBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public StartUniversalTranscodeResponseBody() { + public StartUniversalTranscodeBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { return new Builder(); } - public StartUniversalTranscodeResponseBody withErrors(List errors) { + public StartUniversalTranscodeBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public StartUniversalTranscodeResponseBody withErrors(Optional> errors) { + public StartUniversalTranscodeBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StartUniversalTranscodeResponseBody withRawResponse(HttpResponse rawResponse) { + public StartUniversalTranscodeBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StartUniversalTranscodeResponseBody withRawResponse(Optional> rawResponse) { + public StartUniversalTranscodeBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - StartUniversalTranscodeResponseBody other = (StartUniversalTranscodeResponseBody) o; + StartUniversalTranscodeBadRequest other = (StartUniversalTranscodeBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(StartUniversalTranscodeResponseBody.class, + return Utils.toString(StartUniversalTranscodeBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class StartUniversalTranscodeResponseBody extends RuntimeException { return this; } - public StartUniversalTranscodeResponseBody build() { - return new StartUniversalTranscodeResponseBody( + 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 index fe71121d..93ec3076 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class StartUniversalTranscodeErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class StartUniversalTranscodeErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public StartUniversalTranscodeErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class StartUniversalTranscodeErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class StartUniversalTranscodeErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class StartUniversalTranscodeErrors { return new Builder(); } - public StartUniversalTranscodeErrors withCode(double code) { + public StartUniversalTranscodeErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public StartUniversalTranscodeErrors withCode(Optional code) { + public StartUniversalTranscodeErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class StartUniversalTranscodeErrors { return this; } - public StartUniversalTranscodeErrors withStatus(double status) { + public StartUniversalTranscodeErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public StartUniversalTranscodeErrors withStatus(Optional status) { + public StartUniversalTranscodeErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class StartUniversalTranscodeErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class StartUniversalTranscodeErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeUnauthorized.java new file mode 100644 index 00000000..f3996e4c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * StartUniversalTranscodeUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public StartUniversalTranscodeUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartUniversalTranscodeUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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 new file mode 100644 index 00000000..d5a7b822 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeVideoErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public StartUniversalTranscodeVideoErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StartUniversalTranscodeVideoErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 StartUniversalTranscodeVideoErrors build() { + return new StartUniversalTranscodeVideoErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksBadRequest.java index 2e399e32..15b49995 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * StopAllTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * StopAllTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class StopAllTasksResponseBody extends RuntimeException { +public class StopAllTasksBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class StopAllTasksResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public StopAllTasksResponseBody( + public StopAllTasksBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class StopAllTasksResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public StopAllTasksResponseBody() { + public StopAllTasksBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class StopAllTasksResponseBody extends RuntimeException { return new Builder(); } - public StopAllTasksResponseBody withErrors(List errors) { + public StopAllTasksBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public StopAllTasksResponseBody withErrors(Optional> errors) { + public StopAllTasksBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class StopAllTasksResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StopAllTasksResponseBody withRawResponse(HttpResponse rawResponse) { + public StopAllTasksBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class StopAllTasksResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StopAllTasksResponseBody withRawResponse(Optional> rawResponse) { + public StopAllTasksBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class StopAllTasksResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - StopAllTasksResponseBody other = (StopAllTasksResponseBody) o; + StopAllTasksBadRequest other = (StopAllTasksBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class StopAllTasksResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(StopAllTasksResponseBody.class, + return Utils.toString(StopAllTasksBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class StopAllTasksResponseBody extends RuntimeException { return this; } - public StopAllTasksResponseBody build() { - return new StopAllTasksResponseBody( + 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 new file mode 100644 index 00000000..07e05d1f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksButlerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public StopAllTasksButlerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StopAllTasksButlerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 index b864587c..30608af4 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class StopAllTasksErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class StopAllTasksErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public StopAllTasksErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class StopAllTasksErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class StopAllTasksErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class StopAllTasksErrors { return new Builder(); } - public StopAllTasksErrors withCode(double code) { + public StopAllTasksErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public StopAllTasksErrors withCode(Optional code) { + public StopAllTasksErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class StopAllTasksErrors { return this; } - public StopAllTasksErrors withStatus(double status) { + public StopAllTasksErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public StopAllTasksErrors withStatus(Optional status) { + public StopAllTasksErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class StopAllTasksErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class StopAllTasksErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksUnauthorized.java new file mode 100644 index 00000000..b02d9319 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * StopAllTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public StopAllTasksUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StopAllTasksUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/StopTaskResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskBadRequest.java similarity index 84% rename from src/main/java/dev/plexapi/sdk/models/errors/StopTaskResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/StopTaskBadRequest.java index 8c33291a..e0ec3f91 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * StopTaskResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * StopTaskBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class StopTaskResponseBody extends RuntimeException { +public class StopTaskBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class StopTaskResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public StopTaskResponseBody( + public StopTaskBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class StopTaskResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public StopTaskResponseBody() { + public StopTaskBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class StopTaskResponseBody extends RuntimeException { return new Builder(); } - public StopTaskResponseBody withErrors(List errors) { + public StopTaskBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public StopTaskResponseBody withErrors(Optional> errors) { + public StopTaskBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class StopTaskResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StopTaskResponseBody withRawResponse(HttpResponse rawResponse) { + public StopTaskBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class StopTaskResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StopTaskResponseBody withRawResponse(Optional> rawResponse) { + public StopTaskBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class StopTaskResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - StopTaskResponseBody other = (StopTaskResponseBody) o; + StopTaskBadRequest other = (StopTaskBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class StopTaskResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(StopTaskResponseBody.class, + return Utils.toString(StopTaskBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class StopTaskResponseBody extends RuntimeException { return this; } - public StopTaskResponseBody build() { - return new StopTaskResponseBody( + 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 new file mode 100644 index 00000000..243f128a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskButlerErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public StopTaskButlerErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StopTaskButlerErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 index 94a173ff..a16387d8 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class StopTaskErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class StopTaskErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public StopTaskErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class StopTaskErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class StopTaskErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class StopTaskErrors { return new Builder(); } - public StopTaskErrors withCode(double code) { + public StopTaskErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public StopTaskErrors withCode(Optional code) { + public StopTaskErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class StopTaskErrors { return this; } - public StopTaskErrors withStatus(double status) { + public StopTaskErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public StopTaskErrors withStatus(Optional status) { + public StopTaskErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class StopTaskErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class StopTaskErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskUnauthorized.java new file mode 100644 index 00000000..1d354d26 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * StopTaskUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public StopTaskUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StopTaskUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/StopTranscodeSessionResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionBadRequest.java index de752089..1e74cdbd 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * StopTranscodeSessionResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * StopTranscodeSessionBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class StopTranscodeSessionResponseBody extends RuntimeException { +public class StopTranscodeSessionBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public StopTranscodeSessionResponseBody( + public StopTranscodeSessionBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public StopTranscodeSessionResponseBody() { + public StopTranscodeSessionBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { return new Builder(); } - public StopTranscodeSessionResponseBody withErrors(List errors) { + public StopTranscodeSessionBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public StopTranscodeSessionResponseBody withErrors(Optional> errors) { + public StopTranscodeSessionBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StopTranscodeSessionResponseBody withRawResponse(HttpResponse rawResponse) { + public StopTranscodeSessionBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public StopTranscodeSessionResponseBody withRawResponse(Optional> rawResponse) { + public StopTranscodeSessionBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - StopTranscodeSessionResponseBody other = (StopTranscodeSessionResponseBody) o; + StopTranscodeSessionBadRequest other = (StopTranscodeSessionBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(StopTranscodeSessionResponseBody.class, + return Utils.toString(StopTranscodeSessionBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class StopTranscodeSessionResponseBody extends RuntimeException { return this; } - public StopTranscodeSessionResponseBody build() { - return new StopTranscodeSessionResponseBody( + 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 index 5068e951..e6fb746e 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class StopTranscodeSessionErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class StopTranscodeSessionErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public StopTranscodeSessionErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class StopTranscodeSessionErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class StopTranscodeSessionErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class StopTranscodeSessionErrors { return new Builder(); } - public StopTranscodeSessionErrors withCode(double code) { + public StopTranscodeSessionErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public StopTranscodeSessionErrors withCode(Optional code) { + public StopTranscodeSessionErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class StopTranscodeSessionErrors { return this; } - public StopTranscodeSessionErrors withStatus(double status) { + public StopTranscodeSessionErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public StopTranscodeSessionErrors withStatus(Optional status) { + public StopTranscodeSessionErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class StopTranscodeSessionErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class StopTranscodeSessionErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionSessionsErrors.java new file mode 100644 index 00000000..8ae7787b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionSessionsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public StopTranscodeSessionSessionsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StopTranscodeSessionSessionsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..d071ea5b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * StopTranscodeSessionUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public StopTranscodeSessionUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StopTranscodeSessionUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/UpdatePlayProgressResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressBadRequest.java index bbd10412..f8c49e27 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * UpdatePlayProgressResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * UpdatePlayProgressBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class UpdatePlayProgressResponseBody extends RuntimeException { +public class UpdatePlayProgressBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public UpdatePlayProgressResponseBody( + public UpdatePlayProgressBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public UpdatePlayProgressResponseBody() { + public UpdatePlayProgressBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { return new Builder(); } - public UpdatePlayProgressResponseBody withErrors(List errors) { + public UpdatePlayProgressBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public UpdatePlayProgressResponseBody withErrors(Optional> errors) { + public UpdatePlayProgressBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public UpdatePlayProgressResponseBody withRawResponse(HttpResponse rawResponse) { + public UpdatePlayProgressBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public UpdatePlayProgressResponseBody withRawResponse(Optional> rawResponse) { + public UpdatePlayProgressBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - UpdatePlayProgressResponseBody other = (UpdatePlayProgressResponseBody) o; + UpdatePlayProgressBadRequest other = (UpdatePlayProgressBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(UpdatePlayProgressResponseBody.class, + return Utils.toString(UpdatePlayProgressBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class UpdatePlayProgressResponseBody extends RuntimeException { return this; } - public UpdatePlayProgressResponseBody build() { - return new UpdatePlayProgressResponseBody( + 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 index 89eb1080..9b7bced0 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class UpdatePlayProgressErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class UpdatePlayProgressErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public UpdatePlayProgressErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class UpdatePlayProgressErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class UpdatePlayProgressErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class UpdatePlayProgressErrors { return new Builder(); } - public UpdatePlayProgressErrors withCode(double code) { + public UpdatePlayProgressErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public UpdatePlayProgressErrors withCode(Optional code) { + public UpdatePlayProgressErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class UpdatePlayProgressErrors { return this; } - public UpdatePlayProgressErrors withStatus(double status) { + public UpdatePlayProgressErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public UpdatePlayProgressErrors withStatus(Optional status) { + public UpdatePlayProgressErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class UpdatePlayProgressErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class UpdatePlayProgressErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressMediaErrors.java new file mode 100644 index 00000000..97296440 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressMediaErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public UpdatePlayProgressMediaErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlayProgressMediaErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..70c58e5b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * UpdatePlayProgressUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public UpdatePlayProgressUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlayProgressUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/UpdatePlaylistResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistBadRequest.java index b60fc040..58277946 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * UpdatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * UpdatePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class UpdatePlaylistResponseBody extends RuntimeException { +public class UpdatePlaylistBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class UpdatePlaylistResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public UpdatePlaylistResponseBody( + public UpdatePlaylistBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class UpdatePlaylistResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public UpdatePlaylistResponseBody() { + public UpdatePlaylistBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class UpdatePlaylistResponseBody extends RuntimeException { return new Builder(); } - public UpdatePlaylistResponseBody withErrors(List errors) { + public UpdatePlaylistBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public UpdatePlaylistResponseBody withErrors(Optional> errors) { + public UpdatePlaylistBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class UpdatePlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public UpdatePlaylistResponseBody withRawResponse(HttpResponse rawResponse) { + public UpdatePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class UpdatePlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public UpdatePlaylistResponseBody withRawResponse(Optional> rawResponse) { + public UpdatePlaylistBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class UpdatePlaylistResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - UpdatePlaylistResponseBody other = (UpdatePlaylistResponseBody) o; + UpdatePlaylistBadRequest other = (UpdatePlaylistBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class UpdatePlaylistResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(UpdatePlaylistResponseBody.class, + return Utils.toString(UpdatePlaylistBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class UpdatePlaylistResponseBody extends RuntimeException { return this; } - public UpdatePlaylistResponseBody build() { - return new UpdatePlaylistResponseBody( + 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 index a8c13db4..6c160b4e 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class UpdatePlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class UpdatePlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public UpdatePlaylistErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class UpdatePlaylistErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class UpdatePlaylistErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class UpdatePlaylistErrors { return new Builder(); } - public UpdatePlaylistErrors withCode(double code) { + public UpdatePlaylistErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public UpdatePlaylistErrors withCode(Optional code) { + public UpdatePlaylistErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class UpdatePlaylistErrors { return this; } - public UpdatePlaylistErrors withStatus(double status) { + public UpdatePlaylistErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public UpdatePlaylistErrors withStatus(Optional status) { + public UpdatePlaylistErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class UpdatePlaylistErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class UpdatePlaylistErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistPlaylistsErrors.java new file mode 100644 index 00000000..173b7d03 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public UpdatePlaylistPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlaylistPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..591e5eb8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * UpdatePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public UpdatePlaylistUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlaylistUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/UploadPlaylistResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistBadRequest.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistResponseBody.java rename to src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistBadRequest.java index 0b584b28..b79e7dd7 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * UploadPlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * UploadPlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class UploadPlaylistResponseBody extends RuntimeException { +public class UploadPlaylistBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class UploadPlaylistResponseBody extends RuntimeException { private Optional> rawResponse; @JsonCreator - public UploadPlaylistResponseBody( + public UploadPlaylistBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class UploadPlaylistResponseBody extends RuntimeException { this.rawResponse = rawResponse; } - public UploadPlaylistResponseBody() { + public UploadPlaylistBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class UploadPlaylistResponseBody extends RuntimeException { return new Builder(); } - public UploadPlaylistResponseBody withErrors(List errors) { + public UploadPlaylistBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public UploadPlaylistResponseBody withErrors(Optional> errors) { + public UploadPlaylistBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class UploadPlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public UploadPlaylistResponseBody withRawResponse(HttpResponse rawResponse) { + public UploadPlaylistBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class UploadPlaylistResponseBody extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public UploadPlaylistResponseBody withRawResponse(Optional> rawResponse) { + public UploadPlaylistBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class UploadPlaylistResponseBody extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - UploadPlaylistResponseBody other = (UploadPlaylistResponseBody) o; + UploadPlaylistBadRequest other = (UploadPlaylistBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class UploadPlaylistResponseBody extends RuntimeException { @Override public String toString() { - return Utils.toString(UploadPlaylistResponseBody.class, + return Utils.toString(UploadPlaylistBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class UploadPlaylistResponseBody extends RuntimeException { return this; } - public UploadPlaylistResponseBody build() { - return new UploadPlaylistResponseBody( + 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 index 3e5a84c1..8b2fe791 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistErrors.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -22,7 +22,7 @@ public class UploadPlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") - private Optional code; + private Optional code; @JsonInclude(Include.NON_ABSENT) @JsonProperty("message") @@ -30,13 +30,13 @@ public class UploadPlaylistErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; @JsonCreator public UploadPlaylistErrors( - @JsonProperty("code") Optional code, + @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { + @JsonProperty("status") Optional status) { Utils.checkNotNull(code, "code"); Utils.checkNotNull(message, "message"); Utils.checkNotNull(status, "status"); @@ -50,7 +50,7 @@ public class UploadPlaylistErrors { } @JsonIgnore - public Optional code() { + public Optional code() { return code; } @@ -60,7 +60,7 @@ public class UploadPlaylistErrors { } @JsonIgnore - public Optional status() { + public Optional status() { return status; } @@ -68,13 +68,13 @@ public class UploadPlaylistErrors { return new Builder(); } - public UploadPlaylistErrors withCode(double code) { + public UploadPlaylistErrors withCode(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public UploadPlaylistErrors withCode(Optional code) { + public UploadPlaylistErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -92,13 +92,13 @@ public class UploadPlaylistErrors { return this; } - public UploadPlaylistErrors withStatus(double status) { + public UploadPlaylistErrors withStatus(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public UploadPlaylistErrors withStatus(Optional status) { + public UploadPlaylistErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -137,23 +137,23 @@ public class UploadPlaylistErrors { public final static class Builder { - private Optional code = Optional.empty(); + private Optional code = Optional.empty(); private Optional message = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder code(double code) { + public Builder code(long code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public Builder code(Optional code) { + public Builder code(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -171,13 +171,13 @@ public class UploadPlaylistErrors { return this; } - public Builder status(double status) { + public Builder status(long status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistPlaylistsErrors.java new file mode 100644 index 00000000..1eabb122 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistPlaylistsErrors.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class 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 final static Builder builder() { + return new Builder(); + } + + public UploadPlaylistPlaylistsErrors withCode(long 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(long 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 + Objects.deepEquals(this.code, other.code) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(UploadPlaylistPlaylistsErrors.class, + "code", code, + "message", message, + "status", status); + } + + 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(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 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 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 new file mode 100644 index 00000000..b255588e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistUnauthorized.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * UploadPlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +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) { + Utils.checkNotNull(errors, "errors"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.errors = errors; + this.rawResponse = rawResponse; + } + + public UploadPlaylistUnauthorized() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + public Optional> errors(){ + return (Optional>) errors; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @SuppressWarnings("unchecked") + public Optional> rawResponse(){ + return (Optional>) rawResponse; + } + + public final 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 + Objects.deepEquals(this.errors, other.errors) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UploadPlaylistUnauthorized.class, + "errors", errors, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Optional> rawResponse; + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = Optional.ofNullable(rawResponse); + return 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/GetAllLibrariesDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java index b10b8c76..8602e53c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -80,21 +81,21 @@ public class GetAllLibrariesDirectory { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedAt") - private Optional updatedAt; + private Optional updatedAt; /** * Unix epoch datetime */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdAt") - private Optional createdAt; + private Optional createdAt; /** * Unix epoch datetime */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("scannedAt") - private Optional scannedAt; + private Optional scannedAt; @JsonInclude(Include.NON_ABSENT) @JsonProperty("content") @@ -131,9 +132,9 @@ public class GetAllLibrariesDirectory { @JsonProperty("scanner") Optional scanner, @JsonProperty("language") Optional language, @JsonProperty("uuid") Optional uuid, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("createdAt") Optional createdAt, - @JsonProperty("scannedAt") Optional scannedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("createdAt") Optional createdAt, + @JsonProperty("scannedAt") Optional scannedAt, @JsonProperty("content") Optional content, @JsonProperty("directory") Optional directory, @JsonProperty("contentChangedAt") Optional contentChangedAt, @@ -256,7 +257,7 @@ public class GetAllLibrariesDirectory { * Unix epoch datetime */ @JsonIgnore - public Optional updatedAt() { + public Optional updatedAt() { return updatedAt; } @@ -264,7 +265,7 @@ public class GetAllLibrariesDirectory { * Unix epoch datetime */ @JsonIgnore - public Optional createdAt() { + public Optional createdAt() { return createdAt; } @@ -272,7 +273,7 @@ public class GetAllLibrariesDirectory { * Unix epoch datetime */ @JsonIgnore - public Optional scannedAt() { + public Optional scannedAt() { return scannedAt; } @@ -465,7 +466,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public GetAllLibrariesDirectory withUpdatedAt(int updatedAt) { + public GetAllLibrariesDirectory withUpdatedAt(long updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = Optional.ofNullable(updatedAt); return this; @@ -474,7 +475,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public GetAllLibrariesDirectory withUpdatedAt(Optional updatedAt) { + public GetAllLibrariesDirectory withUpdatedAt(Optional updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; @@ -483,7 +484,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public GetAllLibrariesDirectory withCreatedAt(int createdAt) { + public GetAllLibrariesDirectory withCreatedAt(long createdAt) { Utils.checkNotNull(createdAt, "createdAt"); this.createdAt = Optional.ofNullable(createdAt); return this; @@ -492,7 +493,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public GetAllLibrariesDirectory withCreatedAt(Optional createdAt) { + public GetAllLibrariesDirectory withCreatedAt(Optional createdAt) { Utils.checkNotNull(createdAt, "createdAt"); this.createdAt = createdAt; return this; @@ -501,7 +502,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public GetAllLibrariesDirectory withScannedAt(int scannedAt) { + public GetAllLibrariesDirectory withScannedAt(long scannedAt) { Utils.checkNotNull(scannedAt, "scannedAt"); this.scannedAt = Optional.ofNullable(scannedAt); return this; @@ -510,7 +511,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public GetAllLibrariesDirectory withScannedAt(Optional scannedAt) { + public GetAllLibrariesDirectory withScannedAt(Optional scannedAt) { Utils.checkNotNull(scannedAt, "scannedAt"); this.scannedAt = scannedAt; return this; @@ -689,11 +690,11 @@ public class GetAllLibrariesDirectory { private Optional uuid = Optional.empty(); - private Optional updatedAt = Optional.empty(); + private Optional updatedAt = Optional.empty(); - private Optional createdAt = Optional.empty(); + private Optional createdAt = Optional.empty(); - private Optional scannedAt = Optional.empty(); + private Optional scannedAt = Optional.empty(); private Optional content = Optional.empty(); @@ -868,7 +869,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public Builder updatedAt(int updatedAt) { + public Builder updatedAt(long updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = Optional.ofNullable(updatedAt); return this; @@ -877,7 +878,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(Optional updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; @@ -886,7 +887,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public Builder createdAt(int createdAt) { + public Builder createdAt(long createdAt) { Utils.checkNotNull(createdAt, "createdAt"); this.createdAt = Optional.ofNullable(createdAt); return this; @@ -895,7 +896,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public Builder createdAt(Optional createdAt) { + public Builder createdAt(Optional createdAt) { Utils.checkNotNull(createdAt, "createdAt"); this.createdAt = createdAt; return this; @@ -904,7 +905,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public Builder scannedAt(int scannedAt) { + public Builder scannedAt(long scannedAt) { Utils.checkNotNull(scannedAt, "scannedAt"); this.scannedAt = Optional.ofNullable(scannedAt); return this; @@ -913,7 +914,7 @@ public class GetAllLibrariesDirectory { /** * Unix epoch datetime */ - public Builder scannedAt(Optional scannedAt) { + public Builder scannedAt(Optional scannedAt) { Utils.checkNotNull(scannedAt, "scannedAt"); this.scannedAt = scannedAt; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java index a7ff93c7..59c43485 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java @@ -29,12 +29,6 @@ public class GetServerResourcesRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") private Optional xPlexClientIdentifier; - /** - * Plex Authentication Token - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token") - private String xPlexToken; - /** * Include Https entries in the results */ @@ -58,25 +52,21 @@ public class GetServerResourcesRequest { @JsonCreator public GetServerResourcesRequest( Optional xPlexClientIdentifier, - String xPlexToken, Optional includeHttps, Optional includeRelay, Optional includeIPv6) { Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - Utils.checkNotNull(xPlexToken, "xPlexToken"); Utils.checkNotNull(includeHttps, "includeHttps"); Utils.checkNotNull(includeRelay, "includeRelay"); Utils.checkNotNull(includeIPv6, "includeIPv6"); this.xPlexClientIdentifier = xPlexClientIdentifier; - this.xPlexToken = xPlexToken; this.includeHttps = includeHttps; this.includeRelay = includeRelay; this.includeIPv6 = includeIPv6; } - public GetServerResourcesRequest( - String xPlexToken) { - this(Optional.empty(), xPlexToken, Optional.empty(), Optional.empty(), Optional.empty()); + public GetServerResourcesRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -90,14 +80,6 @@ public class GetServerResourcesRequest { return xPlexClientIdentifier; } - /** - * Plex Authentication Token - */ - @JsonIgnore - public String xPlexToken() { - return xPlexToken; - } - /** * Include Https entries in the results */ @@ -155,15 +137,6 @@ public class GetServerResourcesRequest { return this; } - /** - * Plex Authentication Token - */ - public GetServerResourcesRequest withXPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - /** * Include Https entries in the results */ @@ -233,7 +206,6 @@ public class GetServerResourcesRequest { GetServerResourcesRequest other = (GetServerResourcesRequest) o; return Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier) && - Objects.deepEquals(this.xPlexToken, other.xPlexToken) && Objects.deepEquals(this.includeHttps, other.includeHttps) && Objects.deepEquals(this.includeRelay, other.includeRelay) && Objects.deepEquals(this.includeIPv6, other.includeIPv6); @@ -243,7 +215,6 @@ public class GetServerResourcesRequest { public int hashCode() { return Objects.hash( xPlexClientIdentifier, - xPlexToken, includeHttps, includeRelay, includeIPv6); @@ -253,7 +224,6 @@ public class GetServerResourcesRequest { public String toString() { return Utils.toString(GetServerResourcesRequest.class, "xPlexClientIdentifier", xPlexClientIdentifier, - "xPlexToken", xPlexToken, "includeHttps", includeHttps, "includeRelay", includeRelay, "includeIPv6", includeIPv6); @@ -263,8 +233,6 @@ public class GetServerResourcesRequest { private Optional xPlexClientIdentifier = Optional.empty(); - private String xPlexToken; - private Optional includeHttps; private Optional includeRelay; @@ -299,15 +267,6 @@ public class GetServerResourcesRequest { return this; } - /** - * Plex Authentication Token - */ - public Builder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - /** * Include Https entries in the results */ @@ -377,7 +336,6 @@ public class GetServerResourcesRequest { includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value(); } return new GetServerResourcesRequest( xPlexClientIdentifier, - xPlexToken, includeHttps, includeRelay, includeIPv6); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java index 1d078e49..4990eeb0 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java @@ -4,23 +4,79 @@ package dev.plexapi.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.String; import java.util.Optional; public class GetServerResourcesRequestBuilder { - private GetServerResourcesRequest request; + private Optional xPlexClientIdentifier = Optional.empty(); + 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 Optional serverURL = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetServerResources sdk; public GetServerResourcesRequestBuilder(SDKMethodInterfaces.MethodCallGetServerResources sdk) { this.sdk = sdk; } + + public GetServerResourcesRequestBuilder xPlexClientIdentifier(java.lang.String xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = Optional.of(xPlexClientIdentifier); + return this; + } - public GetServerResourcesRequestBuilder request(dev.plexapi.sdk.models.operations.GetServerResourcesRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; + public GetServerResourcesRequestBuilder xPlexClientIdentifier(java.util.Optional xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = xPlexClientIdentifier; + return this; + } + + public GetServerResourcesRequestBuilder includeHttps(dev.plexapi.sdk.models.operations.IncludeHttps includeHttps) { + Utils.checkNotNull(includeHttps, "includeHttps"); + this.includeHttps = Optional.of(includeHttps); + return this; + } + + public GetServerResourcesRequestBuilder includeHttps(java.util.Optional includeHttps) { + Utils.checkNotNull(includeHttps, "includeHttps"); + this.includeHttps = includeHttps; + return this; + } + + public GetServerResourcesRequestBuilder includeRelay(dev.plexapi.sdk.models.operations.IncludeRelay includeRelay) { + Utils.checkNotNull(includeRelay, "includeRelay"); + this.includeRelay = Optional.of(includeRelay); + return this; + } + + public GetServerResourcesRequestBuilder includeRelay(java.util.Optional includeRelay) { + Utils.checkNotNull(includeRelay, "includeRelay"); + this.includeRelay = includeRelay; + return this; + } + + public GetServerResourcesRequestBuilder includeIPv6(dev.plexapi.sdk.models.operations.IncludeIPv6 includeIPv6) { + Utils.checkNotNull(includeIPv6, "includeIPv6"); + this.includeIPv6 = Optional.of(includeIPv6); + return this; + } + + public GetServerResourcesRequestBuilder includeIPv6(java.util.Optional includeIPv6) { + Utils.checkNotNull(includeIPv6, "includeIPv6"); + this.includeIPv6 = includeIPv6; return this; } @@ -37,9 +93,38 @@ public class GetServerResourcesRequestBuilder { } public GetServerResourcesResponse call() throws Exception { - + 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 sdk.getServerResources( - request, + xPlexClientIdentifier, + includeHttps, + includeRelay, + includeIPv6, serverURL); } + + 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/GetUserDetailsAuthenticationResponseStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationResponseStatus.java similarity index 64% rename from src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsAuthenticationResponseStatus.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationResponseStatus.java index 46244662..60ade7d8 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsAuthenticationResponseStatus.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationResponseStatus.java @@ -8,16 +8,16 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; /** - * GetUserDetailsAuthenticationResponseStatus - String representation of subscriptionActive + * GetTokenDetailsAuthenticationResponseStatus - String representation of subscriptionActive */ -public enum GetUserDetailsAuthenticationResponseStatus { +public enum GetTokenDetailsAuthenticationResponseStatus { INACTIVE("Inactive"), ACTIVE("Active"); @JsonValue private final String value; - private GetUserDetailsAuthenticationResponseStatus(String value) { + private GetTokenDetailsAuthenticationResponseStatus(String value) { this.value = value; } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsAuthenticationStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationStatus.java similarity index 66% rename from src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsAuthenticationStatus.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationStatus.java index 717908a5..3a04d91b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsAuthenticationStatus.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationStatus.java @@ -8,16 +8,16 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; /** - * GetUserDetailsAuthenticationStatus - String representation of subscriptionActive + * GetTokenDetailsAuthenticationStatus - String representation of subscriptionActive */ -public enum GetUserDetailsAuthenticationStatus { +public enum GetTokenDetailsAuthenticationStatus { INACTIVE("Inactive"), ACTIVE("Active"); @JsonValue private final String value; - private GetUserDetailsAuthenticationStatus(String value) { + private GetTokenDetailsAuthenticationStatus(String value) { this.value = value; } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsFeatures.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsFeatures.java similarity index 97% rename from src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsFeatures.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsFeatures.java index ffab064e..8ff4bf7d 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsFeatures.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsFeatures.java @@ -7,7 +7,7 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -public enum GetUserDetailsFeatures { +public enum GetTokenDetailsFeatures { ANDROID_DOLBY_VISION("Android - Dolby Vision"), ANDROID_PI_P("Android - PiP"), CU_SUNSET("CU Sunset"), @@ -71,7 +71,7 @@ public enum GetUserDetailsFeatures { @JsonValue private final String value; - private GetUserDetailsFeatures(String value) { + private GetTokenDetailsFeatures(String value) { this.value = 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 new file mode 100644 index 00000000..4ff44115 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsRequestBuilder.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + +import dev.plexapi.sdk.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class GetTokenDetailsRequestBuilder { + + private Optional serverURL = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetTokenDetails sdk; + + public GetTokenDetailsRequestBuilder(SDKMethodInterfaces.MethodCallGetTokenDetails sdk) { + this.sdk = sdk; + } + + public GetTokenDetailsRequestBuilder serverURL(java.lang.String serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = Optional.of(serverURL); + return this; + } + + public GetTokenDetailsRequestBuilder serverURL(java.util.Optional serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = serverURL; + return this; + } + + public GetTokenDetailsResponse call() throws Exception { + + return sdk.getTokenDetails( + serverURL); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsResponse.java similarity index 80% rename from src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsResponse.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsResponse.java index 475403ef..e7abe54c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsResponse.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -public class GetUserDetailsResponse implements Response { +public class GetTokenDetailsResponse implements Response { /** * HTTP response content type for this operation @@ -39,14 +39,14 @@ public class GetUserDetailsResponse implements Response { /** * Logged in user details */ - private Optional userPlexAccount; + private Optional userPlexAccount; @JsonCreator - public GetUserDetailsResponse( + public GetTokenDetailsResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional userPlexAccount) { + Optional userPlexAccount) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); @@ -57,7 +57,7 @@ public class GetUserDetailsResponse implements Response { this.userPlexAccount = userPlexAccount; } - public GetUserDetailsResponse( + public GetTokenDetailsResponse( String contentType, int statusCode, HttpResponse rawResponse) { @@ -93,8 +93,8 @@ public class GetUserDetailsResponse implements Response { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional userPlexAccount() { - return (Optional) userPlexAccount; + public Optional userPlexAccount() { + return (Optional) userPlexAccount; } public final static Builder builder() { @@ -104,7 +104,7 @@ public class GetUserDetailsResponse implements Response { /** * HTTP response content type for this operation */ - public GetUserDetailsResponse withContentType(String contentType) { + public GetTokenDetailsResponse withContentType(String contentType) { Utils.checkNotNull(contentType, "contentType"); this.contentType = contentType; return this; @@ -113,7 +113,7 @@ public class GetUserDetailsResponse implements Response { /** * HTTP response status code for this operation */ - public GetUserDetailsResponse withStatusCode(int statusCode) { + public GetTokenDetailsResponse withStatusCode(int statusCode) { Utils.checkNotNull(statusCode, "statusCode"); this.statusCode = statusCode; return this; @@ -122,7 +122,7 @@ public class GetUserDetailsResponse implements Response { /** * Raw HTTP response; suitable for custom response parsing */ - public GetUserDetailsResponse withRawResponse(HttpResponse rawResponse) { + public GetTokenDetailsResponse withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -131,7 +131,7 @@ public class GetUserDetailsResponse implements Response { /** * Logged in user details */ - public GetUserDetailsResponse withUserPlexAccount(GetUserDetailsUserPlexAccount userPlexAccount) { + public GetTokenDetailsResponse withUserPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) { Utils.checkNotNull(userPlexAccount, "userPlexAccount"); this.userPlexAccount = Optional.ofNullable(userPlexAccount); return this; @@ -140,7 +140,7 @@ public class GetUserDetailsResponse implements Response { /** * Logged in user details */ - public GetUserDetailsResponse withUserPlexAccount(Optional userPlexAccount) { + public GetTokenDetailsResponse withUserPlexAccount(Optional userPlexAccount) { Utils.checkNotNull(userPlexAccount, "userPlexAccount"); this.userPlexAccount = userPlexAccount; return this; @@ -154,7 +154,7 @@ public class GetUserDetailsResponse implements Response { if (o == null || getClass() != o.getClass()) { return false; } - GetUserDetailsResponse other = (GetUserDetailsResponse) o; + GetTokenDetailsResponse other = (GetTokenDetailsResponse) o; return Objects.deepEquals(this.contentType, other.contentType) && Objects.deepEquals(this.statusCode, other.statusCode) && @@ -173,7 +173,7 @@ public class GetUserDetailsResponse implements Response { @Override public String toString() { - return Utils.toString(GetUserDetailsResponse.class, + return Utils.toString(GetTokenDetailsResponse.class, "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, @@ -188,7 +188,7 @@ public class GetUserDetailsResponse implements Response { private HttpResponse rawResponse; - private Optional userPlexAccount = Optional.empty(); + private Optional userPlexAccount = Optional.empty(); private Builder() { // force use of static builder() method @@ -224,7 +224,7 @@ public class GetUserDetailsResponse implements Response { /** * Logged in user details */ - public Builder userPlexAccount(GetUserDetailsUserPlexAccount userPlexAccount) { + public Builder userPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) { Utils.checkNotNull(userPlexAccount, "userPlexAccount"); this.userPlexAccount = Optional.ofNullable(userPlexAccount); return this; @@ -233,14 +233,14 @@ public class GetUserDetailsResponse implements Response { /** * Logged in user details */ - public Builder userPlexAccount(Optional userPlexAccount) { + public Builder userPlexAccount(Optional userPlexAccount) { Utils.checkNotNull(userPlexAccount, "userPlexAccount"); this.userPlexAccount = userPlexAccount; return this; } - public GetUserDetailsResponse build() { - return new GetUserDetailsResponse( + public GetTokenDetailsResponse build() { + return new GetTokenDetailsResponse( contentType, statusCode, rawResponse, diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsStatus.java similarity index 81% rename from src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsStatus.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsStatus.java index 6cef86bb..532a50d4 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsStatus.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsStatus.java @@ -7,14 +7,14 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -public enum GetUserDetailsStatus { +public enum GetTokenDetailsStatus { ONLINE("online"), OFFLINE("offline"); @JsonValue private final String value; - private GetUserDetailsStatus(String value) { + private GetTokenDetailsStatus(String value) { this.value = value; } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsSubscription.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsSubscription.java similarity index 80% rename from src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsSubscription.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsSubscription.java index 88add6cc..a1ac8083 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsSubscription.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsSubscription.java @@ -21,14 +21,14 @@ import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; -public class GetUserDetailsSubscription { +public class GetTokenDetailsSubscription { /** * List of features allowed on your Plex Pass subscription */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("features") - private Optional> features; + private Optional> features; /** * If the account's Plex Pass subscription is active @@ -49,7 +49,7 @@ public class GetUserDetailsSubscription { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; /** * Payment service used for your Plex Pass subscription @@ -66,11 +66,11 @@ public class GetUserDetailsSubscription { private JsonNullable plan; @JsonCreator - public GetUserDetailsSubscription( - @JsonProperty("features") Optional> features, + public GetTokenDetailsSubscription( + @JsonProperty("features") Optional> features, @JsonProperty("active") Optional active, @JsonProperty("subscribedAt") JsonNullable subscribedAt, - @JsonProperty("status") Optional status, + @JsonProperty("status") Optional status, @JsonProperty("paymentService") JsonNullable paymentService, @JsonProperty("plan") JsonNullable plan) { Utils.checkNotNull(features, "features"); @@ -87,7 +87,7 @@ public class GetUserDetailsSubscription { this.plan = plan; } - public GetUserDetailsSubscription() { + public GetTokenDetailsSubscription() { this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); } @@ -96,8 +96,8 @@ public class GetUserDetailsSubscription { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional> features() { - return (Optional>) features; + public Optional> features() { + return (Optional>) features; } /** @@ -121,8 +121,8 @@ public class GetUserDetailsSubscription { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional status() { - return (Optional) status; + public Optional status() { + return (Optional) status; } /** @@ -148,7 +148,7 @@ public class GetUserDetailsSubscription { /** * List of features allowed on your Plex Pass subscription */ - public GetUserDetailsSubscription withFeatures(List features) { + public GetTokenDetailsSubscription withFeatures(List features) { Utils.checkNotNull(features, "features"); this.features = Optional.ofNullable(features); return this; @@ -157,7 +157,7 @@ public class GetUserDetailsSubscription { /** * List of features allowed on your Plex Pass subscription */ - public GetUserDetailsSubscription withFeatures(Optional> features) { + public GetTokenDetailsSubscription withFeatures(Optional> features) { Utils.checkNotNull(features, "features"); this.features = features; return this; @@ -166,7 +166,7 @@ public class GetUserDetailsSubscription { /** * If the account's Plex Pass subscription is active */ - public GetUserDetailsSubscription withActive(boolean active) { + public GetTokenDetailsSubscription withActive(boolean active) { Utils.checkNotNull(active, "active"); this.active = Optional.ofNullable(active); return this; @@ -175,7 +175,7 @@ public class GetUserDetailsSubscription { /** * If the account's Plex Pass subscription is active */ - public GetUserDetailsSubscription withActive(Optional active) { + public GetTokenDetailsSubscription withActive(Optional active) { Utils.checkNotNull(active, "active"); this.active = active; return this; @@ -184,7 +184,7 @@ public class GetUserDetailsSubscription { /** * Date the account subscribed to Plex Pass */ - public GetUserDetailsSubscription withSubscribedAt(String subscribedAt) { + public GetTokenDetailsSubscription withSubscribedAt(String subscribedAt) { Utils.checkNotNull(subscribedAt, "subscribedAt"); this.subscribedAt = JsonNullable.of(subscribedAt); return this; @@ -193,7 +193,7 @@ public class GetUserDetailsSubscription { /** * Date the account subscribed to Plex Pass */ - public GetUserDetailsSubscription withSubscribedAt(JsonNullable subscribedAt) { + public GetTokenDetailsSubscription withSubscribedAt(JsonNullable subscribedAt) { Utils.checkNotNull(subscribedAt, "subscribedAt"); this.subscribedAt = subscribedAt; return this; @@ -202,7 +202,7 @@ public class GetUserDetailsSubscription { /** * String representation of subscriptionActive */ - public GetUserDetailsSubscription withStatus(GetUserDetailsAuthenticationResponseStatus status) { + public GetTokenDetailsSubscription withStatus(GetTokenDetailsAuthenticationResponseStatus status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; @@ -211,7 +211,7 @@ public class GetUserDetailsSubscription { /** * String representation of subscriptionActive */ - public GetUserDetailsSubscription withStatus(Optional status) { + public GetTokenDetailsSubscription withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -220,7 +220,7 @@ public class GetUserDetailsSubscription { /** * Payment service used for your Plex Pass subscription */ - public GetUserDetailsSubscription withPaymentService(String paymentService) { + public GetTokenDetailsSubscription withPaymentService(String paymentService) { Utils.checkNotNull(paymentService, "paymentService"); this.paymentService = JsonNullable.of(paymentService); return this; @@ -229,7 +229,7 @@ public class GetUserDetailsSubscription { /** * Payment service used for your Plex Pass subscription */ - public GetUserDetailsSubscription withPaymentService(JsonNullable paymentService) { + public GetTokenDetailsSubscription withPaymentService(JsonNullable paymentService) { Utils.checkNotNull(paymentService, "paymentService"); this.paymentService = paymentService; return this; @@ -238,7 +238,7 @@ public class GetUserDetailsSubscription { /** * Name of Plex Pass subscription plan */ - public GetUserDetailsSubscription withPlan(String plan) { + public GetTokenDetailsSubscription withPlan(String plan) { Utils.checkNotNull(plan, "plan"); this.plan = JsonNullable.of(plan); return this; @@ -247,7 +247,7 @@ public class GetUserDetailsSubscription { /** * Name of Plex Pass subscription plan */ - public GetUserDetailsSubscription withPlan(JsonNullable plan) { + public GetTokenDetailsSubscription withPlan(JsonNullable plan) { Utils.checkNotNull(plan, "plan"); this.plan = plan; return this; @@ -261,7 +261,7 @@ public class GetUserDetailsSubscription { if (o == null || getClass() != o.getClass()) { return false; } - GetUserDetailsSubscription other = (GetUserDetailsSubscription) o; + GetTokenDetailsSubscription other = (GetTokenDetailsSubscription) o; return Objects.deepEquals(this.features, other.features) && Objects.deepEquals(this.active, other.active) && @@ -284,7 +284,7 @@ public class GetUserDetailsSubscription { @Override public String toString() { - return Utils.toString(GetUserDetailsSubscription.class, + return Utils.toString(GetTokenDetailsSubscription.class, "features", features, "active", active, "subscribedAt", subscribedAt, @@ -295,13 +295,13 @@ public class GetUserDetailsSubscription { public final static class Builder { - private Optional> features = Optional.empty(); + private Optional> features = Optional.empty(); private Optional active = Optional.empty(); private JsonNullable subscribedAt = JsonNullable.undefined(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private JsonNullable paymentService = JsonNullable.undefined(); @@ -314,7 +314,7 @@ public class GetUserDetailsSubscription { /** * List of features allowed on your Plex Pass subscription */ - public Builder features(List features) { + public Builder features(List features) { Utils.checkNotNull(features, "features"); this.features = Optional.ofNullable(features); return this; @@ -323,7 +323,7 @@ public class GetUserDetailsSubscription { /** * List of features allowed on your Plex Pass subscription */ - public Builder features(Optional> features) { + public Builder features(Optional> features) { Utils.checkNotNull(features, "features"); this.features = features; return this; @@ -368,7 +368,7 @@ public class GetUserDetailsSubscription { /** * String representation of subscriptionActive */ - public Builder status(GetUserDetailsAuthenticationResponseStatus status) { + public Builder status(GetTokenDetailsAuthenticationResponseStatus status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; @@ -377,7 +377,7 @@ public class GetUserDetailsSubscription { /** * String representation of subscriptionActive */ - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -419,8 +419,8 @@ public class GetUserDetailsSubscription { return this; } - public GetUserDetailsSubscription build() { - return new GetUserDetailsSubscription( + public GetTokenDetailsSubscription build() { + return new GetTokenDetailsSubscription( features, active, subscribedAt, diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsUserPlexAccount.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java similarity index 90% rename from src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsUserPlexAccount.java rename to src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java index cf06e4c4..72878363 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsUserPlexAccount.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java @@ -16,6 +16,7 @@ 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; @@ -26,10 +27,10 @@ import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; /** - * GetUserDetailsUserPlexAccount - Logged in user details + * GetTokenDetailsUserPlexAccount - Logged in user details */ -public class GetUserDetailsUserPlexAccount { +public class GetTokenDetailsUserPlexAccount { /** * Unknown @@ -158,10 +159,10 @@ public class GetUserDetailsUserPlexAccount { private int id; /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ @JsonProperty("joinedAt") - private int joinedAt; + private long joinedAt; /** * The account locale @@ -209,10 +210,10 @@ public class GetUserDetailsUserPlexAccount { private Optional protected_; /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ @JsonProperty("rememberExpiresAt") - private int rememberExpiresAt; + private long rememberExpiresAt; /** * If the account is a Plex Home managed user @@ -251,7 +252,7 @@ public class GetUserDetailsUserPlexAccount { private Optional subscriptionDescription; @JsonProperty("subscriptions") - private List subscriptions; + private List subscriptions; /** * URL of the account thumbnail @@ -285,7 +286,7 @@ public class GetUserDetailsUserPlexAccount { private String uuid; @JsonCreator - public GetUserDetailsUserPlexAccount( + public GetTokenDetailsUserPlexAccount( @JsonProperty("adsConsent") Optional adsConsent, @JsonProperty("adsConsentReminderAt") Optional adsConsentReminderAt, @JsonProperty("adsConsentSetAt") Optional adsConsentSetAt, @@ -305,7 +306,7 @@ public class GetUserDetailsUserPlexAccount { @JsonProperty("homeAdmin") Optional homeAdmin, @JsonProperty("homeSize") int homeSize, @JsonProperty("id") int id, - @JsonProperty("joinedAt") int joinedAt, + @JsonProperty("joinedAt") long joinedAt, @JsonProperty("locale") Optional locale, @JsonProperty("mailingListActive") Optional mailingListActive, @JsonProperty("mailingListStatus") MailingListStatus mailingListStatus, @@ -313,14 +314,14 @@ public class GetUserDetailsUserPlexAccount { @JsonProperty("pin") Optional pin, @JsonProperty("profile") UserProfile profile, @JsonProperty("protected") Optional protected_, - @JsonProperty("rememberExpiresAt") int rememberExpiresAt, + @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") List subscriptions, + @JsonProperty("subscriptions") List subscriptions, @JsonProperty("thumb") String thumb, @JsonProperty("title") String title, @JsonProperty("twoFactorEnabled") Optional twoFactorEnabled, @@ -408,7 +409,7 @@ public class GetUserDetailsUserPlexAccount { this.uuid = uuid; } - public GetUserDetailsUserPlexAccount( + public GetTokenDetailsUserPlexAccount( String authToken, String country, String email, @@ -416,15 +417,15 @@ public class GetUserDetailsUserPlexAccount { List entitlements, int homeSize, int id, - int joinedAt, + long joinedAt, MailingListStatus mailingListStatus, int maxHomeSize, UserProfile profile, - int rememberExpiresAt, + long rememberExpiresAt, String scrobbleTypes, List services, Subscription subscription, - List subscriptions, + List subscriptions, String thumb, String title, String username, @@ -585,10 +586,10 @@ public class GetUserDetailsUserPlexAccount { } /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ @JsonIgnore - public int joinedAt() { + public long joinedAt() { return joinedAt; } @@ -648,10 +649,10 @@ public class GetUserDetailsUserPlexAccount { } /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ @JsonIgnore - public int rememberExpiresAt() { + public long rememberExpiresAt() { return rememberExpiresAt; } @@ -702,7 +703,7 @@ public class GetUserDetailsUserPlexAccount { } @JsonIgnore - public List subscriptions() { + public List subscriptions() { return subscriptions; } @@ -753,7 +754,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAdsConsent(boolean adsConsent) { + public GetTokenDetailsUserPlexAccount withAdsConsent(boolean adsConsent) { Utils.checkNotNull(adsConsent, "adsConsent"); this.adsConsent = Optional.ofNullable(adsConsent); return this; @@ -762,7 +763,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAdsConsent(Optional adsConsent) { + public GetTokenDetailsUserPlexAccount withAdsConsent(Optional adsConsent) { Utils.checkNotNull(adsConsent, "adsConsent"); this.adsConsent = adsConsent; return this; @@ -771,7 +772,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAdsConsentReminderAt(OffsetDateTime adsConsentReminderAt) { + public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(OffsetDateTime adsConsentReminderAt) { Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt); return this; @@ -780,7 +781,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAdsConsentReminderAt(Optional adsConsentReminderAt) { + public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(Optional adsConsentReminderAt) { Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); this.adsConsentReminderAt = adsConsentReminderAt; return this; @@ -789,7 +790,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAdsConsentSetAt(OffsetDateTime adsConsentSetAt) { + public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(OffsetDateTime adsConsentSetAt) { Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt); return this; @@ -798,7 +799,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAdsConsentSetAt(Optional adsConsentSetAt) { + public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(Optional adsConsentSetAt) { Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); this.adsConsentSetAt = adsConsentSetAt; return this; @@ -807,7 +808,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAnonymous(boolean anonymous) { + public GetTokenDetailsUserPlexAccount withAnonymous(boolean anonymous) { Utils.checkNotNull(anonymous, "anonymous"); this.anonymous = JsonNullable.of(anonymous); return this; @@ -816,7 +817,7 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withAnonymous(JsonNullable anonymous) { + public GetTokenDetailsUserPlexAccount withAnonymous(JsonNullable anonymous) { Utils.checkNotNull(anonymous, "anonymous"); this.anonymous = anonymous; return this; @@ -825,7 +826,7 @@ public class GetUserDetailsUserPlexAccount { /** * The account token */ - public GetUserDetailsUserPlexAccount withAuthToken(String authToken) { + public GetTokenDetailsUserPlexAccount withAuthToken(String authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = authToken; return this; @@ -834,7 +835,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the two-factor authentication backup codes have been created */ - public GetUserDetailsUserPlexAccount withBackupCodesCreated(boolean backupCodesCreated) { + public GetTokenDetailsUserPlexAccount withBackupCodesCreated(boolean backupCodesCreated) { Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); this.backupCodesCreated = Optional.ofNullable(backupCodesCreated); return this; @@ -843,7 +844,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the two-factor authentication backup codes have been created */ - public GetUserDetailsUserPlexAccount withBackupCodesCreated(Optional backupCodesCreated) { + public GetTokenDetailsUserPlexAccount withBackupCodesCreated(Optional backupCodesCreated) { Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); this.backupCodesCreated = backupCodesCreated; return this; @@ -852,7 +853,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account has been confirmed */ - public GetUserDetailsUserPlexAccount withConfirmed(boolean confirmed) { + public GetTokenDetailsUserPlexAccount withConfirmed(boolean confirmed) { Utils.checkNotNull(confirmed, "confirmed"); this.confirmed = Optional.ofNullable(confirmed); return this; @@ -861,7 +862,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account has been confirmed */ - public GetUserDetailsUserPlexAccount withConfirmed(Optional confirmed) { + public GetTokenDetailsUserPlexAccount withConfirmed(Optional confirmed) { Utils.checkNotNull(confirmed, "confirmed"); this.confirmed = confirmed; return this; @@ -870,7 +871,7 @@ public class GetUserDetailsUserPlexAccount { /** * The account country */ - public GetUserDetailsUserPlexAccount withCountry(String country) { + public GetTokenDetailsUserPlexAccount withCountry(String country) { Utils.checkNotNull(country, "country"); this.country = country; return this; @@ -879,7 +880,7 @@ public class GetUserDetailsUserPlexAccount { /** * The account email address */ - public GetUserDetailsUserPlexAccount withEmail(String email) { + public GetTokenDetailsUserPlexAccount withEmail(String email) { Utils.checkNotNull(email, "email"); this.email = email; return this; @@ -888,7 +889,7 @@ public class GetUserDetailsUserPlexAccount { /** * If login with email only is enabled */ - public GetUserDetailsUserPlexAccount withEmailOnlyAuth(boolean emailOnlyAuth) { + public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(boolean emailOnlyAuth) { Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth); return this; @@ -897,7 +898,7 @@ public class GetUserDetailsUserPlexAccount { /** * If login with email only is enabled */ - public GetUserDetailsUserPlexAccount withEmailOnlyAuth(Optional emailOnlyAuth) { + public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(Optional emailOnlyAuth) { Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); this.emailOnlyAuth = emailOnlyAuth; return this; @@ -906,7 +907,7 @@ public class GetUserDetailsUserPlexAccount { /** * If experimental features are enabled */ - public GetUserDetailsUserPlexAccount withExperimentalFeatures(boolean experimentalFeatures) { + public GetTokenDetailsUserPlexAccount withExperimentalFeatures(boolean experimentalFeatures) { Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); this.experimentalFeatures = Optional.ofNullable(experimentalFeatures); return this; @@ -915,7 +916,7 @@ public class GetUserDetailsUserPlexAccount { /** * If experimental features are enabled */ - public GetUserDetailsUserPlexAccount withExperimentalFeatures(Optional experimentalFeatures) { + public GetTokenDetailsUserPlexAccount withExperimentalFeatures(Optional experimentalFeatures) { Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); this.experimentalFeatures = experimentalFeatures; return this; @@ -924,7 +925,7 @@ public class GetUserDetailsUserPlexAccount { /** * Your account full name */ - public GetUserDetailsUserPlexAccount withFriendlyName(String friendlyName) { + public GetTokenDetailsUserPlexAccount withFriendlyName(String friendlyName) { Utils.checkNotNull(friendlyName, "friendlyName"); this.friendlyName = friendlyName; return this; @@ -933,7 +934,7 @@ public class GetUserDetailsUserPlexAccount { /** * List of devices your allowed to use with this account */ - public GetUserDetailsUserPlexAccount withEntitlements(List entitlements) { + public GetTokenDetailsUserPlexAccount withEntitlements(List entitlements) { Utils.checkNotNull(entitlements, "entitlements"); this.entitlements = entitlements; return this; @@ -942,7 +943,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is a Plex Home guest user */ - public GetUserDetailsUserPlexAccount withGuest(boolean guest) { + public GetTokenDetailsUserPlexAccount withGuest(boolean guest) { Utils.checkNotNull(guest, "guest"); this.guest = Optional.ofNullable(guest); return this; @@ -951,7 +952,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is a Plex Home guest user */ - public GetUserDetailsUserPlexAccount withGuest(Optional guest) { + public GetTokenDetailsUserPlexAccount withGuest(Optional guest) { Utils.checkNotNull(guest, "guest"); this.guest = guest; return this; @@ -960,7 +961,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account has a password */ - public GetUserDetailsUserPlexAccount withHasPassword(boolean hasPassword) { + public GetTokenDetailsUserPlexAccount withHasPassword(boolean hasPassword) { Utils.checkNotNull(hasPassword, "hasPassword"); this.hasPassword = Optional.ofNullable(hasPassword); return this; @@ -969,7 +970,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account has a password */ - public GetUserDetailsUserPlexAccount withHasPassword(Optional hasPassword) { + public GetTokenDetailsUserPlexAccount withHasPassword(Optional hasPassword) { Utils.checkNotNull(hasPassword, "hasPassword"); this.hasPassword = hasPassword; return this; @@ -978,7 +979,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is a Plex Home user */ - public GetUserDetailsUserPlexAccount withHome(boolean home) { + public GetTokenDetailsUserPlexAccount withHome(boolean home) { Utils.checkNotNull(home, "home"); this.home = Optional.ofNullable(home); return this; @@ -987,7 +988,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is a Plex Home user */ - public GetUserDetailsUserPlexAccount withHome(Optional home) { + public GetTokenDetailsUserPlexAccount withHome(Optional home) { Utils.checkNotNull(home, "home"); this.home = home; return this; @@ -996,7 +997,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is the Plex Home admin */ - public GetUserDetailsUserPlexAccount withHomeAdmin(boolean homeAdmin) { + public GetTokenDetailsUserPlexAccount withHomeAdmin(boolean homeAdmin) { Utils.checkNotNull(homeAdmin, "homeAdmin"); this.homeAdmin = Optional.ofNullable(homeAdmin); return this; @@ -1005,7 +1006,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is the Plex Home admin */ - public GetUserDetailsUserPlexAccount withHomeAdmin(Optional homeAdmin) { + public GetTokenDetailsUserPlexAccount withHomeAdmin(Optional homeAdmin) { Utils.checkNotNull(homeAdmin, "homeAdmin"); this.homeAdmin = homeAdmin; return this; @@ -1014,7 +1015,7 @@ public class GetUserDetailsUserPlexAccount { /** * The number of accounts in the Plex Home */ - public GetUserDetailsUserPlexAccount withHomeSize(int homeSize) { + public GetTokenDetailsUserPlexAccount withHomeSize(int homeSize) { Utils.checkNotNull(homeSize, "homeSize"); this.homeSize = homeSize; return this; @@ -1023,16 +1024,16 @@ public class GetUserDetailsUserPlexAccount { /** * The Plex account ID */ - public GetUserDetailsUserPlexAccount withId(int id) { + public GetTokenDetailsUserPlexAccount withId(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ - public GetUserDetailsUserPlexAccount withJoinedAt(int joinedAt) { + public GetTokenDetailsUserPlexAccount withJoinedAt(long joinedAt) { Utils.checkNotNull(joinedAt, "joinedAt"); this.joinedAt = joinedAt; return this; @@ -1041,7 +1042,7 @@ public class GetUserDetailsUserPlexAccount { /** * The account locale */ - public GetUserDetailsUserPlexAccount withLocale(String locale) { + public GetTokenDetailsUserPlexAccount withLocale(String locale) { Utils.checkNotNull(locale, "locale"); this.locale = Optional.ofNullable(locale); return this; @@ -1050,7 +1051,7 @@ public class GetUserDetailsUserPlexAccount { /** * The account locale */ - public GetUserDetailsUserPlexAccount withLocale(Optional locale) { + public GetTokenDetailsUserPlexAccount withLocale(Optional locale) { Utils.checkNotNull(locale, "locale"); this.locale = locale; return this; @@ -1059,7 +1060,7 @@ public class GetUserDetailsUserPlexAccount { /** * If you are subscribed to the Plex newsletter */ - public GetUserDetailsUserPlexAccount withMailingListActive(boolean mailingListActive) { + public GetTokenDetailsUserPlexAccount withMailingListActive(boolean mailingListActive) { Utils.checkNotNull(mailingListActive, "mailingListActive"); this.mailingListActive = Optional.ofNullable(mailingListActive); return this; @@ -1068,7 +1069,7 @@ public class GetUserDetailsUserPlexAccount { /** * If you are subscribed to the Plex newsletter */ - public GetUserDetailsUserPlexAccount withMailingListActive(Optional mailingListActive) { + public GetTokenDetailsUserPlexAccount withMailingListActive(Optional mailingListActive) { Utils.checkNotNull(mailingListActive, "mailingListActive"); this.mailingListActive = mailingListActive; return this; @@ -1077,7 +1078,7 @@ public class GetUserDetailsUserPlexAccount { /** * Your current mailing list status */ - public GetUserDetailsUserPlexAccount withMailingListStatus(MailingListStatus mailingListStatus) { + public GetTokenDetailsUserPlexAccount withMailingListStatus(MailingListStatus mailingListStatus) { Utils.checkNotNull(mailingListStatus, "mailingListStatus"); this.mailingListStatus = mailingListStatus; return this; @@ -1086,7 +1087,7 @@ public class GetUserDetailsUserPlexAccount { /** * The maximum number of accounts allowed in the Plex Home */ - public GetUserDetailsUserPlexAccount withMaxHomeSize(int maxHomeSize) { + public GetTokenDetailsUserPlexAccount withMaxHomeSize(int maxHomeSize) { Utils.checkNotNull(maxHomeSize, "maxHomeSize"); this.maxHomeSize = maxHomeSize; return this; @@ -1097,7 +1098,7 @@ public class GetUserDetailsUserPlexAccount { * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated - public GetUserDetailsUserPlexAccount withPin(String pin) { + public GetTokenDetailsUserPlexAccount withPin(String pin) { Utils.checkNotNull(pin, "pin"); this.pin = Optional.ofNullable(pin); return this; @@ -1108,13 +1109,13 @@ public class GetUserDetailsUserPlexAccount { * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated - public GetUserDetailsUserPlexAccount withPin(Optional pin) { + public GetTokenDetailsUserPlexAccount withPin(Optional pin) { Utils.checkNotNull(pin, "pin"); this.pin = pin; return this; } - public GetUserDetailsUserPlexAccount withProfile(UserProfile profile) { + public GetTokenDetailsUserPlexAccount withProfile(UserProfile profile) { Utils.checkNotNull(profile, "profile"); this.profile = profile; return this; @@ -1123,7 +1124,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account has a Plex Home PIN enabled */ - public GetUserDetailsUserPlexAccount withProtected(boolean protected_) { + public GetTokenDetailsUserPlexAccount withProtected(boolean protected_) { Utils.checkNotNull(protected_, "protected_"); this.protected_ = Optional.ofNullable(protected_); return this; @@ -1132,16 +1133,16 @@ public class GetUserDetailsUserPlexAccount { /** * If the account has a Plex Home PIN enabled */ - public GetUserDetailsUserPlexAccount withProtected(Optional protected_) { + public GetTokenDetailsUserPlexAccount withProtected(Optional protected_) { Utils.checkNotNull(protected_, "protected_"); this.protected_ = protected_; return this; } /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ - public GetUserDetailsUserPlexAccount withRememberExpiresAt(int rememberExpiresAt) { + public GetTokenDetailsUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) { Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); this.rememberExpiresAt = rememberExpiresAt; return this; @@ -1150,7 +1151,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is a Plex Home managed user */ - public GetUserDetailsUserPlexAccount withRestricted(boolean restricted) { + public GetTokenDetailsUserPlexAccount withRestricted(boolean restricted) { Utils.checkNotNull(restricted, "restricted"); this.restricted = Optional.ofNullable(restricted); return this; @@ -1159,7 +1160,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account is a Plex Home managed user */ - public GetUserDetailsUserPlexAccount withRestricted(Optional restricted) { + public GetTokenDetailsUserPlexAccount withRestricted(Optional restricted) { Utils.checkNotNull(restricted, "restricted"); this.restricted = restricted; return this; @@ -1168,7 +1169,7 @@ public class GetUserDetailsUserPlexAccount { /** * [Might be removed] List of account roles. Plexpass membership listed here */ - public GetUserDetailsUserPlexAccount withRoles(List roles) { + public GetTokenDetailsUserPlexAccount withRoles(List roles) { Utils.checkNotNull(roles, "roles"); this.roles = Optional.ofNullable(roles); return this; @@ -1177,7 +1178,7 @@ public class GetUserDetailsUserPlexAccount { /** * [Might be removed] List of account roles. Plexpass membership listed here */ - public GetUserDetailsUserPlexAccount withRoles(Optional> roles) { + public GetTokenDetailsUserPlexAccount withRoles(Optional> roles) { Utils.checkNotNull(roles, "roles"); this.roles = roles; return this; @@ -1186,13 +1187,13 @@ public class GetUserDetailsUserPlexAccount { /** * Unknown */ - public GetUserDetailsUserPlexAccount withScrobbleTypes(String scrobbleTypes) { + public GetTokenDetailsUserPlexAccount withScrobbleTypes(String scrobbleTypes) { Utils.checkNotNull(scrobbleTypes, "scrobbleTypes"); this.scrobbleTypes = scrobbleTypes; return this; } - public GetUserDetailsUserPlexAccount withServices(List services) { + public GetTokenDetailsUserPlexAccount withServices(List services) { Utils.checkNotNull(services, "services"); this.services = services; return this; @@ -1201,7 +1202,7 @@ public class GetUserDetailsUserPlexAccount { /** * If the account’s Plex Pass subscription is active */ - public GetUserDetailsUserPlexAccount withSubscription(Subscription subscription) { + public GetTokenDetailsUserPlexAccount withSubscription(Subscription subscription) { Utils.checkNotNull(subscription, "subscription"); this.subscription = subscription; return this; @@ -1210,7 +1211,7 @@ public class GetUserDetailsUserPlexAccount { /** * Description of the Plex Pass subscription */ - public GetUserDetailsUserPlexAccount withSubscriptionDescription(String subscriptionDescription) { + public GetTokenDetailsUserPlexAccount withSubscriptionDescription(String subscriptionDescription) { Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); this.subscriptionDescription = Optional.ofNullable(subscriptionDescription); return this; @@ -1219,13 +1220,13 @@ public class GetUserDetailsUserPlexAccount { /** * Description of the Plex Pass subscription */ - public GetUserDetailsUserPlexAccount withSubscriptionDescription(Optional subscriptionDescription) { + public GetTokenDetailsUserPlexAccount withSubscriptionDescription(Optional subscriptionDescription) { Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); this.subscriptionDescription = subscriptionDescription; return this; } - public GetUserDetailsUserPlexAccount withSubscriptions(List subscriptions) { + public GetTokenDetailsUserPlexAccount withSubscriptions(List subscriptions) { Utils.checkNotNull(subscriptions, "subscriptions"); this.subscriptions = subscriptions; return this; @@ -1234,7 +1235,7 @@ public class GetUserDetailsUserPlexAccount { /** * URL of the account thumbnail */ - public GetUserDetailsUserPlexAccount withThumb(String thumb) { + public GetTokenDetailsUserPlexAccount withThumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; @@ -1243,7 +1244,7 @@ public class GetUserDetailsUserPlexAccount { /** * The title of the account (username or friendly name) */ - public GetUserDetailsUserPlexAccount withTitle(String title) { + public GetTokenDetailsUserPlexAccount withTitle(String title) { Utils.checkNotNull(title, "title"); this.title = title; return this; @@ -1252,7 +1253,7 @@ public class GetUserDetailsUserPlexAccount { /** * If two-factor authentication is enabled */ - public GetUserDetailsUserPlexAccount withTwoFactorEnabled(boolean twoFactorEnabled) { + public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(boolean twoFactorEnabled) { Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled); return this; @@ -1261,7 +1262,7 @@ public class GetUserDetailsUserPlexAccount { /** * If two-factor authentication is enabled */ - public GetUserDetailsUserPlexAccount withTwoFactorEnabled(Optional twoFactorEnabled) { + public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(Optional twoFactorEnabled) { Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); this.twoFactorEnabled = twoFactorEnabled; return this; @@ -1270,7 +1271,7 @@ public class GetUserDetailsUserPlexAccount { /** * The account username */ - public GetUserDetailsUserPlexAccount withUsername(String username) { + public GetTokenDetailsUserPlexAccount withUsername(String username) { Utils.checkNotNull(username, "username"); this.username = username; return this; @@ -1279,7 +1280,7 @@ public class GetUserDetailsUserPlexAccount { /** * The account UUID */ - public GetUserDetailsUserPlexAccount withUuid(String uuid) { + public GetTokenDetailsUserPlexAccount withUuid(String uuid) { Utils.checkNotNull(uuid, "uuid"); this.uuid = uuid; return this; @@ -1293,7 +1294,7 @@ public class GetUserDetailsUserPlexAccount { if (o == null || getClass() != o.getClass()) { return false; } - GetUserDetailsUserPlexAccount other = (GetUserDetailsUserPlexAccount) o; + GetTokenDetailsUserPlexAccount other = (GetTokenDetailsUserPlexAccount) o; return Objects.deepEquals(this.adsConsent, other.adsConsent) && Objects.deepEquals(this.adsConsentReminderAt, other.adsConsentReminderAt) && @@ -1384,7 +1385,7 @@ public class GetUserDetailsUserPlexAccount { @Override public String toString() { - return Utils.toString(GetUserDetailsUserPlexAccount.class, + return Utils.toString(GetTokenDetailsUserPlexAccount.class, "adsConsent", adsConsent, "adsConsentReminderAt", adsConsentReminderAt, "adsConsentSetAt", adsConsentSetAt, @@ -1467,7 +1468,7 @@ public class GetUserDetailsUserPlexAccount { private Integer id; - private Integer joinedAt; + private Long joinedAt; private Optional locale = Optional.empty(); @@ -1484,7 +1485,7 @@ public class GetUserDetailsUserPlexAccount { private Optional protected_; - private Integer rememberExpiresAt; + private Long rememberExpiresAt; private Optional restricted; @@ -1498,7 +1499,7 @@ public class GetUserDetailsUserPlexAccount { private Optional subscriptionDescription = Optional.empty(); - private List subscriptions; + private List subscriptions; private String thumb; @@ -1794,9 +1795,9 @@ public class GetUserDetailsUserPlexAccount { } /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ - public Builder joinedAt(int joinedAt) { + public Builder joinedAt(long joinedAt) { Utils.checkNotNull(joinedAt, "joinedAt"); this.joinedAt = joinedAt; return this; @@ -1903,9 +1904,9 @@ public class GetUserDetailsUserPlexAccount { } /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ - public Builder rememberExpiresAt(int rememberExpiresAt) { + public Builder rememberExpiresAt(long rememberExpiresAt) { Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); this.rememberExpiresAt = rememberExpiresAt; return this; @@ -1989,7 +1990,7 @@ public class GetUserDetailsUserPlexAccount { return this; } - public Builder subscriptions(List subscriptions) { + public Builder subscriptions(List subscriptions) { Utils.checkNotNull(subscriptions, "subscriptions"); this.subscriptions = subscriptions; return this; @@ -2049,7 +2050,7 @@ public class GetUserDetailsUserPlexAccount { return this; } - public GetUserDetailsUserPlexAccount build() { + public GetTokenDetailsUserPlexAccount build() { if (anonymous == null) { anonymous = _SINGLETON_VALUE_Anonymous.value(); } @@ -2088,7 +2089,7 @@ public class GetUserDetailsUserPlexAccount { } if (twoFactorEnabled == null) { twoFactorEnabled = _SINGLETON_VALUE_TwoFactorEnabled.value(); - } return new GetUserDetailsUserPlexAccount( + } return new GetTokenDetailsUserPlexAccount( adsConsent, adsConsentReminderAt, adsConsentSetAt, diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequest.java deleted file mode 100644 index 28e14c13..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequest.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; -import java.util.Objects; - - -public class GetUserDetailsRequest { - - /** - * Plex Authentication Token - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token") - private String xPlexToken; - - @JsonCreator - public GetUserDetailsRequest( - String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - } - - /** - * Plex Authentication Token - */ - @JsonIgnore - public String xPlexToken() { - return xPlexToken; - } - - public final static Builder builder() { - return new Builder(); - } - - /** - * Plex Authentication Token - */ - public GetUserDetailsRequest 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; - } - GetUserDetailsRequest other = (GetUserDetailsRequest) o; - return - Objects.deepEquals(this.xPlexToken, other.xPlexToken); - } - - @Override - public int hashCode() { - return Objects.hash( - xPlexToken); - } - - @Override - public String toString() { - return Utils.toString(GetUserDetailsRequest.class, - "xPlexToken", xPlexToken); - } - - public final static class Builder { - - private String xPlexToken; - - private Builder() { - // force use of static builder() method - } - - /** - * Plex Authentication Token - */ - public Builder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - public GetUserDetailsRequest build() { - return new GetUserDetailsRequest( - xPlexToken); - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequestBuilder.java deleted file mode 100644 index a68a2a32..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserDetailsRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk.models.operations; - -import dev.plexapi.sdk.utils.Utils; -import java.lang.String; -import java.util.Optional; - -public class GetUserDetailsRequestBuilder { - - private String xPlexToken; - private Optional serverURL = Optional.empty(); - private final SDKMethodInterfaces.MethodCallGetUserDetails sdk; - - public GetUserDetailsRequestBuilder(SDKMethodInterfaces.MethodCallGetUserDetails sdk) { - this.sdk = sdk; - } - - public GetUserDetailsRequestBuilder xPlexToken(java.lang.String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - public GetUserDetailsRequestBuilder serverURL(java.lang.String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetUserDetailsRequestBuilder serverURL(java.util.Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetUserDetailsResponse call() throws Exception { - - return sdk.getUserDetails( - xPlexToken, - serverURL); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PastSubscription.java b/src/main/java/dev/plexapi/sdk/models/operations/PastSubscription.java index 662a6cf2..a849e903 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PastSubscription.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PastSubscription.java @@ -14,7 +14,7 @@ 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.util.Objects; @@ -33,11 +33,11 @@ public class PastSubscription { @JsonInclude(Include.ALWAYS) @JsonProperty("renewsAt") - private Optional renewsAt; + private Optional renewsAt; @JsonInclude(Include.ALWAYS) @JsonProperty("endsAt") - private Optional endsAt; + private Optional endsAt; @JsonInclude(Include.NON_ABSENT) @JsonProperty("canceled") @@ -84,8 +84,8 @@ public class PastSubscription { public PastSubscription( @JsonProperty("id") Optional id, @JsonProperty("mode") Optional mode, - @JsonProperty("renewsAt") Optional renewsAt, - @JsonProperty("endsAt") Optional endsAt, + @JsonProperty("renewsAt") Optional renewsAt, + @JsonProperty("endsAt") Optional endsAt, @JsonProperty("canceled") Optional canceled, @JsonProperty("gracePeriod") Optional gracePeriod, @JsonProperty("onHold") Optional onHold, @@ -147,12 +147,12 @@ public class PastSubscription { } @JsonIgnore - public Optional renewsAt() { + public Optional renewsAt() { return renewsAt; } @JsonIgnore - public Optional endsAt() { + public Optional endsAt() { return endsAt; } @@ -239,25 +239,25 @@ public class PastSubscription { return this; } - public PastSubscription withRenewsAt(int renewsAt) { + public PastSubscription withRenewsAt(long renewsAt) { Utils.checkNotNull(renewsAt, "renewsAt"); this.renewsAt = Optional.ofNullable(renewsAt); return this; } - public PastSubscription withRenewsAt(Optional renewsAt) { + public PastSubscription withRenewsAt(Optional renewsAt) { Utils.checkNotNull(renewsAt, "renewsAt"); this.renewsAt = renewsAt; return this; } - public PastSubscription withEndsAt(int endsAt) { + public PastSubscription withEndsAt(long endsAt) { Utils.checkNotNull(endsAt, "endsAt"); this.endsAt = Optional.ofNullable(endsAt); return this; } - public PastSubscription withEndsAt(Optional endsAt) { + public PastSubscription withEndsAt(Optional endsAt) { Utils.checkNotNull(endsAt, "endsAt"); this.endsAt = endsAt; return this; @@ -450,9 +450,9 @@ public class PastSubscription { private Optional mode = Optional.empty(); - private Optional renewsAt = Optional.empty(); + private Optional renewsAt = Optional.empty(); - private Optional endsAt = Optional.empty(); + private Optional endsAt = Optional.empty(); private Optional canceled; @@ -504,25 +504,25 @@ public class PastSubscription { return this; } - public Builder renewsAt(int renewsAt) { + public Builder renewsAt(long renewsAt) { Utils.checkNotNull(renewsAt, "renewsAt"); this.renewsAt = Optional.ofNullable(renewsAt); return this; } - public Builder renewsAt(Optional renewsAt) { + public Builder renewsAt(Optional renewsAt) { Utils.checkNotNull(renewsAt, "renewsAt"); this.renewsAt = renewsAt; return this; } - public Builder endsAt(int endsAt) { + public Builder endsAt(long endsAt) { Utils.checkNotNull(endsAt, "endsAt"); this.endsAt = Optional.ofNullable(endsAt); return this; } - public Builder endsAt(Optional endsAt) { + public Builder endsAt(Optional endsAt) { Utils.checkNotNull(endsAt, "endsAt"); this.endsAt = endsAt; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java index fcf87406..4e78b257 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java @@ -32,23 +32,29 @@ public class PostUsersSignInDataRequestBody { @SpeakeasyMetadata("form:name=rememberMe") private Optional rememberMe; + @SpeakeasyMetadata("form:name=verificationCode") + private Optional verificationCode; + @JsonCreator public PostUsersSignInDataRequestBody( String login, String password, - Optional rememberMe) { + 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()); + this(login, password, Optional.empty(), Optional.empty()); } @JsonIgnore @@ -66,6 +72,11 @@ public class PostUsersSignInDataRequestBody { return rememberMe; } + @JsonIgnore + public Optional verificationCode() { + return verificationCode; + } + public final static Builder builder() { return new Builder(); } @@ -93,6 +104,18 @@ public class PostUsersSignInDataRequestBody { 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) { @@ -106,7 +129,8 @@ public class PostUsersSignInDataRequestBody { return Objects.deepEquals(this.login, other.login) && Objects.deepEquals(this.password, other.password) && - Objects.deepEquals(this.rememberMe, other.rememberMe); + Objects.deepEquals(this.rememberMe, other.rememberMe) && + Objects.deepEquals(this.verificationCode, other.verificationCode); } @Override @@ -114,7 +138,8 @@ public class PostUsersSignInDataRequestBody { return Objects.hash( login, password, - rememberMe); + rememberMe, + verificationCode); } @Override @@ -122,7 +147,8 @@ public class PostUsersSignInDataRequestBody { return Utils.toString(PostUsersSignInDataRequestBody.class, "login", login, "password", password, - "rememberMe", rememberMe); + "rememberMe", rememberMe, + "verificationCode", verificationCode); } public final static class Builder { @@ -131,7 +157,9 @@ public class PostUsersSignInDataRequestBody { private String password; - private Optional rememberMe; + private Optional rememberMe; + + private Optional verificationCode = Optional.empty(); private Builder() { // force use of static builder() method @@ -160,6 +188,18 @@ public class PostUsersSignInDataRequestBody { 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) { @@ -167,7 +207,8 @@ public class PostUsersSignInDataRequestBody { } return new PostUsersSignInDataRequestBody( login, password, - rememberMe); + rememberMe, + verificationCode); } private static final LazySingletonValue> _SINGLETON_VALUE_RememberMe = diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java index 81a05d38..b81e44b0 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java @@ -16,6 +16,7 @@ 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; @@ -158,10 +159,10 @@ public class PostUsersSignInDataUserPlexAccount { private int id; /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ @JsonProperty("joinedAt") - private int joinedAt; + private long joinedAt; /** * The account locale @@ -209,10 +210,10 @@ public class PostUsersSignInDataUserPlexAccount { private Optional protected_; /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ @JsonProperty("rememberExpiresAt") - private int rememberExpiresAt; + private long rememberExpiresAt; /** * If the account is a Plex Home managed user @@ -311,7 +312,7 @@ public class PostUsersSignInDataUserPlexAccount { @JsonProperty("homeAdmin") Optional homeAdmin, @JsonProperty("homeSize") int homeSize, @JsonProperty("id") int id, - @JsonProperty("joinedAt") int joinedAt, + @JsonProperty("joinedAt") long joinedAt, @JsonProperty("locale") Optional locale, @JsonProperty("mailingListActive") Optional mailingListActive, @JsonProperty("mailingListStatus") PostUsersSignInDataMailingListStatus mailingListStatus, @@ -319,7 +320,7 @@ public class PostUsersSignInDataUserPlexAccount { @JsonProperty("pin") Optional pin, @JsonProperty("profile") PostUsersSignInDataUserProfile profile, @JsonProperty("protected") Optional protected_, - @JsonProperty("rememberExpiresAt") int rememberExpiresAt, + @JsonProperty("rememberExpiresAt") long rememberExpiresAt, @JsonProperty("restricted") Optional restricted, @JsonProperty("roles") Optional> roles, @JsonProperty("scrobbleTypes") String scrobbleTypes, @@ -428,11 +429,11 @@ public class PostUsersSignInDataUserPlexAccount { List entitlements, int homeSize, int id, - int joinedAt, + long joinedAt, PostUsersSignInDataMailingListStatus mailingListStatus, int maxHomeSize, PostUsersSignInDataUserProfile profile, - int rememberExpiresAt, + long rememberExpiresAt, String scrobbleTypes, List services, PostUsersSignInDataSubscription subscription, @@ -599,10 +600,10 @@ public class PostUsersSignInDataUserPlexAccount { } /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ @JsonIgnore - public int joinedAt() { + public long joinedAt() { return joinedAt; } @@ -662,10 +663,10 @@ public class PostUsersSignInDataUserPlexAccount { } /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ @JsonIgnore - public int rememberExpiresAt() { + public long rememberExpiresAt() { return rememberExpiresAt; } @@ -1054,9 +1055,9 @@ public class PostUsersSignInDataUserPlexAccount { } /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ - public PostUsersSignInDataUserPlexAccount withJoinedAt(int joinedAt) { + public PostUsersSignInDataUserPlexAccount withJoinedAt(long joinedAt) { Utils.checkNotNull(joinedAt, "joinedAt"); this.joinedAt = joinedAt; return this; @@ -1163,9 +1164,9 @@ public class PostUsersSignInDataUserPlexAccount { } /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ - public PostUsersSignInDataUserPlexAccount withRememberExpiresAt(int rememberExpiresAt) { + public PostUsersSignInDataUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) { Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); this.rememberExpiresAt = rememberExpiresAt; return this; @@ -1509,7 +1510,7 @@ public class PostUsersSignInDataUserPlexAccount { private Integer id; - private Integer joinedAt; + private Long joinedAt; private Optional locale = Optional.empty(); @@ -1526,7 +1527,7 @@ public class PostUsersSignInDataUserPlexAccount { private Optional protected_; - private Integer rememberExpiresAt; + private Long rememberExpiresAt; private Optional restricted; @@ -1840,9 +1841,9 @@ public class PostUsersSignInDataUserPlexAccount { } /** - * Unix epoch datetime the account joined Plex + * Unix epoch datetime */ - public Builder joinedAt(int joinedAt) { + public Builder joinedAt(long joinedAt) { Utils.checkNotNull(joinedAt, "joinedAt"); this.joinedAt = joinedAt; return this; @@ -1949,9 +1950,9 @@ public class PostUsersSignInDataUserPlexAccount { } /** - * Unix epoch datetime the authtoken expires + * Unix epoch datetime */ - public Builder rememberExpiresAt(int rememberExpiresAt) { + public Builder rememberExpiresAt(long rememberExpiresAt) { Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); this.rememberExpiresAt = rememberExpiresAt; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java index 09faa555..0a38f2a9 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java @@ -168,7 +168,10 @@ public class SDKMethodInterfaces { public interface MethodCallGetServerResources { dev.plexapi.sdk.models.operations.GetServerResourcesResponse getServerResources( - GetServerResourcesRequest request, + Optional xPlexClientIdentifier, + Optional includeHttps, + Optional includeRelay, + Optional includeIPv6, Optional serverURL) throws Exception; } @@ -404,9 +407,8 @@ public class SDKMethodInterfaces { } - public interface MethodCallGetUserDetails { - dev.plexapi.sdk.models.operations.GetUserDetailsResponse getUserDetails( - String xPlexToken, + public interface MethodCallGetTokenDetails { + dev.plexapi.sdk.models.operations.GetTokenDetailsResponse getTokenDetails( Optional serverURL) throws Exception; } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Services.java b/src/main/java/dev/plexapi/sdk/models/operations/Services.java index a3b2c36f..a4e6beec 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Services.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Services.java @@ -34,7 +34,7 @@ public class Services { private Optional secret; @JsonProperty("status") - private GetUserDetailsStatus status; + private GetTokenDetailsStatus status; @JsonCreator public Services( @@ -42,7 +42,7 @@ public class Services { @JsonProperty("endpoint") String endpoint, @JsonProperty("token") Optional token, @JsonProperty("secret") Optional secret, - @JsonProperty("status") GetUserDetailsStatus status) { + @JsonProperty("status") GetTokenDetailsStatus status) { Utils.checkNotNull(identifier, "identifier"); Utils.checkNotNull(endpoint, "endpoint"); Utils.checkNotNull(token, "token"); @@ -58,7 +58,7 @@ public class Services { public Services( String identifier, String endpoint, - GetUserDetailsStatus status) { + GetTokenDetailsStatus status) { this(identifier, endpoint, Optional.empty(), Optional.empty(), status); } @@ -83,7 +83,7 @@ public class Services { } @JsonIgnore - public GetUserDetailsStatus status() { + public GetTokenDetailsStatus status() { return status; } @@ -127,7 +127,7 @@ public class Services { return this; } - public Services withStatus(GetUserDetailsStatus status) { + public Services withStatus(GetTokenDetailsStatus status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -180,7 +180,7 @@ public class Services { private Optional secret = Optional.empty(); - private GetUserDetailsStatus status; + private GetTokenDetailsStatus status; private Builder() { // force use of static builder() method @@ -222,7 +222,7 @@ public class Services { return this; } - public Builder status(GetUserDetailsStatus status) { + public Builder status(GetTokenDetailsStatus status) { Utils.checkNotNull(status, "status"); this.status = status; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Subscription.java b/src/main/java/dev/plexapi/sdk/models/operations/Subscription.java index e04efb46..4616497e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Subscription.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Subscription.java @@ -52,7 +52,7 @@ public class Subscription { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") - private Optional status; + private Optional status; /** * Payment service used for your Plex Pass subscription @@ -73,7 +73,7 @@ public class Subscription { @JsonProperty("features") Optional> features, @JsonProperty("active") Optional active, @JsonProperty("subscribedAt") JsonNullable subscribedAt, - @JsonProperty("status") Optional status, + @JsonProperty("status") Optional status, @JsonProperty("paymentService") JsonNullable paymentService, @JsonProperty("plan") JsonNullable plan) { Utils.checkNotNull(features, "features"); @@ -124,8 +124,8 @@ public class Subscription { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional status() { - return (Optional) status; + public Optional status() { + return (Optional) status; } /** @@ -205,7 +205,7 @@ public class Subscription { /** * String representation of subscriptionActive */ - public Subscription withStatus(GetUserDetailsAuthenticationStatus status) { + public Subscription withStatus(GetTokenDetailsAuthenticationStatus status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; @@ -214,7 +214,7 @@ public class Subscription { /** * String representation of subscriptionActive */ - public Subscription withStatus(Optional status) { + public Subscription withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -304,7 +304,7 @@ public class Subscription { private JsonNullable subscribedAt = JsonNullable.undefined(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private JsonNullable paymentService = JsonNullable.undefined(); @@ -371,7 +371,7 @@ public class Subscription { /** * String representation of subscriptionActive */ - public Builder status(GetUserDetailsAuthenticationStatus status) { + public Builder status(GetTokenDetailsAuthenticationStatus status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; @@ -380,7 +380,7 @@ public class Subscription { /** * String representation of subscriptionActive */ - public Builder status(Optional status) { + public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this;