diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..15532825 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# Linux start script should use lf +/gradlew text eol=lf + +# These are Windows script files and should use crlf +*.bat text eol=crlf + +# This allows generated code to be indexed correctly +*.java linguist-generated=false + diff --git a/.github/workflows/speakeasy_sdk_generation.yml b/.github/workflows/speakeasy_sdk_generation.yml index d862434c..56a6c4b1 100644 --- a/.github/workflows/speakeasy_sdk_generation.yml +++ b/.github/workflows/speakeasy_sdk_generation.yml @@ -1,29 +1,25 @@ name: Generate permissions: - checks: write - contents: write - pull-requests: write - statuses: write + checks: write + contents: write + pull-requests: write + statuses: write "on": - workflow_dispatch: - inputs: - force: - description: Force generation of SDKs - type: boolean - default: false - schedule: - - cron: 0 0 * * * + workflow_dispatch: + inputs: + force: + description: Force generation of SDKs + type: boolean + default: false + schedule: + - cron: 0 0 * * * jobs: - generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14 - with: - force: ${{ github.event.inputs.force }} - languages: | - - java - mode: direct - openapi_docs: | - - https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml - speakeasy_version: latest - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} + generate: + uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 + with: + force: ${{ github.event.inputs.force }} + mode: direct + speakeasy_version: latest + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.gitignore b/.gitignore index 524f0963..64cd884c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,20 @@ +# Ignore Gradle project-specific cache directory +.gradle +# Ignore Gradle build output directory +build +bin/ +# Ignore IDE-specific configs +.project +.settings/ +.DS_Store # Compiled class file *.class - # Log file *.log - # BlueJ files *.ctxt - # Mobile Tools for Java (J2ME) .mtj.tmp/ - # Package Files # *.jar *.war @@ -18,7 +23,6 @@ *.zip *.tar.gz *.rar - # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* replay_pid* diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100755 index 00000000..4a65f2d2 --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,934 @@ +lockVersion: 2.0.0 +id: ff6658aa-ae09-4bec-b500-5ba8bcd3a069 +management: + docChecksum: e34dac84738ebf2d447ea2b9055a6eeb + docVersion: 0.0.3 + speakeasyVersion: 1.210.0 + generationVersion: 2.281.2 + releaseVersion: 0.0.1 + configChecksum: 43e7b0d6235d59536ceb6593087bfd44 +features: + java: + constsAndDefaults: 0.1.1 + core: 3.15.0 + flattening: 2.81.1 + globalSecurity: 2.82.4 + globalServerURLs: 2.82.1 + methodServerURLs: 2.82.1 + nameOverrides: 2.81.2 +generatedFiles: + - src/main/java/lukehagar/plexapi/plexapi/SecuritySource.java + - src/main/java/lukehagar/plexapi/plexapi/SDKConfiguration.java + - src/main/java/lukehagar/plexapi/plexapi/Server.java + - src/main/java/lukehagar/plexapi/plexapi/Media.java + - src/main/java/lukehagar/plexapi/plexapi/Video.java + - src/main/java/lukehagar/plexapi/plexapi/Activities.java + - src/main/java/lukehagar/plexapi/plexapi/Butler.java + - src/main/java/lukehagar/plexapi/plexapi/Hubs.java + - src/main/java/lukehagar/plexapi/plexapi/Search.java + - src/main/java/lukehagar/plexapi/plexapi/Library.java + - src/main/java/lukehagar/plexapi/plexapi/Log.java + - src/main/java/lukehagar/plexapi/plexapi/Plex.java + - src/main/java/lukehagar/plexapi/plexapi/Playlists.java + - src/main/java/lukehagar/plexapi/plexapi/Authentication.java + - src/main/java/lukehagar/plexapi/plexapi/Statistics.java + - src/main/java/lukehagar/plexapi/plexapi/Sessions.java + - src/main/java/lukehagar/plexapi/plexapi/Updater.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequestBuilder.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/SDKMethodInterfaces.java + - src/main/java/lukehagar/plexapi/plexapi/PlexAPI.java + - .gitattributes + - build.gradle + - gradle/wrapper/gradle-wrapper.jar + - gradle/wrapper/gradle-wrapper.properties + - gradlew + - gradlew.bat + - settings.gradle + - src/main/java/lukehagar/plexapi/plexapi/utils/BackoffStrategy.java + - src/main/java/lukehagar/plexapi/plexapi/utils/BigDecimalString.java + - src/main/java/lukehagar/plexapi/plexapi/utils/BigIntegerString.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Deserializers.java + - src/main/java/lukehagar/plexapi/plexapi/utils/FormMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/HTTPClient.java + - src/main/java/lukehagar/plexapi/plexapi/utils/HTTPRequest.java + - src/main/java/lukehagar/plexapi/plexapi/utils/HeaderMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/JSON.java + - src/main/java/lukehagar/plexapi/plexapi/utils/LazySingletonValue.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Metadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/MultipartFormMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/OneOfDeserializer.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Options.java + - src/main/java/lukehagar/plexapi/plexapi/utils/PathParamsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/QueryParameters.java + - src/main/java/lukehagar/plexapi/plexapi/utils/QueryParamsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/RequestBody.java + - src/main/java/lukehagar/plexapi/plexapi/utils/RequestMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Response.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Retries.java + - src/main/java/lukehagar/plexapi/plexapi/utils/RetryConfig.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Security.java + - src/main/java/lukehagar/plexapi/plexapi/utils/SecurityMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/SerializedBody.java + - src/main/java/lukehagar/plexapi/plexapi/utils/SpeakeasyHTTPClient.java + - src/main/java/lukehagar/plexapi/plexapi/utils/SpeakeasyHTTPSecurityClient.java + - src/main/java/lukehagar/plexapi/plexapi/utils/SpeakeasyMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/utils/TypedObject.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Types.java + - src/main/java/lukehagar/plexapi/plexapi/utils/Utils.java + - src/main/java/lukehagar/plexapi/plexapi/models/errors/SDKError.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Errors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesServerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Directory.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesServerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Setting.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsServerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Server.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesServerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Device.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityServerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountServerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MyPlex.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MinSize.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Upscale.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/State.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesActivitiesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Context.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Activity.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksButlerResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTask.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTasks.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/TaskName.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PathParamTaskName.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/OnlyTransient.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsHubsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Hub.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamOnlyTransient.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHubsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsPart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsGenre.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsCountry.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsDirector.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRole.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsWriter.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHub.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsSearchResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsPart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsGenre.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsDirector.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsWriter.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsCountry.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRole.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Provider.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Part.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Media.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Genre.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Director.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Writer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Country.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Role.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Metadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLocation.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesDirectory.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/IncludeDetails.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryDirectory.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Filter.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Sort.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Field.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryType.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Operator.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/FieldType.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Tag.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsPart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsGenre.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsCountry.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsDirector.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsWriter.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRole.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Type.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Stream.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataPart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataGenre.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataCountry.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Guids.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Ratings.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataDirector.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataWriter.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRole.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Producer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenDirectory.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckLibraryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckStream.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckPart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckGuids.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Level.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinPlexResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Location.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamType.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Smart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistPlaylistsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/PlaylistType.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamSmart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsPlaylistsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistPlaylistsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPlaylistsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsGenre.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsCountry.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsDirector.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsWriter.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRole.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsPlaylistsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Force.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenQueryParamType.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Scope.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsStatisticsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsDevice.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Account.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StatisticsMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsSessionsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsStream.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsPart.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMedia.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/User.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Player.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Session.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistorySessionsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMetadata.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsSessionsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/TranscodeSession.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusUpdaterResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Release.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusMediaContainer.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Download.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Tonight.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/Skip.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequest.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesErrors.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponseBody.java + - src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponse.java + - src/main/java/lukehagar/plexapi/plexapi/models/shared/Security.java + - docs/models/operations/Errors.md + - docs/models/operations/GetServerCapabilitiesServerResponseBody.md + - docs/models/operations/Directory.md + - docs/models/operations/MediaContainer.md + - docs/models/operations/GetServerCapabilitiesResponseBody.md + - docs/models/operations/GetServerCapabilitiesResponse.md + - docs/models/operations/GetServerPreferencesErrors.md + - docs/models/operations/GetServerPreferencesServerResponseBody.md + - docs/models/operations/Setting.md + - docs/models/operations/GetServerPreferencesMediaContainer.md + - docs/models/operations/GetServerPreferencesResponseBody.md + - docs/models/operations/GetServerPreferencesResponse.md + - docs/models/operations/GetAvailableClientsErrors.md + - docs/models/operations/GetAvailableClientsServerResponseBody.md + - docs/models/operations/Server.md + - docs/models/operations/GetAvailableClientsMediaContainer.md + - docs/models/operations/GetAvailableClientsResponseBody.md + - docs/models/operations/GetAvailableClientsResponse.md + - docs/models/operations/GetDevicesErrors.md + - docs/models/operations/GetDevicesServerResponseBody.md + - docs/models/operations/Device.md + - docs/models/operations/GetDevicesMediaContainer.md + - docs/models/operations/GetDevicesResponseBody.md + - docs/models/operations/GetDevicesResponse.md + - docs/models/operations/GetServerIdentityErrors.md + - docs/models/operations/GetServerIdentityServerResponseBody.md + - docs/models/operations/GetServerIdentityMediaContainer.md + - docs/models/operations/GetServerIdentityResponseBody.md + - docs/models/operations/GetServerIdentityResponse.md + - docs/models/operations/GetMyPlexAccountErrors.md + - docs/models/operations/GetMyPlexAccountServerResponseBody.md + - docs/models/operations/MyPlex.md + - docs/models/operations/GetMyPlexAccountResponseBody.md + - docs/models/operations/GetMyPlexAccountResponse.md + - docs/models/operations/MinSize.md + - docs/models/operations/Upscale.md + - docs/models/operations/GetResizedPhotoRequest.md + - docs/models/operations/GetResizedPhotoErrors.md + - docs/models/operations/GetResizedPhotoResponseBody.md + - docs/models/operations/GetResizedPhotoResponse.md + - docs/models/operations/GetServerListErrors.md + - docs/models/operations/GetServerListServerResponseBody.md + - docs/models/operations/GetServerListServer.md + - docs/models/operations/GetServerListMediaContainer.md + - docs/models/operations/GetServerListResponseBody.md + - docs/models/operations/GetServerListResponse.md + - docs/models/operations/MarkPlayedRequest.md + - docs/models/operations/MarkPlayedErrors.md + - docs/models/operations/MarkPlayedResponseBody.md + - docs/models/operations/MarkPlayedResponse.md + - docs/models/operations/MarkUnplayedRequest.md + - docs/models/operations/MarkUnplayedErrors.md + - docs/models/operations/MarkUnplayedResponseBody.md + - docs/models/operations/MarkUnplayedResponse.md + - docs/models/operations/UpdatePlayProgressRequest.md + - docs/models/operations/UpdatePlayProgressErrors.md + - docs/models/operations/UpdatePlayProgressResponseBody.md + - docs/models/operations/UpdatePlayProgressResponse.md + - docs/models/operations/State.md + - docs/models/operations/GetTimelineRequest.md + - docs/models/operations/GetTimelineErrors.md + - docs/models/operations/GetTimelineResponseBody.md + - docs/models/operations/GetTimelineResponse.md + - docs/models/operations/StartUniversalTranscodeRequest.md + - docs/models/operations/StartUniversalTranscodeErrors.md + - docs/models/operations/StartUniversalTranscodeResponseBody.md + - docs/models/operations/StartUniversalTranscodeResponse.md + - docs/models/operations/GetServerActivitiesErrors.md + - docs/models/operations/GetServerActivitiesActivitiesResponseBody.md + - docs/models/operations/Context.md + - docs/models/operations/Activity.md + - docs/models/operations/GetServerActivitiesMediaContainer.md + - docs/models/operations/GetServerActivitiesResponseBody.md + - docs/models/operations/GetServerActivitiesResponse.md + - docs/models/operations/CancelServerActivitiesRequest.md + - docs/models/operations/CancelServerActivitiesErrors.md + - docs/models/operations/CancelServerActivitiesResponseBody.md + - docs/models/operations/CancelServerActivitiesResponse.md + - docs/models/operations/GetButlerTasksErrors.md + - docs/models/operations/GetButlerTasksButlerResponseBody.md + - docs/models/operations/ButlerTask.md + - docs/models/operations/ButlerTasks.md + - docs/models/operations/GetButlerTasksResponseBody.md + - docs/models/operations/GetButlerTasksResponse.md + - docs/models/operations/StartAllTasksErrors.md + - docs/models/operations/StartAllTasksResponseBody.md + - docs/models/operations/StartAllTasksResponse.md + - docs/models/operations/StopAllTasksErrors.md + - docs/models/operations/StopAllTasksResponseBody.md + - docs/models/operations/StopAllTasksResponse.md + - docs/models/operations/TaskName.md + - docs/models/operations/StartTaskRequest.md + - docs/models/operations/StartTaskErrors.md + - docs/models/operations/StartTaskResponseBody.md + - docs/models/operations/StartTaskResponse.md + - docs/models/operations/PathParamTaskName.md + - docs/models/operations/StopTaskRequest.md + - docs/models/operations/StopTaskErrors.md + - docs/models/operations/StopTaskResponseBody.md + - docs/models/operations/StopTaskResponse.md + - docs/models/operations/OnlyTransient.md + - docs/models/operations/GetGlobalHubsRequest.md + - docs/models/operations/GetGlobalHubsErrors.md + - docs/models/operations/GetGlobalHubsHubsResponseBody.md + - docs/models/operations/GetGlobalHubsMetadata.md + - docs/models/operations/Hub.md + - docs/models/operations/GetGlobalHubsMediaContainer.md + - docs/models/operations/GetGlobalHubsResponseBody.md + - docs/models/operations/GetGlobalHubsResponse.md + - docs/models/operations/QueryParamOnlyTransient.md + - docs/models/operations/GetLibraryHubsRequest.md + - docs/models/operations/GetLibraryHubsErrors.md + - docs/models/operations/GetLibraryHubsHubsResponseBody.md + - docs/models/operations/GetLibraryHubsPart.md + - docs/models/operations/GetLibraryHubsMedia.md + - docs/models/operations/GetLibraryHubsGenre.md + - docs/models/operations/GetLibraryHubsCountry.md + - docs/models/operations/GetLibraryHubsDirector.md + - docs/models/operations/GetLibraryHubsRole.md + - docs/models/operations/GetLibraryHubsWriter.md + - docs/models/operations/GetLibraryHubsMetadata.md + - docs/models/operations/GetLibraryHubsHub.md + - docs/models/operations/GetLibraryHubsMediaContainer.md + - docs/models/operations/GetLibraryHubsResponseBody.md + - docs/models/operations/GetLibraryHubsResponse.md + - docs/models/operations/PerformSearchRequest.md + - docs/models/operations/PerformSearchErrors.md + - docs/models/operations/PerformSearchResponseBody.md + - docs/models/operations/PerformSearchResponse.md + - docs/models/operations/PerformVoiceSearchRequest.md + - docs/models/operations/PerformVoiceSearchErrors.md + - docs/models/operations/PerformVoiceSearchResponseBody.md + - docs/models/operations/PerformVoiceSearchResponse.md + - docs/models/operations/GetSearchResultsRequest.md + - docs/models/operations/GetSearchResultsErrors.md + - docs/models/operations/GetSearchResultsSearchResponseBody.md + - docs/models/operations/GetSearchResultsPart.md + - docs/models/operations/GetSearchResultsMedia.md + - docs/models/operations/GetSearchResultsGenre.md + - docs/models/operations/GetSearchResultsDirector.md + - docs/models/operations/GetSearchResultsWriter.md + - docs/models/operations/GetSearchResultsCountry.md + - docs/models/operations/GetSearchResultsRole.md + - docs/models/operations/GetSearchResultsMetadata.md + - docs/models/operations/Provider.md + - docs/models/operations/GetSearchResultsMediaContainer.md + - docs/models/operations/GetSearchResultsResponseBody.md + - docs/models/operations/GetSearchResultsResponse.md + - docs/models/operations/GetFileHashRequest.md + - docs/models/operations/GetFileHashErrors.md + - docs/models/operations/GetFileHashResponseBody.md + - docs/models/operations/GetFileHashResponse.md + - docs/models/operations/GetRecentlyAddedErrors.md + - docs/models/operations/GetRecentlyAddedLibraryResponseBody.md + - docs/models/operations/Part.md + - docs/models/operations/Media.md + - docs/models/operations/Genre.md + - docs/models/operations/Director.md + - docs/models/operations/Writer.md + - docs/models/operations/Country.md + - docs/models/operations/Role.md + - docs/models/operations/Metadata.md + - docs/models/operations/GetRecentlyAddedMediaContainer.md + - docs/models/operations/GetRecentlyAddedResponseBody.md + - docs/models/operations/GetRecentlyAddedResponse.md + - docs/models/operations/GetLibrariesErrors.md + - docs/models/operations/GetLibrariesLibraryResponseBody.md + - docs/models/operations/GetLibrariesLocation.md + - docs/models/operations/GetLibrariesDirectory.md + - docs/models/operations/GetLibrariesMediaContainer.md + - docs/models/operations/GetLibrariesResponseBody.md + - docs/models/operations/GetLibrariesResponse.md + - docs/models/operations/IncludeDetails.md + - docs/models/operations/GetLibraryRequest.md + - docs/models/operations/GetLibraryErrors.md + - docs/models/operations/GetLibraryLibraryResponseBody.md + - docs/models/operations/GetLibraryDirectory.md + - docs/models/operations/Filter.md + - docs/models/operations/Sort.md + - docs/models/operations/Field.md + - docs/models/operations/GetLibraryType.md + - docs/models/operations/Operator.md + - docs/models/operations/FieldType.md + - docs/models/operations/GetLibraryMediaContainer.md + - docs/models/operations/GetLibraryResponseBody.md + - docs/models/operations/GetLibraryResponse.md + - docs/models/operations/DeleteLibraryRequest.md + - docs/models/operations/DeleteLibraryErrors.md + - docs/models/operations/DeleteLibraryResponseBody.md + - docs/models/operations/DeleteLibraryResponse.md + - docs/models/operations/Tag.md + - docs/models/operations/GetLibraryItemsRequest.md + - docs/models/operations/GetLibraryItemsPart.md + - docs/models/operations/GetLibraryItemsMedia.md + - docs/models/operations/GetLibraryItemsGenre.md + - docs/models/operations/GetLibraryItemsCountry.md + - docs/models/operations/GetLibraryItemsDirector.md + - docs/models/operations/GetLibraryItemsWriter.md + - docs/models/operations/GetLibraryItemsRole.md + - docs/models/operations/GetLibraryItemsMetadata.md + - docs/models/operations/GetLibraryItemsMediaContainer.md + - docs/models/operations/GetLibraryItemsResponseBody.md + - docs/models/operations/GetLibraryItemsResponse.md + - docs/models/operations/RefreshLibraryRequest.md + - docs/models/operations/RefreshLibraryErrors.md + - docs/models/operations/RefreshLibraryResponseBody.md + - docs/models/operations/RefreshLibraryResponse.md + - docs/models/operations/Type.md + - docs/models/operations/SearchLibraryRequest.md + - docs/models/operations/SearchLibraryMetadata.md + - docs/models/operations/SearchLibraryMediaContainer.md + - docs/models/operations/SearchLibraryResponseBody.md + - docs/models/operations/SearchLibraryResponse.md + - docs/models/operations/GetMetadataRequest.md + - docs/models/operations/GetMetadataErrors.md + - docs/models/operations/GetMetadataLibraryResponseBody.md + - docs/models/operations/Stream.md + - docs/models/operations/GetMetadataPart.md + - docs/models/operations/GetMetadataMedia.md + - docs/models/operations/GetMetadataGenre.md + - docs/models/operations/GetMetadataCountry.md + - docs/models/operations/Guids.md + - docs/models/operations/Ratings.md + - docs/models/operations/GetMetadataDirector.md + - docs/models/operations/GetMetadataWriter.md + - docs/models/operations/GetMetadataRole.md + - docs/models/operations/Producer.md + - docs/models/operations/GetMetadataMetadata.md + - docs/models/operations/GetMetadataMediaContainer.md + - docs/models/operations/GetMetadataResponseBody.md + - docs/models/operations/GetMetadataResponse.md + - docs/models/operations/GetMetadataChildrenRequest.md + - docs/models/operations/GetMetadataChildrenErrors.md + - docs/models/operations/GetMetadataChildrenLibraryResponseBody.md + - docs/models/operations/GetMetadataChildrenDirectory.md + - docs/models/operations/GetMetadataChildrenMetadata.md + - docs/models/operations/GetMetadataChildrenMediaContainer.md + - docs/models/operations/GetMetadataChildrenResponseBody.md + - docs/models/operations/GetMetadataChildrenResponse.md + - docs/models/operations/GetOnDeckErrors.md + - docs/models/operations/GetOnDeckLibraryResponseBody.md + - docs/models/operations/GetOnDeckStream.md + - docs/models/operations/GetOnDeckPart.md + - docs/models/operations/GetOnDeckMedia.md + - docs/models/operations/GetOnDeckGuids.md + - docs/models/operations/GetOnDeckMetadata.md + - docs/models/operations/GetOnDeckMediaContainer.md + - docs/models/operations/GetOnDeckResponseBody.md + - docs/models/operations/GetOnDeckResponse.md + - docs/models/operations/Level.md + - docs/models/operations/LogLineRequest.md + - docs/models/operations/LogLineErrors.md + - docs/models/operations/LogLineResponseBody.md + - docs/models/operations/LogLineResponse.md + - docs/models/operations/LogMultiLineErrors.md + - docs/models/operations/LogMultiLineResponseBody.md + - docs/models/operations/LogMultiLineResponse.md + - docs/models/operations/EnablePaperTrailErrors.md + - docs/models/operations/EnablePaperTrailResponseBody.md + - docs/models/operations/EnablePaperTrailResponse.md + - docs/models/operations/GetPinRequest.md + - docs/models/operations/GetPinErrors.md + - docs/models/operations/GetPinPlexResponseBody.md + - docs/models/operations/Location.md + - docs/models/operations/GetPinResponseBody.md + - docs/models/operations/GetPinResponse.md + - docs/models/operations/GetTokenRequest.md + - docs/models/operations/GetTokenErrors.md + - docs/models/operations/GetTokenResponseBody.md + - docs/models/operations/GetTokenResponse.md + - docs/models/operations/QueryParamType.md + - docs/models/operations/Smart.md + - docs/models/operations/CreatePlaylistRequest.md + - docs/models/operations/CreatePlaylistErrors.md + - docs/models/operations/CreatePlaylistPlaylistsResponseBody.md + - docs/models/operations/CreatePlaylistMetadata.md + - docs/models/operations/CreatePlaylistMediaContainer.md + - docs/models/operations/CreatePlaylistResponseBody.md + - docs/models/operations/CreatePlaylistResponse.md + - docs/models/operations/PlaylistType.md + - docs/models/operations/QueryParamSmart.md + - docs/models/operations/GetPlaylistsRequest.md + - docs/models/operations/GetPlaylistsErrors.md + - docs/models/operations/GetPlaylistsPlaylistsResponseBody.md + - docs/models/operations/GetPlaylistsMetadata.md + - docs/models/operations/GetPlaylistsMediaContainer.md + - docs/models/operations/GetPlaylistsResponseBody.md + - docs/models/operations/GetPlaylistsResponse.md + - docs/models/operations/GetPlaylistRequest.md + - docs/models/operations/GetPlaylistErrors.md + - docs/models/operations/GetPlaylistPlaylistsResponseBody.md + - docs/models/operations/GetPlaylistMetadata.md + - docs/models/operations/GetPlaylistMediaContainer.md + - docs/models/operations/GetPlaylistResponseBody.md + - docs/models/operations/GetPlaylistResponse.md + - docs/models/operations/DeletePlaylistRequest.md + - docs/models/operations/DeletePlaylistErrors.md + - docs/models/operations/DeletePlaylistResponseBody.md + - docs/models/operations/DeletePlaylistResponse.md + - docs/models/operations/UpdatePlaylistRequest.md + - docs/models/operations/UpdatePlaylistErrors.md + - docs/models/operations/UpdatePlaylistResponseBody.md + - docs/models/operations/UpdatePlaylistResponse.md + - docs/models/operations/GetPlaylistContentsRequest.md + - docs/models/operations/GetPlaylistContentsErrors.md + - docs/models/operations/GetPlaylistContentsPlaylistsResponseBody.md + - docs/models/operations/GetPlaylistContentsPart.md + - docs/models/operations/GetPlaylistContentsMedia.md + - docs/models/operations/GetPlaylistContentsGenre.md + - docs/models/operations/GetPlaylistContentsCountry.md + - docs/models/operations/GetPlaylistContentsDirector.md + - docs/models/operations/GetPlaylistContentsWriter.md + - docs/models/operations/GetPlaylistContentsRole.md + - docs/models/operations/GetPlaylistContentsMetadata.md + - docs/models/operations/GetPlaylistContentsMediaContainer.md + - docs/models/operations/GetPlaylistContentsResponseBody.md + - docs/models/operations/GetPlaylistContentsResponse.md + - docs/models/operations/ClearPlaylistContentsRequest.md + - docs/models/operations/ClearPlaylistContentsErrors.md + - docs/models/operations/ClearPlaylistContentsResponseBody.md + - docs/models/operations/ClearPlaylistContentsResponse.md + - docs/models/operations/AddPlaylistContentsRequest.md + - docs/models/operations/AddPlaylistContentsErrors.md + - docs/models/operations/AddPlaylistContentsPlaylistsResponseBody.md + - docs/models/operations/AddPlaylistContentsMetadata.md + - docs/models/operations/AddPlaylistContentsMediaContainer.md + - docs/models/operations/AddPlaylistContentsResponseBody.md + - docs/models/operations/AddPlaylistContentsResponse.md + - docs/models/operations/Force.md + - docs/models/operations/UploadPlaylistRequest.md + - docs/models/operations/UploadPlaylistErrors.md + - docs/models/operations/UploadPlaylistResponseBody.md + - docs/models/operations/UploadPlaylistResponse.md + - docs/models/operations/GetTransientTokenQueryParamType.md + - docs/models/operations/Scope.md + - docs/models/operations/GetTransientTokenRequest.md + - docs/models/operations/GetTransientTokenErrors.md + - docs/models/operations/GetTransientTokenResponseBody.md + - docs/models/operations/GetTransientTokenResponse.md + - docs/models/operations/GetSourceConnectionInformationRequest.md + - docs/models/operations/GetSourceConnectionInformationErrors.md + - docs/models/operations/GetSourceConnectionInformationResponseBody.md + - docs/models/operations/GetSourceConnectionInformationResponse.md + - docs/models/operations/GetStatisticsRequest.md + - docs/models/operations/GetStatisticsErrors.md + - docs/models/operations/GetStatisticsStatisticsResponseBody.md + - docs/models/operations/GetStatisticsDevice.md + - docs/models/operations/Account.md + - docs/models/operations/StatisticsMedia.md + - docs/models/operations/GetStatisticsMediaContainer.md + - docs/models/operations/GetStatisticsResponseBody.md + - docs/models/operations/GetStatisticsResponse.md + - docs/models/operations/GetSessionsErrors.md + - docs/models/operations/GetSessionsSessionsResponseBody.md + - docs/models/operations/GetSessionsStream.md + - docs/models/operations/GetSessionsPart.md + - docs/models/operations/GetSessionsMedia.md + - docs/models/operations/User.md + - docs/models/operations/Player.md + - docs/models/operations/Session.md + - docs/models/operations/GetSessionsMetadata.md + - docs/models/operations/GetSessionsMediaContainer.md + - docs/models/operations/GetSessionsResponseBody.md + - docs/models/operations/GetSessionsResponse.md + - docs/models/operations/GetSessionHistoryErrors.md + - docs/models/operations/GetSessionHistorySessionsResponseBody.md + - docs/models/operations/GetSessionHistoryMetadata.md + - docs/models/operations/GetSessionHistoryMediaContainer.md + - docs/models/operations/GetSessionHistoryResponseBody.md + - docs/models/operations/GetSessionHistoryResponse.md + - docs/models/operations/GetTranscodeSessionsErrors.md + - docs/models/operations/GetTranscodeSessionsSessionsResponseBody.md + - docs/models/operations/TranscodeSession.md + - docs/models/operations/GetTranscodeSessionsMediaContainer.md + - docs/models/operations/GetTranscodeSessionsResponseBody.md + - docs/models/operations/GetTranscodeSessionsResponse.md + - docs/models/operations/StopTranscodeSessionRequest.md + - docs/models/operations/StopTranscodeSessionErrors.md + - docs/models/operations/StopTranscodeSessionResponseBody.md + - docs/models/operations/StopTranscodeSessionResponse.md + - docs/models/operations/GetUpdateStatusErrors.md + - docs/models/operations/GetUpdateStatusUpdaterResponseBody.md + - docs/models/operations/Release.md + - docs/models/operations/GetUpdateStatusMediaContainer.md + - docs/models/operations/GetUpdateStatusResponseBody.md + - docs/models/operations/GetUpdateStatusResponse.md + - docs/models/operations/Download.md + - docs/models/operations/CheckForUpdatesRequest.md + - docs/models/operations/CheckForUpdatesErrors.md + - docs/models/operations/CheckForUpdatesResponseBody.md + - docs/models/operations/CheckForUpdatesResponse.md + - docs/models/operations/Tonight.md + - docs/models/operations/Skip.md + - docs/models/operations/ApplyUpdatesRequest.md + - docs/models/operations/ApplyUpdatesErrors.md + - docs/models/operations/ApplyUpdatesResponseBody.md + - docs/models/operations/ApplyUpdatesResponse.md + - docs/models/shared/Security.md + - USAGE.md diff --git a/gen.yaml b/.speakeasy/gen.yaml similarity index 76% rename from gen.yaml rename to .speakeasy/gen.yaml index ac5975de..3b036765 100644 --- a/gen.yaml +++ b/.speakeasy/gen.yaml @@ -6,15 +6,19 @@ generation: optionalPropertyRendering: withExample useClassNamesForArrayFields: true fixes: - nameResolutionDec2023: false - parameterOrderingFeb2024: false - requestResponseComponentNamesFeb2024: false + nameResolutionDec2023: true + parameterOrderingFeb2024: true + requestResponseComponentNamesFeb2024: true + auth: + oAuth2ClientCredentialsEnabled: true java: version: 0.0.1 + additionalDependencies: [] artifactID: plexapi companyEmail: lukeslakemail@gmail.com companyName: Personal companyURL: lukehagar.com + flattenGlobalSecurity: true githubURL: github.com/LukeHagar/plexjava groupID: lukehagar.plexapi imports: @@ -30,4 +34,4 @@ java: ossrhURL: https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ outputModelSuffix: output projectName: plexapi - templateVersion: v1 + templateVersion: v2 diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml new file mode 100644 index 00000000..bb9bbc7d --- /dev/null +++ b/.speakeasy/workflow.yaml @@ -0,0 +1,9 @@ +workflowVersion: 1.0.0 +sources: + my-source: + inputs: + - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml +targets: + plexjava: + target: java + source: my-source diff --git a/README.md b/README.md index 78d13e6e..a9132ebc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ - # PlexSDK Java SDK 0.0.1 -A Java SDK for PlexSDK. + +A Java SDK for PlexSDK. An Open API Spec for interacting with Plex.tv and Plex Servers @@ -9,17 +9,19 @@ An Open API Spec for interacting with Plex.tv and Plex Servers - SDK version: 0.0.1 ## Table of Contents -- [Requirements](#requirements) -- [Installation](#installation) - - [Dependencies](#dependencies) -- [Authentication](#authentication) - - [API Key](#api-key) -- [API Endpoint Services](#api-endpoint-services) -- [API Models](#api-models) -- [Testing](#testing) -- [Configuration](#configuration) -- [Sample Usage](#sample-usage) -- [License](#license) + +- [PlexSDK Java SDK 0.0.1](#plexsdk-java-sdk-001) + - [Table of Contents](#table-of-contents) + - [Requirements](#requirements) + - [Installation](#installation) + - [Authentication](#authentication) + - [API Key](#api-key) + - [API Endpoint Services](#api-endpoint-services) + - [API Models](#api-models) + - [Testing](#testing) + - [Configuration](#configuration) + - [Sample Usage](#sample-usage) + - [License](#license) ## Requirements @@ -28,7 +30,7 @@ An Open API Spec for interacting with Plex.tv and Plex Servers ## Installation -If you use Maven, place the following within the tag in your pom.xml file: +If you use Maven, place the following within the `` tag in your pom.xml file: ```XML @@ -49,6 +51,7 @@ implementation group: "47.one0", name: "PlexSDK", version: "0.0.1" To see whether an endpoint needs a specific type of authentication check the endpoint's documentation. ### API Key + The PlexSDK API uses API keys as a form of authentication. An API key is a unique identifier used to authenticate a user, developer, or calling program to an API. @@ -81,6 +84,7 @@ Click the service name for a full list of the service methods. |[VideoService](src/main/java/47/one0/services/README.md#videoservice)| ## API Models + [A list documenting all API models for this SDK](src/main/java/47/one0//models/README.md#plexsdk-models). ## Testing @@ -95,10 +99,8 @@ mvn clean test Your SDK may require some configuration changes. - This API is configured to use a security token for authorization. You should edit `examples/src/main/java/47/one0/examples/Main.java` and paste your own tokens in place of `PLEXSDK_API_KEY` & `PLEXSDK_API_KEY_HEADER`. - ## Sample Usage ```Java @@ -130,3 +132,255 @@ To see what other functions this SDK is capable of, look inside `src/main/java/4 License: MIT. See license in LICENSE. + + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Exception type. + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4xx-5xx | */* | + +### Example + +```java +package hello.world; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.Plex-API; +import lukehagar.plexapi.plexapi.models.operations.*; +import lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse; +import lukehagar.plexapi.plexapi.models.shared.*; +import lukehagar.plexapi.plexapi.models.shared.Security; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) { + try { + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + .call(); + + if (res.twoHundredApplicationJsonObject().isPresent()) { + // handle response + } + } catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) { + // handle exception + } catch (Exception e) { + // handle exception + } + } +} +``` + + + +## Server Selection + +### Select Server by Index + +You can override the default server globally by passing a server index to the `serverIndex` builder method when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | + +#### Example + +```java +package hello.world; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.Plex-API; +import lukehagar.plexapi.plexapi.models.operations.*; +import lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse; +import lukehagar.plexapi.plexapi.models.shared.*; +import lukehagar.plexapi.plexapi.models.shared.Security; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) { + try { + PlexAPI sdk = PlexAPI.builder() + .serverIndex(0) + .accessToken("") + .build(); + + GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + .call(); + + if (res.twoHundredApplicationJsonObject().isPresent()) { + // handle response + } + } catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) { + // handle exception + } catch (Exception e) { + // handle exception + } + } +} +``` + +#### Variables + +Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance: + * `ServerProtocol protocol` + * `String ip` + * `String port` + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `serverURL` builder method when initializing the SDK client instance. For example: +```java +package hello.world; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.Plex-API; +import lukehagar.plexapi.plexapi.models.operations.*; +import lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse; +import lukehagar.plexapi.plexapi.models.shared.*; +import lukehagar.plexapi.plexapi.models.shared.Security; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) { + try { + PlexAPI sdk = PlexAPI.builder() + .serverURL("{protocol}://{ip}:{port}") + .accessToken("") + .build(); + + GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + .call(); + + if (res.twoHundredApplicationJsonObject().isPresent()) { + // handle response + } + } catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) { + // handle exception + } catch (Exception e) { + // handle exception + } + } +} +``` + +### Override Server URL Per-Operation + +The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example: +```java +package hello.world; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.Plex-API; +import lukehagar.plexapi.plexapi.models.operations.*; +import lukehagar.plexapi.plexapi.models.operations.GetPinRequest; +import lukehagar.plexapi.plexapi.models.operations.GetPinResponse; +import lukehagar.plexapi.plexapi.models.shared.*; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) { + try { + PlexAPI sdk = PlexAPI.builder() + .build(); + + GetPinResponse res = sdk.plex().getPin() + .serverURL("https://plex.tv/api/v2") + .strong(false) + .xPlexClientIdentifier("") + .call(); + + if (res.twoHundredApplicationJsonObject().isPresent()) { + // handle response + } + } catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) { + // handle exception + } catch (Exception e) { + // handle exception + } + } +} +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| ------------- | ------------- | ------------- | +| `accessToken` | apiKey | API key | + +To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example: +```java +package hello.world; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.Plex-API; +import lukehagar.plexapi.plexapi.models.operations.*; +import lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse; +import lukehagar.plexapi.plexapi.models.shared.*; +import lukehagar.plexapi.plexapi.models.shared.Security; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) { + try { + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + .call(); + + if (res.twoHundredApplicationJsonObject().isPresent()) { + // handle response + } + } catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) { + // handle exception + } catch (Exception e) { + // handle exception + } + } +} +``` + + + + + diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 00000000..aaf938c7 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,39 @@ + +```java +package hello.world; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.Plex-API; +import lukehagar.plexapi.plexapi.models.operations.*; +import lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse; +import lukehagar.plexapi.plexapi.models.shared.*; +import lukehagar.plexapi.plexapi.models.shared.Security; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) { + try { + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .build(); + + GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + .call(); + + if (res.twoHundredApplicationJsonObject().isPresent()) { + // handle response + } + } catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) { + // handle exception + } catch (Exception e) { + // handle exception + } + } +} +``` + \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..3e140323 --- /dev/null +++ b/build.gradle @@ -0,0 +1,31 @@ + +plugins { + // Apply the java-library plugin for API and implementation separation. + id 'java-library' +} + +compileJava.options.encoding = "UTF-8" +compileTestJava.options.encoding = "UTF-8" + +repositories { + // Use Maven Central for resolving dependencies. + mavenCentral() +} + +tasks.withType(Javadoc) { + failOnError false + options.addStringOption('Xdoclint:none', '-quiet') +} + +dependencies { + implementation 'com.fasterxml.jackson.core:jackson-databind:2.16.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.16.2' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation 'org.apache.httpcomponents:httpclient:4.5.14' + implementation 'org.apache.httpcomponents:httpmime:4.5.14' + implementation 'com.jayway.jsonpath:json-path:2.9.0' + implementation 'commons-io:commons-io:2.15.1' +} + + diff --git a/docs/models/operations/Account.md b/docs/models/operations/Account.md new file mode 100644 index 00000000..4bdef685 --- /dev/null +++ b/docs/models/operations/Account.md @@ -0,0 +1,15 @@ +# Account + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 238960586 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /accounts/238960586 | +| `name` | *Optional* | :heavy_minus_sign: | N/A | Diane | +| `defaultAudioLanguage` | *Optional* | :heavy_minus_sign: | N/A | en | +| `autoSelectAudio` | *Optional* | :heavy_minus_sign: | N/A | true | +| `defaultSubtitleLanguage` | *Optional* | :heavy_minus_sign: | N/A | en | +| `subtitleMode` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 | \ No newline at end of file diff --git a/docs/models/operations/Activity.md b/docs/models/operations/Activity.md new file mode 100644 index 00000000..35203574 --- /dev/null +++ b/docs/models/operations/Activity.md @@ -0,0 +1,15 @@ +# Activity + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `uuid` | *Optional* | :heavy_minus_sign: | N/A | +| `type` | *Optional* | :heavy_minus_sign: | N/A | +| `cancellable` | *Optional* | :heavy_minus_sign: | N/A | +| `userID` | *Optional* | :heavy_minus_sign: | N/A | +| `title` | *Optional* | :heavy_minus_sign: | N/A | +| `subtitle` | *Optional* | :heavy_minus_sign: | N/A | +| `progress` | *Optional* | :heavy_minus_sign: | N/A | +| `context` | [Optional](../../models/operations/Context.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsErrors.md b/docs/models/operations/AddPlaylistContentsErrors.md new file mode 100644 index 00000000..5ed8e032 --- /dev/null +++ b/docs/models/operations/AddPlaylistContentsErrors.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsErrors + + +## 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/operations/AddPlaylistContentsMediaContainer.md b/docs/models/operations/AddPlaylistContentsMediaContainer.md new file mode 100644 index 00000000..84aa4002 --- /dev/null +++ b/docs/models/operations/AddPlaylistContentsMediaContainer.md @@ -0,0 +1,11 @@ +# AddPlaylistContentsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `leafCountAdded` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `leafCountRequested` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsMetadata](../../models/operations/AddPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "94",
"key": "/playlists/94/items",
"guid": "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
"type": "playlist",
"title": "A great playlist",
"summary": "One of my great playlists",
"smart": false,
"playlistType": "video",
"composite": "/playlists/94/composite/1705800070",
"duration": 423000,
"leafCount": 3,
"addedAt": 1705716458,
"updatedAt": 1705800070
}
] | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsMetadata.md b/docs/models/operations/AddPlaylistContentsMetadata.md new file mode 100644 index 00000000..e10c741b --- /dev/null +++ b/docs/models/operations/AddPlaylistContentsMetadata.md @@ -0,0 +1,20 @@ +# AddPlaylistContentsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 94 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /playlists/94/items | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | playlist | +| `title` | *Optional* | :heavy_minus_sign: | N/A | A great playlist | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | One of my great playlists | +| `smart` | *Optional* | :heavy_minus_sign: | N/A | false | +| `playlistType` | *Optional* | :heavy_minus_sign: | N/A | video | +| `composite` | *Optional* | :heavy_minus_sign: | N/A | /playlists/94/composite/1705800070 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 423000 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 3 | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705716458 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705800070 | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsPlaylistsResponseBody.md b/docs/models/operations/AddPlaylistContentsPlaylistsResponseBody.md new file mode 100644 index 00000000..92eafc8f --- /dev/null +++ b/docs/models/operations/AddPlaylistContentsPlaylistsResponseBody.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsErrors](../../models/operations/AddPlaylistContentsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsRequest.md b/docs/models/operations/AddPlaylistContentsRequest.md new file mode 100644 index 00000000..aeb17ceb --- /dev/null +++ b/docs/models/operations/AddPlaylistContentsRequest.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | | +| `uri` | *String* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 | +| `playQueueID` | *Optional* | :heavy_minus_sign: | the play queue to add to a playlist | 123 | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsResponse.md b/docs/models/operations/AddPlaylistContentsResponse.md new file mode 100644 index 00000000..9ad84394 --- /dev/null +++ b/docs/models/operations/AddPlaylistContentsResponse.md @@ -0,0 +1,12 @@ +# AddPlaylistContentsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/AddPlaylistContentsResponseBody.md) | :heavy_minus_sign: | Playlist Updated | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/AddPlaylistContentsPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsResponseBody.md b/docs/models/operations/AddPlaylistContentsResponseBody.md new file mode 100644 index 00000000..055d3a5a --- /dev/null +++ b/docs/models/operations/AddPlaylistContentsResponseBody.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsResponseBody + +Playlist Updated + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/AddPlaylistContentsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ApplyUpdatesErrors.md b/docs/models/operations/ApplyUpdatesErrors.md new file mode 100644 index 00000000..19cd4331 --- /dev/null +++ b/docs/models/operations/ApplyUpdatesErrors.md @@ -0,0 +1,10 @@ +# ApplyUpdatesErrors + + +## 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/operations/ApplyUpdatesRequest.md b/docs/models/operations/ApplyUpdatesRequest.md new file mode 100644 index 00000000..cadff543 --- /dev/null +++ b/docs/models/operations/ApplyUpdatesRequest.md @@ -0,0 +1,9 @@ +# ApplyUpdatesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tonight` | [Optional](../../models/operations/Tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | +| `skip` | [Optional](../../models/operations/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | \ No newline at end of file diff --git a/docs/models/operations/ApplyUpdatesResponse.md b/docs/models/operations/ApplyUpdatesResponse.md new file mode 100644 index 00000000..76df8e52 --- /dev/null +++ b/docs/models/operations/ApplyUpdatesResponse.md @@ -0,0 +1,11 @@ +# ApplyUpdatesResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/ApplyUpdatesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/ApplyUpdatesResponseBody.md b/docs/models/operations/ApplyUpdatesResponseBody.md new file mode 100644 index 00000000..4d4ec4ae --- /dev/null +++ b/docs/models/operations/ApplyUpdatesResponseBody.md @@ -0,0 +1,10 @@ +# ApplyUpdatesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesErrors](../../models/operations/ApplyUpdatesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ButlerTask.md b/docs/models/operations/ButlerTask.md new file mode 100644 index 00000000..f7ffc58e --- /dev/null +++ b/docs/models/operations/ButlerTask.md @@ -0,0 +1,13 @@ +# ButlerTask + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `name` | *Optional* | :heavy_minus_sign: | N/A | BackupDatabase | +| `interval` | *Optional* | :heavy_minus_sign: | N/A | 3 | +| `scheduleRandomized` | *Optional* | :heavy_minus_sign: | N/A | | +| `enabled` | *Optional* | :heavy_minus_sign: | N/A | | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Backup Database | +| `description` | *Optional* | :heavy_minus_sign: | N/A | Create a backup copy of the server's database in the configured backup directory | \ No newline at end of file diff --git a/docs/models/operations/ButlerTasks.md b/docs/models/operations/ButlerTasks.md new file mode 100644 index 00000000..b16b4a42 --- /dev/null +++ b/docs/models/operations/ButlerTasks.md @@ -0,0 +1,8 @@ +# ButlerTasks + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `butlerTask` | List<[lukehagar.plexapi.plexapi.models.operations.ButlerTask](../../models/operations/ButlerTask.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CancelServerActivitiesErrors.md b/docs/models/operations/CancelServerActivitiesErrors.md new file mode 100644 index 00000000..0fcd9628 --- /dev/null +++ b/docs/models/operations/CancelServerActivitiesErrors.md @@ -0,0 +1,10 @@ +# CancelServerActivitiesErrors + + +## 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/operations/CancelServerActivitiesRequest.md b/docs/models/operations/CancelServerActivitiesRequest.md new file mode 100644 index 00000000..c2201c84 --- /dev/null +++ b/docs/models/operations/CancelServerActivitiesRequest.md @@ -0,0 +1,8 @@ +# CancelServerActivitiesRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `activityUUID` | *String* | :heavy_check_mark: | The UUID of the activity to cancel. | \ No newline at end of file diff --git a/docs/models/operations/CancelServerActivitiesResponse.md b/docs/models/operations/CancelServerActivitiesResponse.md new file mode 100644 index 00000000..f3f5317b --- /dev/null +++ b/docs/models/operations/CancelServerActivitiesResponse.md @@ -0,0 +1,11 @@ +# CancelServerActivitiesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/CancelServerActivitiesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/CancelServerActivitiesResponseBody.md b/docs/models/operations/CancelServerActivitiesResponseBody.md new file mode 100644 index 00000000..1a7e5398 --- /dev/null +++ b/docs/models/operations/CancelServerActivitiesResponseBody.md @@ -0,0 +1,10 @@ +# CancelServerActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesErrors](../../models/operations/CancelServerActivitiesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CheckForUpdatesErrors.md b/docs/models/operations/CheckForUpdatesErrors.md new file mode 100644 index 00000000..297a8c05 --- /dev/null +++ b/docs/models/operations/CheckForUpdatesErrors.md @@ -0,0 +1,10 @@ +# CheckForUpdatesErrors + + +## 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/operations/CheckForUpdatesRequest.md b/docs/models/operations/CheckForUpdatesRequest.md new file mode 100644 index 00000000..58009149 --- /dev/null +++ b/docs/models/operations/CheckForUpdatesRequest.md @@ -0,0 +1,8 @@ +# CheckForUpdatesRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `download` | [Optional](../../models/operations/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | \ No newline at end of file diff --git a/docs/models/operations/CheckForUpdatesResponse.md b/docs/models/operations/CheckForUpdatesResponse.md new file mode 100644 index 00000000..f845a7a8 --- /dev/null +++ b/docs/models/operations/CheckForUpdatesResponse.md @@ -0,0 +1,11 @@ +# CheckForUpdatesResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/CheckForUpdatesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/CheckForUpdatesResponseBody.md b/docs/models/operations/CheckForUpdatesResponseBody.md new file mode 100644 index 00000000..797d59f6 --- /dev/null +++ b/docs/models/operations/CheckForUpdatesResponseBody.md @@ -0,0 +1,10 @@ +# CheckForUpdatesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesErrors](../../models/operations/CheckForUpdatesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ClearPlaylistContentsErrors.md b/docs/models/operations/ClearPlaylistContentsErrors.md new file mode 100644 index 00000000..d9c2ac1d --- /dev/null +++ b/docs/models/operations/ClearPlaylistContentsErrors.md @@ -0,0 +1,10 @@ +# ClearPlaylistContentsErrors + + +## 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/operations/ClearPlaylistContentsRequest.md b/docs/models/operations/ClearPlaylistContentsRequest.md new file mode 100644 index 00000000..1b9d8198 --- /dev/null +++ b/docs/models/operations/ClearPlaylistContentsRequest.md @@ -0,0 +1,8 @@ +# ClearPlaylistContentsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/ClearPlaylistContentsResponse.md b/docs/models/operations/ClearPlaylistContentsResponse.md new file mode 100644 index 00000000..73984fc3 --- /dev/null +++ b/docs/models/operations/ClearPlaylistContentsResponse.md @@ -0,0 +1,11 @@ +# ClearPlaylistContentsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/ClearPlaylistContentsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/ClearPlaylistContentsResponseBody.md b/docs/models/operations/ClearPlaylistContentsResponseBody.md new file mode 100644 index 00000000..14faed5b --- /dev/null +++ b/docs/models/operations/ClearPlaylistContentsResponseBody.md @@ -0,0 +1,10 @@ +# ClearPlaylistContentsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsErrors](../../models/operations/ClearPlaylistContentsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Context.md b/docs/models/operations/Context.md new file mode 100644 index 00000000..9587bf66 --- /dev/null +++ b/docs/models/operations/Context.md @@ -0,0 +1,8 @@ +# Context + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Country.md b/docs/models/operations/Country.md new file mode 100644 index 00000000..52a65cbc --- /dev/null +++ b/docs/models/operations/Country.md @@ -0,0 +1,8 @@ +# Country + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistErrors.md b/docs/models/operations/CreatePlaylistErrors.md new file mode 100644 index 00000000..61b09ce4 --- /dev/null +++ b/docs/models/operations/CreatePlaylistErrors.md @@ -0,0 +1,10 @@ +# CreatePlaylistErrors + + +## 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/operations/CreatePlaylistMediaContainer.md b/docs/models/operations/CreatePlaylistMediaContainer.md new file mode 100644 index 00000000..3a8b4816 --- /dev/null +++ b/docs/models/operations/CreatePlaylistMediaContainer.md @@ -0,0 +1,9 @@ +# CreatePlaylistMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 7 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.CreatePlaylistMetadata](../../models/operations/CreatePlaylistMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "96",
"key": "/playlists/96/items",
"guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
"type": "playlist",
"title": "A Great Playlist",
"summary": "What a great playlist",
"smart": false,
"playlistType": "video",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705719589,
"leafCount": 1,
"addedAt": 1705719589,
"updatedAt": 1705724593,
"composite": "/playlists/96/composite/1705724593",
"duration": 141000
}
] | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistMetadata.md b/docs/models/operations/CreatePlaylistMetadata.md new file mode 100644 index 00000000..170fd9d8 --- /dev/null +++ b/docs/models/operations/CreatePlaylistMetadata.md @@ -0,0 +1,23 @@ +# CreatePlaylistMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 96 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /playlists/96/items | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | playlist | +| `title` | *Optional* | :heavy_minus_sign: | N/A | A Great Playlist | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | What a great playlist | +| `smart` | *Optional* | :heavy_minus_sign: | N/A | false | +| `playlistType` | *Optional* | :heavy_minus_sign: | N/A | video | +| `icon` | *Optional* | :heavy_minus_sign: | N/A | playlist://image.smart | +| `viewCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `lastViewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705719589 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705719589 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705724593 | +| `composite` | *Optional* | :heavy_minus_sign: | N/A | /playlists/96/composite/1705724593 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141000 | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistPlaylistsResponseBody.md b/docs/models/operations/CreatePlaylistPlaylistsResponseBody.md new file mode 100644 index 00000000..4e0af524 --- /dev/null +++ b/docs/models/operations/CreatePlaylistPlaylistsResponseBody.md @@ -0,0 +1,10 @@ +# CreatePlaylistPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.CreatePlaylistErrors](../../models/operations/CreatePlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistRequest.md b/docs/models/operations/CreatePlaylistRequest.md new file mode 100644 index 00000000..9c206ac2 --- /dev/null +++ b/docs/models/operations/CreatePlaylistRequest.md @@ -0,0 +1,12 @@ +# CreatePlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `title` | *String* | :heavy_check_mark: | name of the playlist | +| `type` | [lukehagar.plexapi.plexapi.models.operations.QueryParamType](../../models/operations/QueryParamType.md) | :heavy_check_mark: | type of playlist to create | +| `smart` | [lukehagar.plexapi.plexapi.models.operations.Smart](../../models/operations/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not | +| `uri` | *String* | :heavy_check_mark: | the content URI for the playlist | +| `playQueueID` | *Optional* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistResponse.md b/docs/models/operations/CreatePlaylistResponse.md new file mode 100644 index 00000000..23414a7e --- /dev/null +++ b/docs/models/operations/CreatePlaylistResponse.md @@ -0,0 +1,12 @@ +# CreatePlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/CreatePlaylistResponseBody.md) | :heavy_minus_sign: | returns all playlists | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/CreatePlaylistPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistResponseBody.md b/docs/models/operations/CreatePlaylistResponseBody.md new file mode 100644 index 00000000..010f0e6c --- /dev/null +++ b/docs/models/operations/CreatePlaylistResponseBody.md @@ -0,0 +1,10 @@ +# CreatePlaylistResponseBody + +returns all playlists + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/CreatePlaylistMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeleteLibraryErrors.md b/docs/models/operations/DeleteLibraryErrors.md new file mode 100644 index 00000000..5e742f91 --- /dev/null +++ b/docs/models/operations/DeleteLibraryErrors.md @@ -0,0 +1,10 @@ +# DeleteLibraryErrors + + +## 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/operations/DeleteLibraryRequest.md b/docs/models/operations/DeleteLibraryRequest.md new file mode 100644 index 00000000..daece339 --- /dev/null +++ b/docs/models/operations/DeleteLibraryRequest.md @@ -0,0 +1,8 @@ +# DeleteLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `sectionId` | *double* | :heavy_check_mark: | the Id of the library to query | 1000 | \ No newline at end of file diff --git a/docs/models/operations/DeleteLibraryResponse.md b/docs/models/operations/DeleteLibraryResponse.md new file mode 100644 index 00000000..5a4b2037 --- /dev/null +++ b/docs/models/operations/DeleteLibraryResponse.md @@ -0,0 +1,11 @@ +# DeleteLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/DeleteLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/DeleteLibraryResponseBody.md b/docs/models/operations/DeleteLibraryResponseBody.md new file mode 100644 index 00000000..14cce9fd --- /dev/null +++ b/docs/models/operations/DeleteLibraryResponseBody.md @@ -0,0 +1,10 @@ +# DeleteLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.DeleteLibraryErrors](../../models/operations/DeleteLibraryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeletePlaylistErrors.md b/docs/models/operations/DeletePlaylistErrors.md new file mode 100644 index 00000000..0727ad0a --- /dev/null +++ b/docs/models/operations/DeletePlaylistErrors.md @@ -0,0 +1,10 @@ +# DeletePlaylistErrors + + +## 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/operations/DeletePlaylistRequest.md b/docs/models/operations/DeletePlaylistRequest.md new file mode 100644 index 00000000..dfebd858 --- /dev/null +++ b/docs/models/operations/DeletePlaylistRequest.md @@ -0,0 +1,8 @@ +# DeletePlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/DeletePlaylistResponse.md b/docs/models/operations/DeletePlaylistResponse.md new file mode 100644 index 00000000..36e96059 --- /dev/null +++ b/docs/models/operations/DeletePlaylistResponse.md @@ -0,0 +1,11 @@ +# DeletePlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/DeletePlaylistResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/DeletePlaylistResponseBody.md b/docs/models/operations/DeletePlaylistResponseBody.md new file mode 100644 index 00000000..d214c316 --- /dev/null +++ b/docs/models/operations/DeletePlaylistResponseBody.md @@ -0,0 +1,10 @@ +# DeletePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.DeletePlaylistErrors](../../models/operations/DeletePlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Device.md b/docs/models/operations/Device.md new file mode 100644 index 00000000..458946bd --- /dev/null +++ b/docs/models/operations/Device.md @@ -0,0 +1,12 @@ +# Device + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `name` | *Optional* | :heavy_minus_sign: | N/A | iPhone | +| `platform` | *Optional* | :heavy_minus_sign: | N/A | iOS | +| `clientIdentifier` | *Optional* | :heavy_minus_sign: | N/A | | +| `createdAt` | *Optional* | :heavy_minus_sign: | N/A | 1654131230 | \ No newline at end of file diff --git a/docs/models/operations/Director.md b/docs/models/operations/Director.md new file mode 100644 index 00000000..89925f7d --- /dev/null +++ b/docs/models/operations/Director.md @@ -0,0 +1,8 @@ +# Director + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Peyton Reed | \ No newline at end of file diff --git a/docs/models/operations/Directory.md b/docs/models/operations/Directory.md new file mode 100644 index 00000000..fbd051d1 --- /dev/null +++ b/docs/models/operations/Directory.md @@ -0,0 +1,10 @@ +# Directory + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `count` | *Optional* | :heavy_minus_sign: | N/A | +| `key` | *Optional* | :heavy_minus_sign: | N/A | +| `title` | *Optional* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Download.md b/docs/models/operations/Download.md new file mode 100644 index 00000000..1eb27ea5 --- /dev/null +++ b/docs/models/operations/Download.md @@ -0,0 +1,11 @@ +# Download + +Indicate that you want to start download any updates found. + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/EnablePaperTrailErrors.md b/docs/models/operations/EnablePaperTrailErrors.md new file mode 100644 index 00000000..77cfaab9 --- /dev/null +++ b/docs/models/operations/EnablePaperTrailErrors.md @@ -0,0 +1,10 @@ +# EnablePaperTrailErrors + + +## 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/operations/EnablePaperTrailResponse.md b/docs/models/operations/EnablePaperTrailResponse.md new file mode 100644 index 00000000..d80d7f90 --- /dev/null +++ b/docs/models/operations/EnablePaperTrailResponse.md @@ -0,0 +1,11 @@ +# EnablePaperTrailResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/EnablePaperTrailResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/EnablePaperTrailResponseBody.md b/docs/models/operations/EnablePaperTrailResponseBody.md new file mode 100644 index 00000000..99226965 --- /dev/null +++ b/docs/models/operations/EnablePaperTrailResponseBody.md @@ -0,0 +1,10 @@ +# EnablePaperTrailResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailErrors](../../models/operations/EnablePaperTrailErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Errors.md b/docs/models/operations/Errors.md new file mode 100644 index 00000000..0ecfc540 --- /dev/null +++ b/docs/models/operations/Errors.md @@ -0,0 +1,10 @@ +# Errors + + +## 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/operations/Field.md b/docs/models/operations/Field.md new file mode 100644 index 00000000..6a82c614 --- /dev/null +++ b/docs/models/operations/Field.md @@ -0,0 +1,11 @@ +# Field + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | label | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Label | +| `type` | *Optional* | :heavy_minus_sign: | N/A | tag | +| `subType` | *Optional* | :heavy_minus_sign: | N/A | bitrate | \ No newline at end of file diff --git a/docs/models/operations/FieldType.md b/docs/models/operations/FieldType.md new file mode 100644 index 00000000..05c9b036 --- /dev/null +++ b/docs/models/operations/FieldType.md @@ -0,0 +1,9 @@ +# FieldType + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `type` | *Optional* | :heavy_minus_sign: | N/A | resolution | +| `operator` | List<[lukehagar.plexapi.plexapi.models.operations.Operator](../../models/operations/Operator.md)> | :heavy_minus_sign: | N/A | [
{
"key": "=",
"title": "is"
}
] | \ No newline at end of file diff --git a/docs/models/operations/Filter.md b/docs/models/operations/Filter.md new file mode 100644 index 00000000..483e5d6e --- /dev/null +++ b/docs/models/operations/Filter.md @@ -0,0 +1,12 @@ +# Filter + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `filter` | *Optional* | :heavy_minus_sign: | N/A | label | +| `filterType` | *Optional* | :heavy_minus_sign: | N/A | string | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1/label | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Labels | +| `type` | *Optional* | :heavy_minus_sign: | N/A | filter | \ No newline at end of file diff --git a/docs/models/operations/Force.md b/docs/models/operations/Force.md new file mode 100644 index 00000000..9bacc5e4 --- /dev/null +++ b/docs/models/operations/Force.md @@ -0,0 +1,15 @@ +# Force + +Force overwriting of duplicate playlists. +By default, a playlist file uploaded with the same path will overwrite the existing playlist. +The `force` argument is used to disable overwriting. +If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Genre.md b/docs/models/operations/Genre.md new file mode 100644 index 00000000..383063b0 --- /dev/null +++ b/docs/models/operations/Genre.md @@ -0,0 +1,8 @@ +# Genre + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Comedy | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableClientsErrors.md b/docs/models/operations/GetAvailableClientsErrors.md new file mode 100644 index 00000000..cf9be793 --- /dev/null +++ b/docs/models/operations/GetAvailableClientsErrors.md @@ -0,0 +1,10 @@ +# GetAvailableClientsErrors + + +## 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/operations/GetAvailableClientsMediaContainer.md b/docs/models/operations/GetAvailableClientsMediaContainer.md new file mode 100644 index 00000000..61b1b292 --- /dev/null +++ b/docs/models/operations/GetAvailableClientsMediaContainer.md @@ -0,0 +1,9 @@ +# GetAvailableClientsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `server` | List<[lukehagar.plexapi.plexapi.models.operations.Server](../../models/operations/Server.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableClientsResponse.md b/docs/models/operations/GetAvailableClientsResponse.md new file mode 100644 index 00000000..ab7f9bec --- /dev/null +++ b/docs/models/operations/GetAvailableClientsResponse.md @@ -0,0 +1,12 @@ +# GetAvailableClientsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetAvailableClientsResponseBody.md) | :heavy_minus_sign: | Available Clients | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetAvailableClientsServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableClientsResponseBody.md b/docs/models/operations/GetAvailableClientsResponseBody.md new file mode 100644 index 00000000..60241bfd --- /dev/null +++ b/docs/models/operations/GetAvailableClientsResponseBody.md @@ -0,0 +1,10 @@ +# GetAvailableClientsResponseBody + +Available Clients + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetAvailableClientsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableClientsServerResponseBody.md b/docs/models/operations/GetAvailableClientsServerResponseBody.md new file mode 100644 index 00000000..fbe31588 --- /dev/null +++ b/docs/models/operations/GetAvailableClientsServerResponseBody.md @@ -0,0 +1,10 @@ +# GetAvailableClientsServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsErrors](../../models/operations/GetAvailableClientsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetButlerTasksButlerResponseBody.md b/docs/models/operations/GetButlerTasksButlerResponseBody.md new file mode 100644 index 00000000..624a037f --- /dev/null +++ b/docs/models/operations/GetButlerTasksButlerResponseBody.md @@ -0,0 +1,10 @@ +# GetButlerTasksButlerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetButlerTasksErrors](../../models/operations/GetButlerTasksErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetButlerTasksErrors.md b/docs/models/operations/GetButlerTasksErrors.md new file mode 100644 index 00000000..2653e76d --- /dev/null +++ b/docs/models/operations/GetButlerTasksErrors.md @@ -0,0 +1,10 @@ +# GetButlerTasksErrors + + +## 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/operations/GetButlerTasksResponse.md b/docs/models/operations/GetButlerTasksResponse.md new file mode 100644 index 00000000..926c9629 --- /dev/null +++ b/docs/models/operations/GetButlerTasksResponse.md @@ -0,0 +1,12 @@ +# GetButlerTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetButlerTasksResponseBody.md) | :heavy_minus_sign: | All butler tasks | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetButlerTasksButlerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetButlerTasksResponseBody.md b/docs/models/operations/GetButlerTasksResponseBody.md new file mode 100644 index 00000000..730b14ac --- /dev/null +++ b/docs/models/operations/GetButlerTasksResponseBody.md @@ -0,0 +1,10 @@ +# GetButlerTasksResponseBody + +All butler tasks + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `butlerTasks` | [Optional](../../models/operations/ButlerTasks.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesErrors.md b/docs/models/operations/GetDevicesErrors.md new file mode 100644 index 00000000..5f3725c1 --- /dev/null +++ b/docs/models/operations/GetDevicesErrors.md @@ -0,0 +1,10 @@ +# GetDevicesErrors + + +## 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/operations/GetDevicesMediaContainer.md b/docs/models/operations/GetDevicesMediaContainer.md new file mode 100644 index 00000000..6d3b6075 --- /dev/null +++ b/docs/models/operations/GetDevicesMediaContainer.md @@ -0,0 +1,10 @@ +# GetDevicesMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 151 | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.system.devices | +| `device` | List<[lukehagar.plexapi.plexapi.models.operations.Device](../../models/operations/Device.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesResponse.md b/docs/models/operations/GetDevicesResponse.md new file mode 100644 index 00000000..e6832ad8 --- /dev/null +++ b/docs/models/operations/GetDevicesResponse.md @@ -0,0 +1,12 @@ +# GetDevicesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetDevicesResponseBody.md) | :heavy_minus_sign: | Devices | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetDevicesServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesResponseBody.md b/docs/models/operations/GetDevicesResponseBody.md new file mode 100644 index 00000000..4c468ffc --- /dev/null +++ b/docs/models/operations/GetDevicesResponseBody.md @@ -0,0 +1,10 @@ +# GetDevicesResponseBody + +Devices + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetDevicesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesServerResponseBody.md b/docs/models/operations/GetDevicesServerResponseBody.md new file mode 100644 index 00000000..61763e48 --- /dev/null +++ b/docs/models/operations/GetDevicesServerResponseBody.md @@ -0,0 +1,10 @@ +# GetDevicesServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetDevicesErrors](../../models/operations/GetDevicesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetFileHashErrors.md b/docs/models/operations/GetFileHashErrors.md new file mode 100644 index 00000000..099a8ff1 --- /dev/null +++ b/docs/models/operations/GetFileHashErrors.md @@ -0,0 +1,10 @@ +# GetFileHashErrors + + +## 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/operations/GetFileHashRequest.md b/docs/models/operations/GetFileHashRequest.md new file mode 100644 index 00000000..103e0585 --- /dev/null +++ b/docs/models/operations/GetFileHashRequest.md @@ -0,0 +1,9 @@ +# GetFileHashRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `url` | *String* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 | +| `type` | *Optional* | :heavy_minus_sign: | Item type | | \ No newline at end of file diff --git a/docs/models/operations/GetFileHashResponse.md b/docs/models/operations/GetFileHashResponse.md new file mode 100644 index 00000000..2ea283df --- /dev/null +++ b/docs/models/operations/GetFileHashResponse.md @@ -0,0 +1,11 @@ +# GetFileHashResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetFileHashResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetFileHashResponseBody.md b/docs/models/operations/GetFileHashResponseBody.md new file mode 100644 index 00000000..d8389587 --- /dev/null +++ b/docs/models/operations/GetFileHashResponseBody.md @@ -0,0 +1,10 @@ +# GetFileHashResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetFileHashErrors](../../models/operations/GetFileHashErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsErrors.md b/docs/models/operations/GetGlobalHubsErrors.md new file mode 100644 index 00000000..ef0e5901 --- /dev/null +++ b/docs/models/operations/GetGlobalHubsErrors.md @@ -0,0 +1,10 @@ +# GetGlobalHubsErrors + + +## 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/operations/GetGlobalHubsHubsResponseBody.md b/docs/models/operations/GetGlobalHubsHubsResponseBody.md new file mode 100644 index 00000000..1f577c71 --- /dev/null +++ b/docs/models/operations/GetGlobalHubsHubsResponseBody.md @@ -0,0 +1,10 @@ +# GetGlobalHubsHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsErrors](../../models/operations/GetGlobalHubsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsMediaContainer.md b/docs/models/operations/GetGlobalHubsMediaContainer.md new file mode 100644 index 00000000..1965cd64 --- /dev/null +++ b/docs/models/operations/GetGlobalHubsMediaContainer.md @@ -0,0 +1,11 @@ +# GetGlobalHubsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 8 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | true | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `hub` | List<[lukehagar.plexapi.plexapi.models.operations.Hub](../../models/operations/Hub.md)> | :heavy_minus_sign: | N/A | [
{
"hubKey": "/library/metadata/50768,65523,58188,57341,57302,57070",
"key": "/playlists/all?type=15\u0026sort=lastViewedAt:desc\u0026playlistType=video,audio",
"title": "Recent Playlists",
"type": "playlist",
"hubIdentifier": "home.playlists",
"context": "hub.home.playlists",
"size": 6,
"more": true,
"style": "shelf",
"promoted": true,
"Metadata": [
{
"ratingKey": "50768",
"key": "/playlists/50768/items",
"guid": "com.plexapp.agents.none://81658e0d-cd4e-4c73-abb9-832b2ae2037b",
"type": "playlist",
"title": "❤️ Tracks",
"titleSort": "Tracks",
"summary": "All your highly rated tracks, in one convenient place.",
"smart": true,
"playlistType": "audio",
"composite": "/playlists/50768/composite/1704333758",
"icon": "playlist://image.smart",
"viewCount": 47,
"lastViewedAt": 1705329935,
"duration": 42864000,
"leafCount": 178,
"addedAt": 1655309388,
"updatedAt": 1704333758
},
{
"ratingKey": "65523",
"key": "/playlists/65523/items",
"guid": "com.plexapp.agents.none://1bcdd596-892b-4856-9f28-b4338c439300",
"type": "playlist",
"title": "Car Rides",
"summary": "",
"smart": false,
"playlistType": "audio",
"composite": "/playlists/65523/composite/1698597932",
"viewCount": 2,
"lastViewedAt": 1698597949,
"duration": 4864000,
"leafCount": 19,
"addedAt": 1697993545,
"updatedAt": 1698597932
},
{
"ratingKey": "58188",
"key": "/playlists/58188/items",
"guid": "com.plexapp.agents.none://8f0441d3-2a28-4644-a2f1-b7deeb290dff",
"type": "playlist",
"title": "Workout",
"summary": "",
"smart": false,
"playlistType": "audio",
"composite": "/playlists/58188/composite/1680825595",
"viewCount": 4,
"lastViewedAt": 1680825596,
"duration": 12522000,
"leafCount": 56,
"addedAt": 1679616785,
"updatedAt": 1680825595
},
{
"ratingKey": "57341",
"key": "/playlists/57341/items",
"guid": "com.plexapp.agents.none://bf8778c3-20a3-4619-8eb0-3c172c18ffd6",
"type": "playlist",
"title": "January Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57341/composite/1673372385",
"viewCount": 1,
"lastViewedAt": 1673372306,
"duration": 19119000,
"leafCount": 3,
"addedAt": 1673372306,
"updatedAt": 1673372385
},
{
"ratingKey": "57302",
"key": "/playlists/57302/items",
"guid": "com.plexapp.agents.none://f25064ed-05bb-4bcf-b70c-ed7514b70929",
"type": "playlist",
"title": "December Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57302/composite/1671205874",
"viewCount": 2,
"lastViewedAt": 1671206853,
"duration": 23040000,
"leafCount": 3,
"addedAt": 1671197078,
"updatedAt": 1671205874
},
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
]
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsMetadata.md b/docs/models/operations/GetGlobalHubsMetadata.md new file mode 100644 index 00000000..e4600981 --- /dev/null +++ b/docs/models/operations/GetGlobalHubsMetadata.md @@ -0,0 +1,24 @@ +# GetGlobalHubsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 57070 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /playlists/57070/items | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c | +| `type` | *Optional* | :heavy_minus_sign: | N/A | playlist | +| `title` | *Optional* | :heavy_minus_sign: | N/A | November Movie Day | +| `titleSort` | *Optional* | :heavy_minus_sign: | N/A | Tracks | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | | +| `smart` | *Optional* | :heavy_minus_sign: | N/A | false | +| `playlistType` | *Optional* | :heavy_minus_sign: | N/A | video | +| `composite` | *Optional* | :heavy_minus_sign: | N/A | /playlists/57070/composite/1668787730 | +| `icon` | *Optional* | :heavy_minus_sign: | N/A | playlist://image.smart | +| `viewCount` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `lastViewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1668787732 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 16873000 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 3 | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1668779618 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1668787730 | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsRequest.md b/docs/models/operations/GetGlobalHubsRequest.md new file mode 100644 index 00000000..c9f6978a --- /dev/null +++ b/docs/models/operations/GetGlobalHubsRequest.md @@ -0,0 +1,9 @@ +# GetGlobalHubsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `count` | *Optional* | :heavy_minus_sign: | The number of items to return with each hub. | +| `onlyTransient` | [Optional](../../models/operations/OnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsResponse.md b/docs/models/operations/GetGlobalHubsResponse.md new file mode 100644 index 00000000..48943e6c --- /dev/null +++ b/docs/models/operations/GetGlobalHubsResponse.md @@ -0,0 +1,12 @@ +# GetGlobalHubsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetGlobalHubsResponseBody.md) | :heavy_minus_sign: | returns global hubs | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetGlobalHubsHubsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsResponseBody.md b/docs/models/operations/GetGlobalHubsResponseBody.md new file mode 100644 index 00000000..98afb0f9 --- /dev/null +++ b/docs/models/operations/GetGlobalHubsResponseBody.md @@ -0,0 +1,10 @@ +# GetGlobalHubsResponseBody + +returns global hubs + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetGlobalHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibrariesDirectory.md b/docs/models/operations/GetLibrariesDirectory.md new file mode 100644 index 00000000..037ccd47 --- /dev/null +++ b/docs/models/operations/GetLibrariesDirectory.md @@ -0,0 +1,28 @@ +# GetLibrariesDirectory + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | true | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `composite` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 | +| `filters` | *Optional* | :heavy_minus_sign: | N/A | true | +| `refreshing` | *Optional* | :heavy_minus_sign: | N/A | false | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `key` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `agent` | *Optional* | :heavy_minus_sign: | N/A | tv.plex.agents.movie | +| `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: | N/A | 1705615634 | +| `createdAt` | *Optional* | :heavy_minus_sign: | N/A | 1654131312 | +| `scannedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705615584 | +| `content` | *Optional* | :heavy_minus_sign: | N/A | true | +| `directory` | *Optional* | :heavy_minus_sign: | N/A | true | +| `contentChangedAt` | *Optional* | :heavy_minus_sign: | N/A | 3192854 | +| `hidden` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `location` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibrariesLocation](../../models/operations/GetLibrariesLocation.md)> | :heavy_minus_sign: | N/A | [
{
"id": 1,
"path": "/movies"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetLibrariesErrors.md b/docs/models/operations/GetLibrariesErrors.md new file mode 100644 index 00000000..d8e4922c --- /dev/null +++ b/docs/models/operations/GetLibrariesErrors.md @@ -0,0 +1,10 @@ +# GetLibrariesErrors + + +## 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/operations/GetLibrariesLibraryResponseBody.md b/docs/models/operations/GetLibrariesLibraryResponseBody.md new file mode 100644 index 00000000..b5dae85a --- /dev/null +++ b/docs/models/operations/GetLibrariesLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetLibrariesLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibrariesErrors](../../models/operations/GetLibrariesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibrariesLocation.md b/docs/models/operations/GetLibrariesLocation.md new file mode 100644 index 00000000..c5e3cb59 --- /dev/null +++ b/docs/models/operations/GetLibrariesLocation.md @@ -0,0 +1,9 @@ +# GetLibrariesLocation + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `path` | *Optional* | :heavy_minus_sign: | N/A | /movies | \ No newline at end of file diff --git a/docs/models/operations/GetLibrariesMediaContainer.md b/docs/models/operations/GetLibrariesMediaContainer.md new file mode 100644 index 00000000..458848a8 --- /dev/null +++ b/docs/models/operations/GetLibrariesMediaContainer.md @@ -0,0 +1,11 @@ +# GetLibrariesMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 5 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | false | +| `title1` | *Optional* | :heavy_minus_sign: | N/A | Plex Library | +| `directory` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibrariesDirectory](../../models/operations/GetLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"allowSync": true,
"art": "/:/resources/movie-fanart.jpg",
"composite": "/library/sections/1/composite/1705615584",
"filters": true,
"refreshing": false,
"thumb": "/:/resources/movie.png",
"key": "1",
"type": "movie",
"title": "Movies",
"agent": "tv.plex.agents.movie",
"scanner": "Plex Movie",
"language": "en-US",
"uuid": "322a231a-b7f7-49f5-920f-14c61199cd30",
"updatedAt": 1705615634,
"createdAt": 1654131312,
"scannedAt": 1705615584,
"content": true,
"directory": true,
"contentChangedAt": 3192854,
"hidden": 0,
"Location": [
{
"id": 1,
"path": "/movies"
}
]
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetLibrariesResponse.md b/docs/models/operations/GetLibrariesResponse.md new file mode 100644 index 00000000..468b6d18 --- /dev/null +++ b/docs/models/operations/GetLibrariesResponse.md @@ -0,0 +1,12 @@ +# GetLibrariesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetLibrariesResponseBody.md) | :heavy_minus_sign: | The libraries available on the Server | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetLibrariesLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetLibrariesResponseBody.md b/docs/models/operations/GetLibrariesResponseBody.md new file mode 100644 index 00000000..1d0a2074 --- /dev/null +++ b/docs/models/operations/GetLibrariesResponseBody.md @@ -0,0 +1,10 @@ +# GetLibrariesResponseBody + +The libraries available on the Server + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDirectory.md b/docs/models/operations/GetLibraryDirectory.md new file mode 100644 index 00000000..1c58c32f --- /dev/null +++ b/docs/models/operations/GetLibraryDirectory.md @@ -0,0 +1,12 @@ +# GetLibraryDirectory + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | search?type=1 | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Search... | +| `secondary` | *Optional* | :heavy_minus_sign: | N/A | true | +| `prompt` | *Optional* | :heavy_minus_sign: | N/A | Search Movies | +| `search` | *Optional* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryErrors.md b/docs/models/operations/GetLibraryErrors.md new file mode 100644 index 00000000..8f59e3e0 --- /dev/null +++ b/docs/models/operations/GetLibraryErrors.md @@ -0,0 +1,10 @@ +# GetLibraryErrors + + +## 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/operations/GetLibraryHubsCountry.md b/docs/models/operations/GetLibraryHubsCountry.md new file mode 100644 index 00000000..b933a055 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsCountry.md @@ -0,0 +1,8 @@ +# GetLibraryHubsCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsDirector.md b/docs/models/operations/GetLibraryHubsDirector.md new file mode 100644 index 00000000..d6ea192e --- /dev/null +++ b/docs/models/operations/GetLibraryHubsDirector.md @@ -0,0 +1,8 @@ +# GetLibraryHubsDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Nathan Greno | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsErrors.md b/docs/models/operations/GetLibraryHubsErrors.md new file mode 100644 index 00000000..52347ca8 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsErrors.md @@ -0,0 +1,10 @@ +# GetLibraryHubsErrors + + +## 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/operations/GetLibraryHubsGenre.md b/docs/models/operations/GetLibraryHubsGenre.md new file mode 100644 index 00000000..bceadde8 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsGenre.md @@ -0,0 +1,8 @@ +# GetLibraryHubsGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Animation | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsHub.md b/docs/models/operations/GetLibraryHubsHub.md new file mode 100644 index 00000000..b131b41a --- /dev/null +++ b/docs/models/operations/GetLibraryHubsHub.md @@ -0,0 +1,19 @@ +# GetLibraryHubsHub + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Recently Played Movies | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `hubIdentifier` | *Optional* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 | +| `context` | *Optional* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 6 | +| `more` | *Optional* | :heavy_minus_sign: | N/A | true | +| `style` | *Optional* | :heavy_minus_sign: | N/A | shelf | +| `hubKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsMetadata](../../models/operations/GetLibraryHubsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "14944",
"key": "/library/metadata/14944",
"guid": "plex://movie/5d77686eeb5d26001f1eb339",
"studio": "Walt Disney Animation Studios",
"type": "movie",
"title": "Tangled",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
"rating": 8.9,
"audienceRating": 8.7,
"viewCount": 1,
"lastViewedAt": 1704936047,
"year": 2010,
"tagline": "They're taking adventure to new lengths.",
"thumb": "/library/metadata/14944/thumb/1705739847",
"art": "/library/metadata/14944/art/1705739847",
"duration": 6017237,
"originallyAvailableAt": "2010-11-24T00:00:00Z",
"addedAt": 1589412494,
"updatedAt": 1705739847,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/14952",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Byron Howard"
},
{
"tag": "Nathan Greno"
}
],
"Role": [
{
"tag": "Mandy Moore"
},
{
"tag": "Zachary Levi"
},
{
"tag": "Donna Murphy"
}
],
"Writer": [
{
"tag": "Jacob Grimm"
},
{
"tag": "Wilhelm Grimm"
}
],
"skipCount": 1,
"chapterSource": "media"
}
] | +| `promoted` | *Optional* | :heavy_minus_sign: | N/A | true | +| `random` | *Optional* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsHubsResponseBody.md b/docs/models/operations/GetLibraryHubsHubsResponseBody.md new file mode 100644 index 00000000..20db4015 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsHubsResponseBody.md @@ -0,0 +1,10 @@ +# GetLibraryHubsHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsErrors](../../models/operations/GetLibraryHubsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsMedia.md b/docs/models/operations/GetLibraryHubsMedia.md new file mode 100644 index 00000000..f96518fd --- /dev/null +++ b/docs/models/operations/GetLibraryHubsMedia.md @@ -0,0 +1,24 @@ +# GetLibraryHubsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 38247 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 6017237 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 2051 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 1.78 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsPart](../../models/operations/GetLibraryHubsPart.md)> | :heavy_minus_sign: | N/A | [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsMediaContainer.md b/docs/models/operations/GetLibraryHubsMediaContainer.md new file mode 100644 index 00000000..82874230 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsMediaContainer.md @@ -0,0 +1,14 @@ +# GetLibraryHubsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 7 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | true | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `hub` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsHub](../../models/operations/GetLibraryHubsHub.md)> | :heavy_minus_sign: | N/A | [
{
"key": "/library/sections/1/all?sort=lastViewedAt:desc\u0026unwatched=0\u0026viewOffset=0",
"title": "Recently Played Movies",
"type": "movie",
"hubIdentifier": "movie.recentlyviewed.1",
"context": "hub.movie.recentlyviewed",
"size": 6,
"more": true,
"style": "shelf",
"hubKey": "/library/metadata/66485,66098,57249,11449,5858,14944",
"Metadata": [
{
"ratingKey": "66485",
"key": "/library/metadata/66485",
"guid": "plex://movie/5d776c3251dd69001fe38bb4",
"studio": "Termite Films",
"type": "movie",
"title": "Kedi",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "Not Rated",
"summary": "A profile of an ancient city and its unique people, seen through the eyes of the most mysterious and beloved animal humans have ever known, the Cat.",
"rating": 9.8,
"audienceRating": 8.5,
"viewCount": 2,
"lastViewedAt": 1705786111,
"year": 2017,
"tagline": "A cat meowing at your feet, looking up at you, is life smiling at you...",
"thumb": "/library/metadata/66485/thumb/1702586907",
"art": "/library/metadata/66485/art/1702586907",
"duration": 4736174,
"originallyAvailableAt": "2017-02-10T00:00:00Z",
"addedAt": 1702586905,
"updatedAt": 1702586907,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/66486",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 129531,
"duration": 4736174,
"bitrate": 2377,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 129778,
"key": "/library/parts/129778/1702586883/file.mp4",
"duration": 4736174,
"file": "/movies/Kedi (2017)/Kedi (2017) 1080p x264.mp4",
"size": 1410810905,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Documentary"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Ceyda Torun"
}
],
"Role": [
{
"tag": "Bülent Üstün"
}
]
},
{
"ratingKey": "66098",
"key": "/library/metadata/66098",
"guid": "plex://movie/5d9f34f4adeb7a0021ce020f",
"studio": "Touchwood Pacific Partners 1",
"type": "movie",
"title": "Homeward Bound: The Incredible Journey",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "G",
"summary": "A fun-loving American bulldog pup, a hilarious Himalayan cat, and a wise old golden retriever embark on a long trek through the rugged wilderness of the Sierra Nevada mountains in a quest to reach home and their beloved owners.",
"rating": 8.7,
"audienceRating": 7.1,
"viewCount": 2,
"lastViewedAt": 1705709811,
"year": 1993,
"tagline": "In the classic tradition of Walt Disney Pictures comes a story about courage, adventure and friendship.",
"thumb": "/library/metadata/66098/thumb/1703148781",
"art": "/library/metadata/66098/art/1703148781",
"duration": 5065775,
"originallyAvailableAt": "1993-02-12T00:00:00Z",
"addedAt": 1700434925,
"updatedAt": 1703148781,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/66099",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 129003,
"duration": 5065775,
"bitrate": 2444,
"width": 1904,
"height": 1024,
"aspectRatio": 1.85,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 129250,
"key": "/library/parts/129250/1700434864/file.mp4",
"duration": 5065775,
"file": "/movies/Homeward Bound The Incredible Journey (1993)/Homeward Bound The Incredible Journey (1993) [BluRay] [1080p] [YTS.LT].mp4",
"size": 1550855333,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Adventure"
},
{
"tag": "Comedy"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Duwayne Dunham"
}
],
"Writer": [
{
"tag": "Caroline Thompson"
},
{
"tag": "Linda Woolverton"
}
],
"Role": [
{
"tag": "Michael J. Fox"
},
{
"tag": "Sally Field"
},
{
"tag": "Don Ameche"
}
]
},
{
"ratingKey": "57249",
"key": "/library/metadata/57249",
"guid": "plex://movie/60eff7d3e22797002c55c1cc",
"studio": "Nickelodeon Movies",
"type": "movie",
"title": "Blue's Big City Adventure",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "TV-Y",
"summary": "Josh and Blue skidoo to New York City to audition for Rainbow Puppy's Broadway musical, but they get lost when Josh accidentally left his Handy Dandy Notebook at home. This leads to a game of Blue's Clues to figure out where the audition is. Meanwhile, Tickety Tock and her friends go to New York City to find Josh and Blue and get to the audition with help from Joe and Steve.",
"rating": 8.3,
"audienceRating": 8.6,
"viewCount": 8,
"skipCount": 1,
"lastViewedAt": 1705681955,
"year": 2022,
"tagline": "All They Need is You.",
"thumb": "/library/metadata/57249/thumb/1704274800",
"art": "/library/metadata/57249/art/1704274800",
"duration": 4459050,
"originallyAvailableAt": "2022-11-18T00:00:00Z",
"addedAt": 1669671356,
"updatedAt": 1704274800,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/57250",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 115470,
"duration": 4459050,
"bitrate": 6384,
"width": 3840,
"height": 2160,
"aspectRatio": 1.78,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"audioProfile": "lc",
"videoProfile": "main 10",
"Part": [
{
"id": 115478,
"key": "/library/parts/115478/1669671340/file.mkv",
"duration": 4459050,
"file": "/movies/Blue's Big City Adventure (2022)/Blues.Big.City.Adventure.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv",
"size": 3560750664,
"audioProfile": "lc",
"container": "mkv",
"videoProfile": "main 10"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Family"
}
],
"Country": [
{
"tag": "Canada"
},
{
"tag": "Ireland"
}
],
"Director": [
{
"tag": "Matt Stawski"
}
],
"Writer": [
{
"tag": "Traci Paige Johnson"
},
{
"tag": "Todd Kessler"
}
],
"Role": [
{
"tag": "Joshua Dela Cruz"
},
{
"tag": "Steve Burns"
},
{
"tag": "Donovan Patton"
}
]
},
{
"ratingKey": "11449",
"key": "/library/metadata/11449",
"guid": "plex://movie/5d776edfad5437001f803cf9",
"studio": "Walt Disney Pictures",
"type": "movie",
"title": "Onward",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "In a magical world full of technological advances, elven brothers Ian and Barley Lightfoot set out on an adventure to resurrect their late father for a day.",
"rating": 8.8,
"audienceRating": 9.5,
"viewCount": 3,
"lastViewedAt": 1705543126,
"year": 2020,
"tagline": "Their quest begineth.",
"thumb": "/library/metadata/11449/thumb/1705224000",
"art": "/library/metadata/11449/art/1705224000",
"duration": 6141428,
"originallyAvailableAt": "2020-03-04T00:00:00Z",
"addedAt": 1589237130,
"updatedAt": 1705224000,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"chapterSource": "media",
"primaryExtraKey": "/library/metadata/11470",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 29291,
"duration": 6141428,
"bitrate": 10977,
"width": 1920,
"height": 804,
"aspectRatio": 2.35,
"audioChannels": 8,
"audioCodec": "dca-ma",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mkv",
"videoFrameRate": "24p",
"audioProfile": "ma",
"videoProfile": "high",
"Part": [
{
"id": 29291,
"key": "/library/parts/29291/1589237130/file.mkv",
"duration": 6141428,
"file": "/movies/Onward (2020)/Onward (2020) Bluray-1080p.mkv",
"size": 8426669232,
"audioProfile": "ma",
"container": "mkv",
"videoProfile": "high"
}
]
},
{
"id": 29315,
"duration": 6142006,
"bitrate": 2639,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 29315,
"key": "/library/parts/29315/1629002847/file.mp4",
"duration": 6142006,
"file": "/movies/Onward (2020)/Onward (2020) WEBRip-1080p.mp4",
"size": 2026154995,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Animation"
},
{
"tag": "Comedy"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Dan Scanlon"
}
],
"Writer": [
{
"tag": "Kelsey Mann"
},
{
"tag": "Dan Scanlon"
}
],
"Role": [
{
"tag": "Tom Holland"
},
{
"tag": "Chris Pratt"
},
{
"tag": "Julia Louis-Dreyfus"
}
]
},
{
"ratingKey": "5858",
"key": "/library/metadata/5858",
"guid": "plex://movie/5d776b85594b2b001e6dc641",
"studio": "Walt Disney Pictures",
"type": "movie",
"title": "Frozen II",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "Anna, Elsa, Kristoff, Olaf and Sven leave Arendelle to travel to an ancient, autumn-bound forest of an enchanted land. They set out to find the origin of Elsa's powers in order to save their kingdom.",
"rating": 7.7,
"audienceRating": 9.2,
"viewCount": 1,
"skipCount": 1,
"lastViewedAt": 1705337663,
"year": 2019,
"tagline": "The past is not what it seems.",
"thumb": "/library/metadata/5858/thumb/1704621922",
"art": "/library/metadata/5858/art/1704621922",
"duration": 6194042,
"originallyAvailableAt": "2019-11-20T00:00:00Z",
"addedAt": 1588207762,
"updatedAt": 1704621922,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/5892",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 14954,
"duration": 6194042,
"bitrate": 2538,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 14954,
"key": "/library/parts/14954/1588207762/file.mp4",
"duration": 6194042,
"file": "/movies/Frozen II (2019)/Frozen II (2019) Bluray-1080p.mp4",
"size": 1969230037,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
},
{
"id": 14999,
"duration": 6244271,
"bitrate": 2536,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 14999,
"key": "/library/parts/14999/1629001526/file.mp4",
"duration": 6244271,
"file": "/movies/Frozen II (2019)/Frozen II (2019) WEBRip-1080p.mp4",
"size": 1983357282,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Adventure"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Chris Buck"
},
{
"tag": "Jennifer Lee"
}
],
"Writer": [
{
"tag": "Chris Buck"
},
{
"tag": "Hans Christian Andersen"
}
],
"Role": [
{
"tag": "Idina Menzel"
},
{
"tag": "Kristen Bell"
},
{
"tag": "Josh Gad"
}
]
},
{
"ratingKey": "14944",
"key": "/library/metadata/14944",
"guid": "plex://movie/5d77686eeb5d26001f1eb339",
"studio": "Walt Disney Animation Studios",
"type": "movie",
"title": "Tangled",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
"rating": 8.9,
"audienceRating": 8.7,
"viewCount": 1,
"lastViewedAt": 1704936047,
"year": 2010,
"tagline": "They're taking adventure to new lengths.",
"thumb": "/library/metadata/14944/thumb/1705739847",
"art": "/library/metadata/14944/art/1705739847",
"duration": 6017237,
"originallyAvailableAt": "2010-11-24T00:00:00Z",
"addedAt": 1589412494,
"updatedAt": 1705739847,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/14952",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Byron Howard"
},
{
"tag": "Nathan Greno"
}
],
"Writer": [
{
"tag": "Jacob Grimm"
},
{
"tag": "Wilhelm Grimm"
}
],
"Role": [
{
"tag": "Mandy Moore"
},
{
"tag": "Zachary Levi"
},
{
"tag": "Donna Murphy"
}
]
}
],
"promoted": true,
"random": true
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsMetadata.md b/docs/models/operations/GetLibraryHubsMetadata.md new file mode 100644 index 00000000..a3165464 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsMetadata.md @@ -0,0 +1,41 @@ +# GetLibraryHubsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 14944 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/14944 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 | +| `studio` | *Optional* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Tangled | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is. | +| `rating` | *Optional* | :heavy_minus_sign: | N/A | 8.9 | +| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 8.7 | +| `viewCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `lastViewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1704936047 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 2010 | +| `tagline` | *Optional* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 6017237 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1589412494 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705739847 | +| `audienceRatingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `primaryExtraKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/14952 | +| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsMedia](../../models/operations/GetLibraryHubsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
] | +| `genre` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsGenre](../../models/operations/GetLibraryHubsGenre.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Animation"
}
] | +| `country` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsCountry](../../models/operations/GetLibraryHubsCountry.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | +| `director` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsDirector](../../models/operations/GetLibraryHubsDirector.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Nathan Greno"
}
] | +| `role` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRole](../../models/operations/GetLibraryHubsRole.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Donna Murphy"
}
] | +| `writer` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsWriter](../../models/operations/GetLibraryHubsWriter.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Wilhelm Grimm"
}
] | +| `skipCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `chapterSource` | *Optional* | :heavy_minus_sign: | N/A | media | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsPart.md b/docs/models/operations/GetLibraryHubsPart.md new file mode 100644 index 00000000..29504717 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsPart.md @@ -0,0 +1,17 @@ +# GetLibraryHubsPart + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 38247 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/38247/1589412494/file.mp4 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 6017237 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4 | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1545647447 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | true | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsRequest.md b/docs/models/operations/GetLibraryHubsRequest.md new file mode 100644 index 00000000..6bbb8101 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsRequest.md @@ -0,0 +1,10 @@ +# GetLibraryHubsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sectionId` | *double* | :heavy_check_mark: | the Id of the library to query | +| `count` | *Optional* | :heavy_minus_sign: | The number of items to return with each hub. | +| `onlyTransient` | [Optional](../../models/operations/QueryParamOnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsResponse.md b/docs/models/operations/GetLibraryHubsResponse.md new file mode 100644 index 00000000..195a2ff5 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsResponse.md @@ -0,0 +1,12 @@ +# GetLibraryHubsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetLibraryHubsResponseBody.md) | :heavy_minus_sign: | The hubs specific to the library | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetLibraryHubsHubsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsResponseBody.md b/docs/models/operations/GetLibraryHubsResponseBody.md new file mode 100644 index 00000000..491eb395 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsResponseBody.md @@ -0,0 +1,10 @@ +# GetLibraryHubsResponseBody + +The hubs specific to the library + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetLibraryHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsRole.md b/docs/models/operations/GetLibraryHubsRole.md new file mode 100644 index 00000000..fa3cb330 --- /dev/null +++ b/docs/models/operations/GetLibraryHubsRole.md @@ -0,0 +1,8 @@ +# GetLibraryHubsRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Donna Murphy | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsWriter.md b/docs/models/operations/GetLibraryHubsWriter.md new file mode 100644 index 00000000..a66a46bb --- /dev/null +++ b/docs/models/operations/GetLibraryHubsWriter.md @@ -0,0 +1,8 @@ +# GetLibraryHubsWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Wilhelm Grimm | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsCountry.md b/docs/models/operations/GetLibraryItemsCountry.md new file mode 100644 index 00000000..69cdad79 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsCountry.md @@ -0,0 +1,8 @@ +# GetLibraryItemsCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsDirector.md b/docs/models/operations/GetLibraryItemsDirector.md new file mode 100644 index 00000000..315fba69 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsDirector.md @@ -0,0 +1,8 @@ +# GetLibraryItemsDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsGenre.md b/docs/models/operations/GetLibraryItemsGenre.md new file mode 100644 index 00000000..1bbf7901 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsGenre.md @@ -0,0 +1,8 @@ +# GetLibraryItemsGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Adventure | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMedia.md b/docs/models/operations/GetLibraryItemsMedia.md new file mode 100644 index 00000000..96361f1e --- /dev/null +++ b/docs/models/operations/GetLibraryItemsMedia.md @@ -0,0 +1,21 @@ +# GetLibraryItemsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 119534 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 11558112 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 25025 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 3840 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 2072 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 1.85 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 6 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | eac3 | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | hevc | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 4k | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mkv | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | main 10 | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsPart](../../models/operations/GetLibraryItemsPart.md)> | :heavy_minus_sign: | N/A | [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMediaContainer.md b/docs/models/operations/GetLibraryItemsMediaContainer.md new file mode 100644 index 00000000..f4426481 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsMediaContainer.md @@ -0,0 +1,23 @@ +# GetLibraryItemsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 70 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | true | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1701731894 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `title1` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `title2` | *Optional* | :heavy_minus_sign: | N/A | Recently Released | +| `viewGroup` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `viewMode` | *Optional* | :heavy_minus_sign: | N/A | 65592 | +| `mixedParents` | *Optional* | :heavy_minus_sign: | N/A | true | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "58683",
"key": "/library/metadata/58683",
"guid": "plex://movie/5d7768ba96b655001fdc0408",
"studio": "20th Century Studios",
"type": "movie",
"title": "Avatar: The Way of Water",
"contentRating": "PG-13",
"summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.",
"rating": 7.6,
"audienceRating": 9.2,
"year": 2022,
"tagline": "Return to Pandora.",
"thumb": "/library/metadata/58683/thumb/1703239236",
"art": "/library/metadata/58683/art/1703239236",
"duration": 11558112,
"originallyAvailableAt": "2022-12-14T00:00:00Z",
"addedAt": 1680457607,
"updatedAt": 1703239236,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"chapterSource": "media",
"primaryExtraKey": "/library/metadata/58684",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 119534,
"duration": 11558112,
"bitrate": 25025,
"width": 3840,
"height": 2072,
"aspectRatio": 1.85,
"audioChannels": 6,
"audioCodec": "eac3",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"videoProfile": "main 10",
"Part": [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
]
}
],
"Genre": [
{
"tag": "Action"
},
{
"tag": "Adventure"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "James Cameron"
}
],
"Writer": [
{
"tag": "Josh Friedman"
},
{
"tag": "James Cameron"
}
],
"Role": [
{
"tag": "Sam Worthington"
},
{
"tag": "Zoe Saldaña"
},
{
"tag": "Sigourney Weaver"
}
],
"titleSort": "Whale",
"viewCount": 1,
"lastViewedAt": 1682752242,
"originalTitle": "映画 ブラッククローバー 魔法帝の剣",
"viewOffset": 5222500,
"skipCount": 1,
"index": 1,
"theme": "/library/metadata/1/theme/1705636920",
"leafCount": 14,
"viewedLeafCount": 0,
"childCount": 1,
"hasPremiumExtras": "1",
"hasPremiumPrimaryExtra": "1",
"parentRatingKey": "66",
"parentGuid": "plex://show/5d9c081b170e24001f2a7be4",
"parentStudio": "UCP",
"parentKey": "/library/metadata/66",
"parentTitle": "Caprica",
"parentIndex": 1,
"parentYear": 2010,
"parentThumb": "/library/metadata/66/thumb/1705716261",
"parentTheme": "/library/metadata/66/theme/1705716261",
"grandparentRatingKey": "66",
"grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4",
"grandparentKey": "/library/metadata/66",
"grandparentTitle": "Caprica",
"grandparentThumb": "/library/metadata/66/thumb/1705716261",
"grandparentArt": "/library/metadata/66/art/1705716261",
"grandparentTheme": "/library/metadata/66/theme/1705716261"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMetadata.md b/docs/models/operations/GetLibraryItemsMetadata.md new file mode 100644 index 00000000..a8414259 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsMetadata.md @@ -0,0 +1,64 @@ +# GetLibraryItemsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 58683 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/58683 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 | +| `studio` | *Optional* | :heavy_minus_sign: | N/A | 20th Century Studios | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Avatar: The Way of Water | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | +| `rating` | *Optional* | :heavy_minus_sign: | N/A | 7.6 | +| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 9.2 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 2022 | +| `tagline` | *Optional* | :heavy_minus_sign: | N/A | Return to Pandora. | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 11558112 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1680457607 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1703239236 | +| `audienceRatingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `chapterSource` | *Optional* | :heavy_minus_sign: | N/A | media | +| `primaryExtraKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/58684 | +| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `grandparentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 66 | +| `grandparentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `grandparentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `grandparentTitle` | *Optional* | :heavy_minus_sign: | N/A | Caprica | +| `grandparentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `grandparentArt` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | +| `grandparentTheme` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"id": 119534,
"duration": 11558112,
"bitrate": 25025,
"width": 3840,
"height": 2072,
"aspectRatio": 1.85,
"audioChannels": 6,
"audioCodec": "eac3",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"videoProfile": "main 10",
"Part": [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
]
}
] | +| `genre` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsGenre](../../models/operations/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Adventure"
}
] | +| `country` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsCountry](../../models/operations/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | +| `director` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsDirector](../../models/operations/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "James Cameron"
}
] | +| `writer` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsWriter](../../models/operations/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "James Cameron"
}
] | +| `role` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsRole](../../models/operations/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Sigourney Weaver"
}
] | +| `titleSort` | *Optional* | :heavy_minus_sign: | N/A | Whale | +| `viewCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `lastViewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1682752242 | +| `originalTitle` | *Optional* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | +| `viewOffset` | *Optional* | :heavy_minus_sign: | N/A | 5222500 | +| `skipCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `theme` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 14 | +| `viewedLeafCount` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `childCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `hasPremiumExtras` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `hasPremiumPrimaryExtra` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 66 | +| `parentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `parentStudio` | *Optional* | :heavy_minus_sign: | N/A | UCP | +| `parentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `parentTitle` | *Optional* | :heavy_minus_sign: | N/A | Caprica | +| `parentIndex` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentYear` | *Optional* | :heavy_minus_sign: | N/A | 2010 | +| `parentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `parentTheme` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsPart.md b/docs/models/operations/GetLibraryItemsPart.md new file mode 100644 index 00000000..56f6eb56 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsPart.md @@ -0,0 +1,14 @@ +# GetLibraryItemsPart + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 119542 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/119542/1680457526/file.mkv | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 11558112 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 36158371307 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mkv | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | main 10 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsRequest.md b/docs/models/operations/GetLibraryItemsRequest.md new file mode 100644 index 00000000..d0ae59d9 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsRequest.md @@ -0,0 +1,9 @@ +# GetLibraryItemsRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `sectionId` | *long* | :heavy_check_mark: | the Id of the library to query | +| `tag` | [lukehagar.plexapi.plexapi.models.operations.Tag](../../models/operations/Tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsResponse.md b/docs/models/operations/GetLibraryItemsResponse.md new file mode 100644 index 00000000..020831c0 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsResponse.md @@ -0,0 +1,11 @@ +# GetLibraryItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetLibraryItemsResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and tag | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsResponseBody.md b/docs/models/operations/GetLibraryItemsResponseBody.md new file mode 100644 index 00000000..70ea1a88 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsResponseBody.md @@ -0,0 +1,10 @@ +# GetLibraryItemsResponseBody + +The contents of the library by section and tag + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetLibraryItemsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsRole.md b/docs/models/operations/GetLibraryItemsRole.md new file mode 100644 index 00000000..64d3996c --- /dev/null +++ b/docs/models/operations/GetLibraryItemsRole.md @@ -0,0 +1,8 @@ +# GetLibraryItemsRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Sigourney Weaver | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsWriter.md b/docs/models/operations/GetLibraryItemsWriter.md new file mode 100644 index 00000000..0c0e0dcb --- /dev/null +++ b/docs/models/operations/GetLibraryItemsWriter.md @@ -0,0 +1,8 @@ +# GetLibraryItemsWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryLibraryResponseBody.md b/docs/models/operations/GetLibraryLibraryResponseBody.md new file mode 100644 index 00000000..f259a390 --- /dev/null +++ b/docs/models/operations/GetLibraryLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetLibraryLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryErrors](../../models/operations/GetLibraryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryMediaContainer.md b/docs/models/operations/GetLibraryMediaContainer.md new file mode 100644 index 00000000..02a8dded --- /dev/null +++ b/docs/models/operations/GetLibraryMediaContainer.md @@ -0,0 +1,22 @@ +# GetLibraryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 29 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | false | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `content` | *Optional* | :heavy_minus_sign: | N/A | secondary | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1701731894 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `title1` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `viewGroup` | *Optional* | :heavy_minus_sign: | N/A | secondary | +| `viewMode` | *Optional* | :heavy_minus_sign: | N/A | 65592 | +| `directory` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryDirectory](../../models/operations/GetLibraryDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"key": "search?type=1",
"title": "Search...",
"secondary": true,
"prompt": "Search Movies",
"search": true
}
] | +| `type` | List<[lukehagar.plexapi.plexapi.models.operations.GetLibraryType](../../models/operations/GetLibraryType.md)> | :heavy_minus_sign: | N/A | [
{
"key": "/library/sections/1/all?type=1",
"type": "movie",
"title": "Movies",
"active": false,
"Filter": [
{
"filter": "genre",
"filterType": "string",
"key": "/library/sections/1/genre",
"title": "Genre",
"type": "filter"
},
{
"filter": "year",
"filterType": "integer",
"key": "/library/sections/1/year",
"title": "Year",
"type": "filter"
},
{
"filter": "decade",
"filterType": "integer",
"key": "/library/sections/1/decade",
"title": "Decade",
"type": "filter"
},
{
"filter": "contentRating",
"filterType": "string",
"key": "/library/sections/1/contentRating",
"title": "Content Rating",
"type": "filter"
},
{
"filter": "collection",
"filterType": "string",
"key": "/library/sections/1/collection",
"title": "Collection",
"type": "filter"
},
{
"filter": "director",
"filterType": "string",
"key": "/library/sections/1/director",
"title": "Director",
"type": "filter"
},
{
"filter": "actor",
"filterType": "string",
"key": "/library/sections/1/actor",
"title": "Actor",
"type": "filter"
},
{
"filter": "writer",
"filterType": "string",
"key": "/library/sections/1/writer",
"title": "Writer",
"type": "filter"
},
{
"filter": "producer",
"filterType": "string",
"key": "/library/sections/1/producer",
"title": "Producer",
"type": "filter"
},
{
"filter": "country",
"filterType": "string",
"key": "/library/sections/1/country",
"title": "Country",
"type": "filter"
},
{
"filter": "studio",
"filterType": "string",
"key": "/library/sections/1/studio",
"title": "Studio",
"type": "filter"
},
{
"filter": "resolution",
"filterType": "string",
"key": "/library/sections/1/resolution",
"title": "Resolution",
"type": "filter"
},
{
"filter": "hdr",
"filterType": "boolean",
"key": "/library/sections/1/hdr",
"title": "HDR",
"type": "filter"
},
{
"filter": "unwatched",
"filterType": "boolean",
"key": "/library/sections/1/unwatched",
"title": "Unplayed",
"type": "filter"
},
{
"filter": "inProgress",
"filterType": "boolean",
"key": "/library/sections/1/inProgress",
"title": "In Progress",
"type": "filter"
},
{
"filter": "unmatched",
"filterType": "boolean",
"key": "/library/sections/1/unmatched",
"title": "Unmatched",
"type": "filter"
},
{
"filter": "audioLanguage",
"filterType": "string",
"key": "/library/sections/1/audioLanguage",
"title": "Audio Language",
"type": "filter"
},
{
"filter": "subtitleLanguage",
"filterType": "string",
"key": "/library/sections/1/subtitleLanguage",
"title": "Subtitle Language",
"type": "filter"
},
{
"filter": "editionTitle",
"filterType": "string",
"key": "/library/sections/1/editionTitle",
"title": "Edition",
"type": "filter"
},
{
"filter": "label",
"filterType": "string",
"key": "/library/sections/1/label",
"title": "Labels",
"type": "filter"
}
],
"Sort": [
{
"default": "asc",
"defaultDirection": "asc",
"descKey": "titleSort:desc",
"firstCharacterKey": "/library/sections/1/firstCharacter",
"key": "titleSort",
"title": "Title"
},
{
"defaultDirection": "desc",
"descKey": "originallyAvailableAt:desc",
"key": "originallyAvailableAt",
"title": "Release Date"
},
{
"defaultDirection": "desc",
"descKey": "rating:desc",
"key": "rating",
"title": "Critic Rating"
},
{
"defaultDirection": "desc",
"descKey": "audienceRating:desc",
"key": "audienceRating",
"title": "Audience Rating"
},
{
"defaultDirection": "desc",
"descKey": "duration:desc",
"key": "duration",
"title": "Duration"
},
{
"defaultDirection": "desc",
"descKey": "addedAt:desc",
"key": "addedAt",
"title": "Date Added"
},
{
"defaultDirection": "desc",
"descKey": "lastViewedAt:desc",
"key": "lastViewedAt",
"title": "Date Viewed"
},
{
"defaultDirection": "asc",
"descKey": "mediaHeight:desc",
"key": "mediaHeight",
"title": "Resolution"
},
{
"defaultDirection": "desc",
"descKey": "random:desc",
"key": "random",
"title": "Randomly"
}
],
"Field": [
{
"key": "title",
"title": "Title",
"type": "string"
},
{
"key": "studio",
"title": "Studio",
"type": "string"
},
{
"key": "userRating",
"subType": "rating",
"title": "Rating",
"type": "integer"
},
{
"key": "contentRating",
"title": "Content Rating",
"type": "tag"
},
{
"key": "year",
"subType": "year",
"title": "Year",
"type": "integer"
},
{
"key": "decade",
"subType": "decade",
"title": "Decade",
"type": "integer"
},
{
"key": "originallyAvailableAt",
"title": "Release Date",
"type": "date"
},
{
"key": "duration",
"subType": "duration",
"title": "Duration",
"type": "integer"
},
{
"key": "unmatched",
"title": "Unmatched",
"type": "boolean"
},
{
"key": "duplicate",
"title": "Duplicate",
"type": "boolean"
},
{
"key": "genre",
"title": "Genre",
"type": "tag"
},
{
"key": "collection",
"title": "Collection",
"type": "tag"
},
{
"key": "director",
"title": "Director",
"type": "tag"
},
{
"key": "writer",
"title": "Writer",
"type": "tag"
},
{
"key": "producer",
"title": "Producer",
"type": "tag"
},
{
"key": "actor",
"title": "Actor",
"type": "tag"
},
{
"key": "country",
"title": "Country",
"type": "tag"
},
{
"key": "addedAt",
"title": "Date Added",
"type": "date"
},
{
"key": "viewCount",
"title": "Plays",
"type": "integer"
},
{
"key": "lastViewedAt",
"title": "Last Played",
"type": "date"
},
{
"key": "unwatched",
"title": "Unplayed",
"type": "boolean"
},
{
"key": "resolution",
"title": "Resolution",
"type": "resolution"
},
{
"key": "hdr",
"subType": "hdr",
"title": "HDR",
"type": "boolean"
},
{
"key": "mediaSize",
"subType": "fileSize",
"title": "File Size",
"type": "integer"
},
{
"key": "mediaBitrate",
"subType": "bitrate",
"title": "Bitrate",
"type": "integer"
},
{
"key": "subtitleLanguage",
"title": "Subtitle Language",
"type": "subtitleLanguage"
},
{
"key": "audioLanguage",
"title": "Audio Language",
"type": "audioLanguage"
},
{
"key": "inProgress",
"title": "In Progress",
"type": "boolean"
},
{
"key": "trash",
"title": "Trash",
"type": "boolean"
},
{
"key": "editionTitle",
"title": "Edition",
"type": "string"
},
{
"key": "label",
"title": "Label",
"type": "tag"
}
]
}
] | +| `fieldType` | List<[lukehagar.plexapi.plexapi.models.operations.FieldType](../../models/operations/FieldType.md)> | :heavy_minus_sign: | N/A | [
{
"type": "resolution",
"Operator": [
{
"key": "=",
"title": "is"
}
]
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryRequest.md b/docs/models/operations/GetLibraryRequest.md new file mode 100644 index 00000000..7ce65301 --- /dev/null +++ b/docs/models/operations/GetLibraryRequest.md @@ -0,0 +1,9 @@ +# GetLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *double* | :heavy_check_mark: | the Id of the library to query | 1000 | +| `includeDetails` | [Optional](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryResponse.md b/docs/models/operations/GetLibraryResponse.md new file mode 100644 index 00000000..36f19dc9 --- /dev/null +++ b/docs/models/operations/GetLibraryResponse.md @@ -0,0 +1,12 @@ +# GetLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetLibraryResponseBody.md) | :heavy_minus_sign: | The details of the library | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetLibraryLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryResponseBody.md b/docs/models/operations/GetLibraryResponseBody.md new file mode 100644 index 00000000..9b07cc6e --- /dev/null +++ b/docs/models/operations/GetLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetLibraryResponseBody + +The details of the library + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryType.md b/docs/models/operations/GetLibraryType.md new file mode 100644 index 00000000..8b019fd3 --- /dev/null +++ b/docs/models/operations/GetLibraryType.md @@ -0,0 +1,14 @@ +# GetLibraryType + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `active` | *Optional* | :heavy_minus_sign: | N/A | false | +| `filter` | List<[lukehagar.plexapi.plexapi.models.operations.Filter](../../models/operations/Filter.md)> | :heavy_minus_sign: | N/A | [
{
"filter": "label",
"filterType": "string",
"key": "/library/sections/1/label",
"title": "Labels",
"type": "filter"
}
] | +| `sort` | List<[lukehagar.plexapi.plexapi.models.operations.Sort](../../models/operations/Sort.md)> | :heavy_minus_sign: | N/A | [
{
"default": "asc",
"defaultDirection": "desc",
"descKey": "random:desc",
"firstCharacterKey": "/library/sections/1/firstCharacter",
"key": "random",
"title": "Randomly"
}
] | +| `field` | List<[lukehagar.plexapi.plexapi.models.operations.Field](../../models/operations/Field.md)> | :heavy_minus_sign: | N/A | [
{
"key": "label",
"title": "Label",
"type": "tag",
"subType": "bitrate"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenDirectory.md b/docs/models/operations/GetMetadataChildrenDirectory.md new file mode 100644 index 00000000..b3a6018e --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenDirectory.md @@ -0,0 +1,12 @@ +# GetMetadataChildrenDirectory + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 16 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | +| `viewedLeafCount` | *Optional* | :heavy_minus_sign: | N/A | 16 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/allLeaves | +| `title` | *Optional* | :heavy_minus_sign: | N/A | All episodes | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenErrors.md b/docs/models/operations/GetMetadataChildrenErrors.md new file mode 100644 index 00000000..da08eb98 --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenErrors.md @@ -0,0 +1,10 @@ +# GetMetadataChildrenErrors + + +## 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/operations/GetMetadataChildrenLibraryResponseBody.md b/docs/models/operations/GetMetadataChildrenLibraryResponseBody.md new file mode 100644 index 00000000..d8721038 --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetMetadataChildrenLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenErrors](../../models/operations/GetMetadataChildrenErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenMediaContainer.md b/docs/models/operations/GetMetadataChildrenMediaContainer.md new file mode 100644 index 00000000..5fc691c7 --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenMediaContainer.md @@ -0,0 +1,30 @@ +# GetMetadataChildrenMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 3 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | true | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `key` | *Optional* | :heavy_minus_sign: | N/A | 30072 | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | TV Shows | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1701731894 | +| `nocache` | *Optional* | :heavy_minus_sign: | N/A | true | +| `parentIndex` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentTitle` | *Optional* | :heavy_minus_sign: | N/A | Reacher | +| `parentYear` | *Optional* | :heavy_minus_sign: | N/A | 2022 | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia. | +| `theme` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | +| `title1` | *Optional* | :heavy_minus_sign: | N/A | TV Shows | +| `title2` | *Optional* | :heavy_minus_sign: | N/A | Reacher | +| `viewGroup` | *Optional* | :heavy_minus_sign: | N/A | season | +| `viewMode` | *Optional* | :heavy_minus_sign: | N/A | 65593 | +| `directory` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenDirectory](../../models/operations/GetMetadataChildrenDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"leafCount": 16,
"thumb": "/library/metadata/30072/thumb/1705739923",
"viewedLeafCount": 16,
"key": "/library/metadata/30072/allLeaves",
"title": "All episodes"
}
] | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenMetadata](../../models/operations/GetMetadataChildrenMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "66488",
"key": "/library/metadata/66488/children",
"parentRatingKey": "30072",
"guid": "plex://season/652aea6549508477c34c6000",
"parentGuid": "plex://show/5d9c09190aaccd001f8f42f0",
"parentStudio": "Amazon Studios",
"type": "season",
"title": "Season 2",
"parentKey": "/library/metadata/30072",
"parentTitle": "Reacher",
"summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.",
"index": 2,
"parentIndex": 1,
"viewCount": 11,
"lastViewedAt": 1705646565,
"parentYear": 2022,
"thumb": "/library/metadata/66488/thumb/1703065033",
"art": "/library/metadata/30072/art/1705739923",
"parentThumb": "/library/metadata/30072/thumb/1705739923",
"parentTheme": "/library/metadata/30072/theme/1705739923",
"leafCount": 8,
"viewedLeafCount": 8,
"addedAt": 1702602021,
"updatedAt": 1703065033,
"userRating": 9,
"skipCount": 1,
"lastRatedAt": 1703881224
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenMetadata.md b/docs/models/operations/GetMetadataChildrenMetadata.md new file mode 100644 index 00000000..70f0c8b3 --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenMetadata.md @@ -0,0 +1,34 @@ +# GetMetadataChildrenMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 66488 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66488/children | +| `parentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 30072 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://season/652aea6549508477c34c6000 | +| `parentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://show/5d9c09190aaccd001f8f42f0 | +| `parentStudio` | *Optional* | :heavy_minus_sign: | N/A | Amazon Studios | +| `type` | *Optional* | :heavy_minus_sign: | N/A | season | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Season 2 | +| `parentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072 | +| `parentTitle` | *Optional* | :heavy_minus_sign: | N/A | Reacher | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Based on"Bad Luck and Trouble," when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge. | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `parentIndex` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `viewCount` | *Optional* | :heavy_minus_sign: | N/A | 11 | +| `lastViewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705646565 | +| `parentYear` | *Optional* | :heavy_minus_sign: | N/A | 2022 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/66488/thumb/1703065033 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | +| `parentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | +| `parentTheme` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 8 | +| `viewedLeafCount` | *Optional* | :heavy_minus_sign: | N/A | 8 | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1702602021 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1703065033 | +| `userRating` | *Optional* | :heavy_minus_sign: | N/A | 9 | +| `skipCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `lastRatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1703881224 | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenRequest.md b/docs/models/operations/GetMetadataChildrenRequest.md new file mode 100644 index 00000000..3b81cc61 --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenRequest.md @@ -0,0 +1,8 @@ +# GetMetadataChildrenRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ratingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenResponse.md b/docs/models/operations/GetMetadataChildrenResponse.md new file mode 100644 index 00000000..3dfbdd21 --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenResponse.md @@ -0,0 +1,12 @@ +# GetMetadataChildrenResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetMetadataChildrenResponseBody.md) | :heavy_minus_sign: | The children of the library item. | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetMetadataChildrenLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenResponseBody.md b/docs/models/operations/GetMetadataChildrenResponseBody.md new file mode 100644 index 00000000..ea395dec --- /dev/null +++ b/docs/models/operations/GetMetadataChildrenResponseBody.md @@ -0,0 +1,10 @@ +# GetMetadataChildrenResponseBody + +The children of the library item. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetMetadataChildrenMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataCountry.md b/docs/models/operations/GetMetadataCountry.md new file mode 100644 index 00000000..6a84f0d1 --- /dev/null +++ b/docs/models/operations/GetMetadataCountry.md @@ -0,0 +1,10 @@ +# GetMetadataCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 116 | +| `filter` | *Optional* | :heavy_minus_sign: | N/A | country=116 | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataDirector.md b/docs/models/operations/GetMetadataDirector.md new file mode 100644 index 00000000..17b1b73f --- /dev/null +++ b/docs/models/operations/GetMetadataDirector.md @@ -0,0 +1,12 @@ +# GetMetadataDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 130 | +| `filter` | *Optional* | :heavy_minus_sign: | N/A | director=130 | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Joss Whedon | +| `tagKey` | *Optional* | :heavy_minus_sign: | N/A | 5d776828880197001ec90e8f | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataErrors.md b/docs/models/operations/GetMetadataErrors.md new file mode 100644 index 00000000..2fb701a8 --- /dev/null +++ b/docs/models/operations/GetMetadataErrors.md @@ -0,0 +1,10 @@ +# GetMetadataErrors + + +## 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/operations/GetMetadataGenre.md b/docs/models/operations/GetMetadataGenre.md new file mode 100644 index 00000000..268198d1 --- /dev/null +++ b/docs/models/operations/GetMetadataGenre.md @@ -0,0 +1,10 @@ +# GetMetadataGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 184 | +| `filter` | *Optional* | :heavy_minus_sign: | N/A | genre=184 | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Thriller | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataLibraryResponseBody.md b/docs/models/operations/GetMetadataLibraryResponseBody.md new file mode 100644 index 00000000..98f22aa5 --- /dev/null +++ b/docs/models/operations/GetMetadataLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetMetadataLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataErrors](../../models/operations/GetMetadataErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataMedia.md b/docs/models/operations/GetMetadataMedia.md new file mode 100644 index 00000000..2ff958eb --- /dev/null +++ b/docs/models/operations/GetMetadataMedia.md @@ -0,0 +1,24 @@ +# GetMetadataMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 15 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141417 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 2278 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 814 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataPart](../../models/operations/GetMetadataPart.md)> | :heavy_minus_sign: | N/A | [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataMediaContainer.md b/docs/models/operations/GetMetadataMediaContainer.md new file mode 100644 index 00000000..3ac1bfa1 --- /dev/null +++ b/docs/models/operations/GetMetadataMediaContainer.md @@ -0,0 +1,16 @@ +# GetMetadataMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | true | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | cfc899d7-3000-46f6-8489-b9592714ada5 | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1698860922 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataMetadata](../../models/operations/GetMetadataMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "17",
"key": "/library/metadata/17",
"guid": "plex://movie/5d77683f6f4521001ea9dc53",
"studio": "Universal Pictures",
"type": "movie",
"title": "Serenity",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG-13",
"summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.",
"rating": 8.2,
"audienceRating": 9.1,
"year": 2005,
"tagline": "They aim to misbehave.",
"thumb": "/library/metadata/17/thumb/1705637165",
"art": "/library/metadata/17/art/1705637165",
"duration": 141417,
"originallyAvailableAt": "2005-09-29T00:00:00Z",
"addedAt": 1705637164,
"updatedAt": 1705637165,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"hasPremiumPrimaryExtra": "1",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 15,
"duration": 141417,
"bitrate": 2278,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
]
}
],
"Genre": [
{
"id": 5,
"filter": "genre=5",
"tag": "Science Fiction"
}
],
"Country": [
{
"id": 116,
"filter": "country=116",
"tag": "United States of America"
}
],
"Guid": [
{
"id": "imdb://tt0379786"
}
],
"Rating": [
{
"image": "imdb://image.rating",
"value": 7.8,
"type": "audience"
}
],
"Director": [
{
"id": 130,
"filter": "director=130",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
],
"Writer": [
{
"id": 132,
"filter": "writer=132",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
],
"Role": [
{
"id": 8,
"filter": "actor=8",
"tag": "Nathan Fillion",
"tagKey": "5d7768286f4521001ea9945c",
"role": "Malcolm \"Mal\" Reynolds",
"thumb": "https://metadata-static.plex.tv/4/people/4a2890ca346eb832500b1ed0add89d5e.jpg"
}
],
"Producer": [
{
"id": 221,
"filter": "producer=221",
"tag": "Barry Mendel",
"tagKey": "5d776826961905001eb90e2b",
"thumb": "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg"
}
]
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataMetadata.md b/docs/models/operations/GetMetadataMetadata.md new file mode 100644 index 00000000..8f75b12c --- /dev/null +++ b/docs/models/operations/GetMetadataMetadata.md @@ -0,0 +1,40 @@ +# GetMetadataMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 17 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/17 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | +| `studio` | *Optional* | :heavy_minus_sign: | N/A | Universal Pictures | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Serenity | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | +| `rating` | *Optional* | :heavy_minus_sign: | N/A | 8.2 | +| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 9.1 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 2005 | +| `tagline` | *Optional* | :heavy_minus_sign: | N/A | They aim to misbehave. | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141417 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705637164 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705637165 | +| `audienceRatingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `hasPremiumPrimaryExtra` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataMedia](../../models/operations/GetMetadataMedia.md)> | :heavy_minus_sign: | N/A | [
{
"id": 15,
"duration": 141417,
"bitrate": 2278,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
]
}
] | +| `genre` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataGenre](../../models/operations/GetMetadataGenre.md)> | :heavy_minus_sign: | N/A | [
{
"id": 184,
"filter": "genre=184",
"tag": "Thriller"
}
] | +| `country` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataCountry](../../models/operations/GetMetadataCountry.md)> | :heavy_minus_sign: | N/A | [
{
"id": 116,
"filter": "country=116",
"tag": "United States of America"
}
] | +| `guids` | List<[lukehagar.plexapi.plexapi.models.operations.Guids](../../models/operations/Guids.md)> | :heavy_minus_sign: | N/A | [
{
"id": "tvdb://2337"
}
] | +| `ratings` | List<[lukehagar.plexapi.plexapi.models.operations.Ratings](../../models/operations/Ratings.md)> | :heavy_minus_sign: | N/A | [
{
"image": "themoviedb://image.rating",
"value": 7.4,
"type": "audience"
}
] | +| `director` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataDirector](../../models/operations/GetMetadataDirector.md)> | :heavy_minus_sign: | N/A | [
{
"id": 130,
"filter": "director=130",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
] | +| `writer` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataWriter](../../models/operations/GetMetadataWriter.md)> | :heavy_minus_sign: | N/A | [
{
"id": 132,
"filter": "writer=132",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
] | +| `role` | List<[lukehagar.plexapi.plexapi.models.operations.GetMetadataRole](../../models/operations/GetMetadataRole.md)> | :heavy_minus_sign: | N/A | [
{
"id": 220,
"filter": "actor=220",
"tag": "Dennis Keiffer",
"tagKey": "5d77683554f42c001f8c4708",
"role": "Bar Guy (uncredited)",
"thumb": "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg"
}
] | +| `producer` | List<[lukehagar.plexapi.plexapi.models.operations.Producer](../../models/operations/Producer.md)> | :heavy_minus_sign: | N/A | [
{
"id": 221,
"filter": "producer=221",
"tag": "Barry Mendel",
"tagKey": "5d776826961905001eb90e2b",
"thumb": "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataPart.md b/docs/models/operations/GetMetadataPart.md new file mode 100644 index 00000000..b7f02f48 --- /dev/null +++ b/docs/models/operations/GetMetadataPart.md @@ -0,0 +1,18 @@ +# GetMetadataPart + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 15 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141417 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 40271948 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | +| `stream` | List<[lukehagar.plexapi.plexapi.models.operations.Stream](../../models/operations/Stream.md)> | :heavy_minus_sign: | N/A | [
{
"id": 29,
"streamType": 2,
"default": true,
"codec": "aac",
"index": 0,
"bitrate": 128,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "lc",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "1",
"width": 1920,
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)",
"selected": true,
"channels": 2,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"samplingRate": 44100
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataRequest.md b/docs/models/operations/GetMetadataRequest.md new file mode 100644 index 00000000..483bb2db --- /dev/null +++ b/docs/models/operations/GetMetadataRequest.md @@ -0,0 +1,8 @@ +# GetMetadataRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ratingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataResponse.md b/docs/models/operations/GetMetadataResponse.md new file mode 100644 index 00000000..3e9fedbc --- /dev/null +++ b/docs/models/operations/GetMetadataResponse.md @@ -0,0 +1,12 @@ +# GetMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetMetadataResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetMetadataLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataResponseBody.md b/docs/models/operations/GetMetadataResponseBody.md new file mode 100644 index 00000000..e8f04321 --- /dev/null +++ b/docs/models/operations/GetMetadataResponseBody.md @@ -0,0 +1,10 @@ +# GetMetadataResponseBody + +The metadata of the library item. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetMetadataMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataRole.md b/docs/models/operations/GetMetadataRole.md new file mode 100644 index 00000000..b8ae14bb --- /dev/null +++ b/docs/models/operations/GetMetadataRole.md @@ -0,0 +1,13 @@ +# GetMetadataRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 220 | +| `filter` | *Optional* | :heavy_minus_sign: | N/A | actor=220 | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Dennis Keiffer | +| `tagKey` | *Optional* | :heavy_minus_sign: | N/A | 5d77683554f42c001f8c4708 | +| `role` | *Optional* | :heavy_minus_sign: | N/A | Bar Guy (uncredited) | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataWriter.md b/docs/models/operations/GetMetadataWriter.md new file mode 100644 index 00000000..3a2002e1 --- /dev/null +++ b/docs/models/operations/GetMetadataWriter.md @@ -0,0 +1,12 @@ +# GetMetadataWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 132 | +| `filter` | *Optional* | :heavy_minus_sign: | N/A | writer=132 | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Joss Whedon | +| `tagKey` | *Optional* | :heavy_minus_sign: | N/A | 5d776828880197001ec90e8f | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetMyPlexAccountErrors.md b/docs/models/operations/GetMyPlexAccountErrors.md new file mode 100644 index 00000000..fc56a31a --- /dev/null +++ b/docs/models/operations/GetMyPlexAccountErrors.md @@ -0,0 +1,10 @@ +# GetMyPlexAccountErrors + + +## 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/operations/GetMyPlexAccountResponse.md b/docs/models/operations/GetMyPlexAccountResponse.md new file mode 100644 index 00000000..a680ff8a --- /dev/null +++ b/docs/models/operations/GetMyPlexAccountResponse.md @@ -0,0 +1,12 @@ +# GetMyPlexAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetMyPlexAccountResponseBody.md) | :heavy_minus_sign: | MyPlex Account | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetMyPlexAccountServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetMyPlexAccountResponseBody.md b/docs/models/operations/GetMyPlexAccountResponseBody.md new file mode 100644 index 00000000..023f33f2 --- /dev/null +++ b/docs/models/operations/GetMyPlexAccountResponseBody.md @@ -0,0 +1,10 @@ +# GetMyPlexAccountResponseBody + +MyPlex Account + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `myPlex` | [Optional](../../models/operations/MyPlex.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMyPlexAccountServerResponseBody.md b/docs/models/operations/GetMyPlexAccountServerResponseBody.md new file mode 100644 index 00000000..ee33bc29 --- /dev/null +++ b/docs/models/operations/GetMyPlexAccountServerResponseBody.md @@ -0,0 +1,10 @@ +# GetMyPlexAccountServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountErrors](../../models/operations/GetMyPlexAccountErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckErrors.md b/docs/models/operations/GetOnDeckErrors.md new file mode 100644 index 00000000..bca5321d --- /dev/null +++ b/docs/models/operations/GetOnDeckErrors.md @@ -0,0 +1,10 @@ +# GetOnDeckErrors + + +## 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/operations/GetOnDeckGuids.md b/docs/models/operations/GetOnDeckGuids.md new file mode 100644 index 00000000..71aca887 --- /dev/null +++ b/docs/models/operations/GetOnDeckGuids.md @@ -0,0 +1,8 @@ +# GetOnDeckGuids + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | imdb://tt13303712 | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckLibraryResponseBody.md b/docs/models/operations/GetOnDeckLibraryResponseBody.md new file mode 100644 index 00000000..38fbc488 --- /dev/null +++ b/docs/models/operations/GetOnDeckLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetOnDeckLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetOnDeckErrors](../../models/operations/GetOnDeckErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckMedia.md b/docs/models/operations/GetOnDeckMedia.md new file mode 100644 index 00000000..6dba1998 --- /dev/null +++ b/docs/models/operations/GetOnDeckMedia.md @@ -0,0 +1,22 @@ +# GetOnDeckMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 80994 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 420080 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 1046 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 1.78 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | hevc | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mkv | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | PAL | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | main | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.GetOnDeckPart](../../models/operations/GetOnDeckPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckMediaContainer.md b/docs/models/operations/GetOnDeckMediaContainer.md new file mode 100644 index 00000000..f5f0a610 --- /dev/null +++ b/docs/models/operations/GetOnDeckMediaContainer.md @@ -0,0 +1,14 @@ +# GetOnDeckMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 16 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1680021154 | +| `mixedParents` | *Optional* | :heavy_minus_sign: | N/A | | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetOnDeckMetadata](../../models/operations/GetOnDeckMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckMetadata.md b/docs/models/operations/GetOnDeckMetadata.md new file mode 100644 index 00000000..83bcccbc --- /dev/null +++ b/docs/models/operations/GetOnDeckMetadata.md @@ -0,0 +1,43 @@ +# GetOnDeckMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | TV Shows | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 49564 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49564 | +| `parentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 49557 | +| `grandparentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 49556 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://episode/5ea7d7402e7ab10042e74d4f | +| `parentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://season/602e754d67f4c8002ce54b3d | +| `grandparentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://show/5d9c090e705e7a001e6e94d8 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | episode | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Circus | +| `grandparentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49556 | +| `parentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49557 | +| `librarySectionKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/2 | +| `grandparentTitle` | *Optional* | :heavy_minus_sign: | N/A | Bluey (2018) | +| `parentTitle` | *Optional* | :heavy_minus_sign: | N/A | Season 2 | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | TV-Y | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy. | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 33 | +| `parentIndex` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `lastViewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1681908352 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 2018 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49564/thumb/1654258204 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49556/art/1680939546 | +| `parentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49557/thumb/1654258204 | +| `grandparentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49556/thumb/1680939546 | +| `grandparentArt` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49556/art/1680939546 | +| `grandparentTheme` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/49556/theme/1680939546 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 420080 | +| `originallyAvailableAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 2020-10-31 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1654258196 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1654258204 | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.GetOnDeckMedia](../../models/operations/GetOnDeckMedia.md)> | :heavy_minus_sign: | N/A | | +| `guids` | List<[lukehagar.plexapi.plexapi.models.operations.GetOnDeckGuids](../../models/operations/GetOnDeckGuids.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckPart.md b/docs/models/operations/GetOnDeckPart.md new file mode 100644 index 00000000..0b06a86c --- /dev/null +++ b/docs/models/operations/GetOnDeckPart.md @@ -0,0 +1,16 @@ +# GetOnDeckPart + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 80994 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/80994/1655007810/file.mkv | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 420080 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 55148931 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mkv | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | main | +| `stream` | List<[lukehagar.plexapi.plexapi.models.operations.GetOnDeckStream](../../models/operations/GetOnDeckStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckResponse.md b/docs/models/operations/GetOnDeckResponse.md new file mode 100644 index 00000000..df9df3b4 --- /dev/null +++ b/docs/models/operations/GetOnDeckResponse.md @@ -0,0 +1,12 @@ +# GetOnDeckResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetOnDeckResponseBody.md) | :heavy_minus_sign: | The on Deck content | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetOnDeckLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckResponseBody.md b/docs/models/operations/GetOnDeckResponseBody.md new file mode 100644 index 00000000..1aabbc03 --- /dev/null +++ b/docs/models/operations/GetOnDeckResponseBody.md @@ -0,0 +1,10 @@ +# GetOnDeckResponseBody + +The on Deck content + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetOnDeckMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetOnDeckStream.md b/docs/models/operations/GetOnDeckStream.md new file mode 100644 index 00000000..38d4cdeb --- /dev/null +++ b/docs/models/operations/GetOnDeckStream.md @@ -0,0 +1,30 @@ +# GetOnDeckStream + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 211234 | +| `streamType` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `default_` | *Optional* | :heavy_minus_sign: | N/A | | +| `codec` | *Optional* | :heavy_minus_sign: | N/A | hevc | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 918 | +| `language` | *Optional* | :heavy_minus_sign: | N/A | English | +| `languageTag` | *Optional* | :heavy_minus_sign: | N/A | en | +| `languageCode` | *Optional* | :heavy_minus_sign: | N/A | eng | +| `bitDepth` | *Optional* | :heavy_minus_sign: | N/A | 8 | +| `chromaLocation` | *Optional* | :heavy_minus_sign: | N/A | left | +| `chromaSubsampling` | *Optional* | :heavy_minus_sign: | N/A | 4:2:0 | +| `codedHeight` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `codedWidth` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `colorRange` | *Optional* | :heavy_minus_sign: | N/A | tv | +| `frameRate` | *Optional* | :heavy_minus_sign: | N/A | 25 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `level` | *Optional* | :heavy_minus_sign: | N/A | 120 | +| `profile` | *Optional* | :heavy_minus_sign: | N/A | main | +| `refFrames` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `displayTitle` | *Optional* | :heavy_minus_sign: | N/A | 1080p (HEVC Main) | +| `extendedDisplayTitle` | *Optional* | :heavy_minus_sign: | N/A | 1080p (HEVC Main) | \ No newline at end of file diff --git a/docs/models/operations/GetPinErrors.md b/docs/models/operations/GetPinErrors.md new file mode 100644 index 00000000..fe709c81 --- /dev/null +++ b/docs/models/operations/GetPinErrors.md @@ -0,0 +1,10 @@ +# GetPinErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/operations/GetPinPlexResponseBody.md b/docs/models/operations/GetPinPlexResponseBody.md new file mode 100644 index 00000000..351c8cee --- /dev/null +++ b/docs/models/operations/GetPinPlexResponseBody.md @@ -0,0 +1,10 @@ +# GetPinPlexResponseBody + +X-Plex-Client-Identifier is missing + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetPinErrors](../../models/operations/GetPinErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPinRequest.md b/docs/models/operations/GetPinRequest.md new file mode 100644 index 00000000..3d0d2c81 --- /dev/null +++ b/docs/models/operations/GetPinRequest.md @@ -0,0 +1,9 @@ +# GetPinRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `strong` | *Optional* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| +| `xPlexClientIdentifier` | *String* | :heavy_check_mark: | 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)
| \ No newline at end of file diff --git a/docs/models/operations/GetPinResponse.md b/docs/models/operations/GetPinResponse.md new file mode 100644 index 00000000..706e465e --- /dev/null +++ b/docs/models/operations/GetPinResponse.md @@ -0,0 +1,12 @@ +# GetPinResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetPinResponseBody.md) | :heavy_minus_sign: | The Pin | +| `fourHundredApplicationJsonObject` | [Optional](../../models/operations/GetPinPlexResponseBody.md) | :heavy_minus_sign: | X-Plex-Client-Identifier is missing | \ No newline at end of file diff --git a/docs/models/operations/GetPinResponseBody.md b/docs/models/operations/GetPinResponseBody.md new file mode 100644 index 00000000..c7a40126 --- /dev/null +++ b/docs/models/operations/GetPinResponseBody.md @@ -0,0 +1,21 @@ +# GetPinResponseBody + +The Pin + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t | +| `product` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | +| `trusted` | *Optional* | :heavy_minus_sign: | N/A | | +| `qr` | *Optional* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv
The QR code redirects to the relevant `plex.tv/link` authentication page
Which then prompts the user for the 4 Digit Link Pin
| https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t | +| `clientIdentifier` | *Optional* | :heavy_minus_sign: | N/A | Postman | +| `location` | [Optional](../../models/operations/Location.md) | :heavy_minus_sign: | N/A | | +| `expiresIn` | *Optional* | :heavy_minus_sign: | N/A | 1800 | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC | +| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC | +| `authToken` | *Optional* | :heavy_minus_sign: | N/A | | +| `newRegistration` | *Optional* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsCountry.md b/docs/models/operations/GetPlaylistContentsCountry.md new file mode 100644 index 00000000..52e56464 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsCountry.md @@ -0,0 +1,8 @@ +# GetPlaylistContentsCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsDirector.md b/docs/models/operations/GetPlaylistContentsDirector.md new file mode 100644 index 00000000..f80a395c --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsDirector.md @@ -0,0 +1,8 @@ +# GetPlaylistContentsDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Joss Whedon | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsErrors.md b/docs/models/operations/GetPlaylistContentsErrors.md new file mode 100644 index 00000000..7f62a042 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsErrors.md @@ -0,0 +1,10 @@ +# GetPlaylistContentsErrors + + +## 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/operations/GetPlaylistContentsGenre.md b/docs/models/operations/GetPlaylistContentsGenre.md new file mode 100644 index 00000000..63bf437c --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsGenre.md @@ -0,0 +1,8 @@ +# GetPlaylistContentsGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Action | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsMedia.md b/docs/models/operations/GetPlaylistContentsMedia.md new file mode 100644 index 00000000..ca1b0b57 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsMedia.md @@ -0,0 +1,24 @@ +# GetPlaylistContentsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 15 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141416 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 2273 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 814 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsPart](../../models/operations/GetPlaylistContentsPart.md)> | :heavy_minus_sign: | N/A | [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsMediaContainer.md b/docs/models/operations/GetPlaylistContentsMediaContainer.md new file mode 100644 index 00000000..ef50ecf2 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsMediaContainer.md @@ -0,0 +1,16 @@ +# GetPlaylistContentsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `composite` | *Optional* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717521 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 282 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `playlistType` | *Optional* | :heavy_minus_sign: | N/A | video | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 95 | +| `smart` | *Optional* | :heavy_minus_sign: | N/A | true | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Smart Movie Playlist | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsMetadata](../../models/operations/GetPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "17",
"key": "/library/metadata/17",
"guid": "plex://movie/5d77683f6f4521001ea9dc53",
"studio": "Universal Pictures",
"type": "movie",
"title": "Serenity",
"titleSort": "Amazing Spider-Man 2",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG-13",
"summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.",
"rating": 8.2,
"audienceRating": 9.1,
"year": 2005,
"tagline": "They aim to misbehave.",
"thumb": "/library/metadata/17/thumb/1705637165",
"art": "/library/metadata/17/art/1705637165",
"duration": 141416,
"originallyAvailableAt": "2005-09-29T00:00:00Z",
"addedAt": 1705637164,
"updatedAt": 1705637165,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"hasPremiumExtras": "1",
"hasPremiumPrimaryExtra": "1",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 15,
"duration": 141416,
"bitrate": 2273,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Science Fiction"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Joss Whedon"
}
],
"Writer": [
{
"tag": "Joss Whedon"
}
],
"Role": [
{
"tag": "Nathan Fillion"
}
]
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsMetadata.md b/docs/models/operations/GetPlaylistContentsMetadata.md new file mode 100644 index 00000000..b2a01c7a --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsMetadata.md @@ -0,0 +1,39 @@ +# GetPlaylistContentsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 17 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/17 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | +| `studio` | *Optional* | :heavy_minus_sign: | N/A | Universal Pictures | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Serenity | +| `titleSort` | *Optional* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | +| `rating` | *Optional* | :heavy_minus_sign: | N/A | 8.2 | +| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 9.1 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 2005 | +| `tagline` | *Optional* | :heavy_minus_sign: | N/A | They aim to misbehave. | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141416 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705637164 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705637165 | +| `audienceRatingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `hasPremiumExtras` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `hasPremiumPrimaryExtra` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsMedia](../../models/operations/GetPlaylistContentsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"id": 15,
"duration": 141416,
"bitrate": 2273,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
] | +| `genre` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsGenre](../../models/operations/GetPlaylistContentsGenre.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Action"
}
] | +| `country` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsCountry](../../models/operations/GetPlaylistContentsCountry.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | +| `director` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsDirector](../../models/operations/GetPlaylistContentsDirector.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Joss Whedon"
}
] | +| `writer` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsWriter](../../models/operations/GetPlaylistContentsWriter.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Joss Whedon"
}
] | +| `role` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRole](../../models/operations/GetPlaylistContentsRole.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Gina Torres"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsPart.md b/docs/models/operations/GetPlaylistContentsPart.md new file mode 100644 index 00000000..343c4586 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsPart.md @@ -0,0 +1,17 @@ +# GetPlaylistContentsPart + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 15 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141416 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 40271948 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsPlaylistsResponseBody.md b/docs/models/operations/GetPlaylistContentsPlaylistsResponseBody.md new file mode 100644 index 00000000..e0e8f4a7 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsPlaylistsResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistContentsPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsErrors](../../models/operations/GetPlaylistContentsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsRequest.md b/docs/models/operations/GetPlaylistContentsRequest.md new file mode 100644 index 00000000..67cd6c60 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsRequest.md @@ -0,0 +1,9 @@ +# GetPlaylistContentsRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | +| `type` | *double* | :heavy_check_mark: | the metadata type of the item to return | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsResponse.md b/docs/models/operations/GetPlaylistContentsResponse.md new file mode 100644 index 00000000..ae612d09 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsResponse.md @@ -0,0 +1,12 @@ +# GetPlaylistContentsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetPlaylistContentsResponseBody.md) | :heavy_minus_sign: | The playlist contents | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetPlaylistContentsPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsResponseBody.md b/docs/models/operations/GetPlaylistContentsResponseBody.md new file mode 100644 index 00000000..adde711d --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistContentsResponseBody + +The playlist contents + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetPlaylistContentsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsRole.md b/docs/models/operations/GetPlaylistContentsRole.md new file mode 100644 index 00000000..d0b68239 --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsRole.md @@ -0,0 +1,8 @@ +# GetPlaylistContentsRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Gina Torres | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsWriter.md b/docs/models/operations/GetPlaylistContentsWriter.md new file mode 100644 index 00000000..4a7413fe --- /dev/null +++ b/docs/models/operations/GetPlaylistContentsWriter.md @@ -0,0 +1,8 @@ +# GetPlaylistContentsWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Joss Whedon | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistErrors.md b/docs/models/operations/GetPlaylistErrors.md new file mode 100644 index 00000000..1b861143 --- /dev/null +++ b/docs/models/operations/GetPlaylistErrors.md @@ -0,0 +1,10 @@ +# GetPlaylistErrors + + +## 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/operations/GetPlaylistMediaContainer.md b/docs/models/operations/GetPlaylistMediaContainer.md new file mode 100644 index 00000000..ce867114 --- /dev/null +++ b/docs/models/operations/GetPlaylistMediaContainer.md @@ -0,0 +1,9 @@ +# GetPlaylistMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistMetadata](../../models/operations/GetPlaylistMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1",
"ratingKey": "95",
"key": "/playlists/95/items",
"guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91",
"type": "playlist",
"title": "Smart Movie Playlist",
"summary": "",
"smart": true,
"playlistType": "video",
"composite": "/playlists/95/composite/1705717387",
"icon": "playlist://image.smart",
"duration": 282000,
"leafCount": 2,
"addedAt": 1705716493,
"updatedAt": 1705717387
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistMetadata.md b/docs/models/operations/GetPlaylistMetadata.md new file mode 100644 index 00000000..9b0db275 --- /dev/null +++ b/docs/models/operations/GetPlaylistMetadata.md @@ -0,0 +1,22 @@ +# GetPlaylistMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `content` | *Optional* | :heavy_minus_sign: | N/A | library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1 | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 95 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /playlists/95/items | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | playlist | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Smart Movie Playlist | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | | +| `smart` | *Optional* | :heavy_minus_sign: | N/A | true | +| `playlistType` | *Optional* | :heavy_minus_sign: | N/A | video | +| `composite` | *Optional* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717387 | +| `icon` | *Optional* | :heavy_minus_sign: | N/A | playlist://image.smart | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 282000 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705716493 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705717387 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistPlaylistsResponseBody.md b/docs/models/operations/GetPlaylistPlaylistsResponseBody.md new file mode 100644 index 00000000..c5e052d4 --- /dev/null +++ b/docs/models/operations/GetPlaylistPlaylistsResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistErrors](../../models/operations/GetPlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistRequest.md b/docs/models/operations/GetPlaylistRequest.md new file mode 100644 index 00000000..93aa49c2 --- /dev/null +++ b/docs/models/operations/GetPlaylistRequest.md @@ -0,0 +1,8 @@ +# GetPlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistResponse.md b/docs/models/operations/GetPlaylistResponse.md new file mode 100644 index 00000000..87066de6 --- /dev/null +++ b/docs/models/operations/GetPlaylistResponse.md @@ -0,0 +1,12 @@ +# GetPlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetPlaylistResponseBody.md) | :heavy_minus_sign: | The playlist | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetPlaylistPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistResponseBody.md b/docs/models/operations/GetPlaylistResponseBody.md new file mode 100644 index 00000000..282a63b4 --- /dev/null +++ b/docs/models/operations/GetPlaylistResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistResponseBody + +The playlist + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetPlaylistMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsErrors.md b/docs/models/operations/GetPlaylistsErrors.md new file mode 100644 index 00000000..cf446974 --- /dev/null +++ b/docs/models/operations/GetPlaylistsErrors.md @@ -0,0 +1,10 @@ +# GetPlaylistsErrors + + +## 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/operations/GetPlaylistsMediaContainer.md b/docs/models/operations/GetPlaylistsMediaContainer.md new file mode 100644 index 00000000..99cc92d5 --- /dev/null +++ b/docs/models/operations/GetPlaylistsMediaContainer.md @@ -0,0 +1,9 @@ +# GetPlaylistsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 4 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistsMetadata](../../models/operations/GetPlaylistsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "92",
"key": "/playlists/92/items",
"guid": "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903",
"type": "playlist",
"title": "Static Playlist",
"summary": "A Great Playlist",
"smart": false,
"playlistType": "video",
"composite": "/playlists/92/composite/1705716440",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705716298,
"duration": 7328000,
"leafCount": 32,
"addedAt": 1705716298,
"updatedAt": 1705716440
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsMetadata.md b/docs/models/operations/GetPlaylistsMetadata.md new file mode 100644 index 00000000..9e65e494 --- /dev/null +++ b/docs/models/operations/GetPlaylistsMetadata.md @@ -0,0 +1,23 @@ +# GetPlaylistsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 92 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /playlists/92/items | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | playlist | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Static Playlist | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | A Great Playlist | +| `smart` | *Optional* | :heavy_minus_sign: | N/A | false | +| `playlistType` | *Optional* | :heavy_minus_sign: | N/A | video | +| `composite` | *Optional* | :heavy_minus_sign: | N/A | /playlists/92/composite/1705716440 | +| `icon` | *Optional* | :heavy_minus_sign: | N/A | playlist://image.smart | +| `viewCount` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `lastViewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705716298 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7328000 | +| `leafCount` | *Optional* | :heavy_minus_sign: | N/A | 32 | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705716298 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705716440 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsPlaylistsResponseBody.md b/docs/models/operations/GetPlaylistsPlaylistsResponseBody.md new file mode 100644 index 00000000..0e2a73ea --- /dev/null +++ b/docs/models/operations/GetPlaylistsPlaylistsResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistsPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetPlaylistsErrors](../../models/operations/GetPlaylistsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsRequest.md b/docs/models/operations/GetPlaylistsRequest.md new file mode 100644 index 00000000..cbc7bab8 --- /dev/null +++ b/docs/models/operations/GetPlaylistsRequest.md @@ -0,0 +1,9 @@ +# GetPlaylistsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `playlistType` | [Optional](../../models/operations/PlaylistType.md) | :heavy_minus_sign: | limit to a type of playlist. | +| `smart` | [Optional](../../models/operations/QueryParamSmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsResponse.md b/docs/models/operations/GetPlaylistsResponse.md new file mode 100644 index 00000000..cc923dad --- /dev/null +++ b/docs/models/operations/GetPlaylistsResponse.md @@ -0,0 +1,12 @@ +# GetPlaylistsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetPlaylistsResponseBody.md) | :heavy_minus_sign: | returns all playlists | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetPlaylistsPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsResponseBody.md b/docs/models/operations/GetPlaylistsResponseBody.md new file mode 100644 index 00000000..14c69828 --- /dev/null +++ b/docs/models/operations/GetPlaylistsResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistsResponseBody + +returns all playlists + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetPlaylistsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedErrors.md b/docs/models/operations/GetRecentlyAddedErrors.md new file mode 100644 index 00000000..56620fd1 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedErrors.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedErrors + + +## 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/operations/GetRecentlyAddedLibraryResponseBody.md b/docs/models/operations/GetRecentlyAddedLibraryResponseBody.md new file mode 100644 index 00000000..f320d7f4 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedErrors](../../models/operations/GetRecentlyAddedErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedMediaContainer.md b/docs/models/operations/GetRecentlyAddedMediaContainer.md new file mode 100644 index 00000000..b238aed3 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedMediaContainer.md @@ -0,0 +1,14 @@ +# GetRecentlyAddedMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 50 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1680021154 | +| `mixedParents` | *Optional* | :heavy_minus_sign: | N/A | | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.Metadata](../../models/operations/Metadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedResponse.md b/docs/models/operations/GetRecentlyAddedResponse.md new file mode 100644 index 00000000..9f1ebcab --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedResponse.md @@ -0,0 +1,12 @@ +# GetRecentlyAddedResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetRecentlyAddedResponseBody.md) | :heavy_minus_sign: | The recently added content | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetRecentlyAddedLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedResponseBody.md b/docs/models/operations/GetRecentlyAddedResponseBody.md new file mode 100644 index 00000000..0b292737 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedResponseBody.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedResponseBody + +The recently added content + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetRecentlyAddedMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetResizedPhotoErrors.md b/docs/models/operations/GetResizedPhotoErrors.md new file mode 100644 index 00000000..eed2b582 --- /dev/null +++ b/docs/models/operations/GetResizedPhotoErrors.md @@ -0,0 +1,10 @@ +# GetResizedPhotoErrors + + +## 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/operations/GetResizedPhotoRequest.md b/docs/models/operations/GetResizedPhotoRequest.md new file mode 100644 index 00000000..3cbea586 --- /dev/null +++ b/docs/models/operations/GetResizedPhotoRequest.md @@ -0,0 +1,14 @@ +# GetResizedPhotoRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `width` | *double* | :heavy_check_mark: | The width for the resized photo | 110 | +| `height` | *double* | :heavy_check_mark: | The height for the resized photo | 165 | +| `opacity` | *long* | :heavy_check_mark: | The opacity for the resized photo | | +| `blur` | *double* | :heavy_check_mark: | The width for the resized photo | 0 | +| `minSize` | [lukehagar.plexapi.plexapi.models.operations.MinSize](../../models/operations/MinSize.md) | :heavy_check_mark: | images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. | | +| `upscale` | [lukehagar.plexapi.plexapi.models.operations.Upscale](../../models/operations/Upscale.md) | :heavy_check_mark: | allow images to be resized beyond native dimensions. | | +| `url` | *String* | :heavy_check_mark: | path to image within Plex | /library/metadata/49564/thumb/1654258204 | \ No newline at end of file diff --git a/docs/models/operations/GetResizedPhotoResponse.md b/docs/models/operations/GetResizedPhotoResponse.md new file mode 100644 index 00000000..f9980d54 --- /dev/null +++ b/docs/models/operations/GetResizedPhotoResponse.md @@ -0,0 +1,11 @@ +# GetResizedPhotoResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetResizedPhotoResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetResizedPhotoResponseBody.md b/docs/models/operations/GetResizedPhotoResponseBody.md new file mode 100644 index 00000000..d5880aa8 --- /dev/null +++ b/docs/models/operations/GetResizedPhotoResponseBody.md @@ -0,0 +1,10 @@ +# GetResizedPhotoResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoErrors](../../models/operations/GetResizedPhotoErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsCountry.md b/docs/models/operations/GetSearchResultsCountry.md new file mode 100644 index 00000000..3ac6ede3 --- /dev/null +++ b/docs/models/operations/GetSearchResultsCountry.md @@ -0,0 +1,8 @@ +# GetSearchResultsCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsDirector.md b/docs/models/operations/GetSearchResultsDirector.md new file mode 100644 index 00000000..9c6587ad --- /dev/null +++ b/docs/models/operations/GetSearchResultsDirector.md @@ -0,0 +1,8 @@ +# GetSearchResultsDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Brian De Palma | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsErrors.md b/docs/models/operations/GetSearchResultsErrors.md new file mode 100644 index 00000000..1cd3b3f6 --- /dev/null +++ b/docs/models/operations/GetSearchResultsErrors.md @@ -0,0 +1,10 @@ +# GetSearchResultsErrors + + +## 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/operations/GetSearchResultsGenre.md b/docs/models/operations/GetSearchResultsGenre.md new file mode 100644 index 00000000..f22c941b --- /dev/null +++ b/docs/models/operations/GetSearchResultsGenre.md @@ -0,0 +1,8 @@ +# GetSearchResultsGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Action | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsMedia.md b/docs/models/operations/GetSearchResultsMedia.md new file mode 100644 index 00000000..6782856b --- /dev/null +++ b/docs/models/operations/GetSearchResultsMedia.md @@ -0,0 +1,22 @@ +# GetSearchResultsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 26610 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 6612628 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 4751 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1916 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 796 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 6 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | hevc | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mkv | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | main 10 | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsPart](../../models/operations/GetSearchResultsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsMediaContainer.md b/docs/models/operations/GetSearchResultsMediaContainer.md new file mode 100644 index 00000000..ee898afa --- /dev/null +++ b/docs/models/operations/GetSearchResultsMediaContainer.md @@ -0,0 +1,13 @@ +# GetSearchResultsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 26 | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1680021154 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsMetadata](../../models/operations/GetSearchResultsMetadata.md)> | :heavy_minus_sign: | N/A | | +| `provider` | List<[lukehagar.plexapi.plexapi.models.operations.Provider](../../models/operations/Provider.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsMetadata.md b/docs/models/operations/GetSearchResultsMetadata.md new file mode 100644 index 00000000..7dbbcd40 --- /dev/null +++ b/docs/models/operations/GetSearchResultsMetadata.md @@ -0,0 +1,41 @@ +# GetSearchResultsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `personal` | *Optional* | :heavy_minus_sign: | N/A | | +| `sourceTitle` | *Optional* | :heavy_minus_sign: | N/A | Hera | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 10398 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/10398 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5d7768284de0ee001fcc8f52 | +| `studio` | *Optional* | :heavy_minus_sign: | N/A | Paramount | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Mission: Impossible | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score. | +| `rating` | *Optional* | :heavy_minus_sign: | N/A | 6.6 | +| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 7.1 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 1996 | +| `tagline` | *Optional* | :heavy_minus_sign: | N/A | Expect the impossible. | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/10398/thumb/1679505055 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/10398/art/1679505055 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 6612628 | +| `originallyAvailableAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 1996-05-22 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1589234571 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1679505055 | +| `audienceRatingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `chapterSource` | *Optional* | :heavy_minus_sign: | N/A | media | +| `primaryExtraKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/10501 | +| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsMedia](../../models/operations/GetSearchResultsMedia.md)> | :heavy_minus_sign: | N/A | | +| `genre` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsGenre](../../models/operations/GetSearchResultsGenre.md)> | :heavy_minus_sign: | N/A | | +| `director` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsDirector](../../models/operations/GetSearchResultsDirector.md)> | :heavy_minus_sign: | N/A | | +| `writer` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsWriter](../../models/operations/GetSearchResultsWriter.md)> | :heavy_minus_sign: | N/A | | +| `country` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsCountry](../../models/operations/GetSearchResultsCountry.md)> | :heavy_minus_sign: | N/A | | +| `role` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRole](../../models/operations/GetSearchResultsRole.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsPart.md b/docs/models/operations/GetSearchResultsPart.md new file mode 100644 index 00000000..65dbbfd8 --- /dev/null +++ b/docs/models/operations/GetSearchResultsPart.md @@ -0,0 +1,15 @@ +# GetSearchResultsPart + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 26610 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/26610/1589234571/file.mkv | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 6612628 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 3926903851 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mkv | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | main 10 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsRequest.md b/docs/models/operations/GetSearchResultsRequest.md new file mode 100644 index 00000000..cc56e4f3 --- /dev/null +++ b/docs/models/operations/GetSearchResultsRequest.md @@ -0,0 +1,8 @@ +# GetSearchResultsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `query` | *String* | :heavy_check_mark: | The search query string to use | 110 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsResponse.md b/docs/models/operations/GetSearchResultsResponse.md new file mode 100644 index 00000000..be7680f3 --- /dev/null +++ b/docs/models/operations/GetSearchResultsResponse.md @@ -0,0 +1,12 @@ +# GetSearchResultsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetSearchResultsResponseBody.md) | :heavy_minus_sign: | Search Results | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetSearchResultsSearchResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsResponseBody.md b/docs/models/operations/GetSearchResultsResponseBody.md new file mode 100644 index 00000000..3b5aa9c8 --- /dev/null +++ b/docs/models/operations/GetSearchResultsResponseBody.md @@ -0,0 +1,10 @@ +# GetSearchResultsResponseBody + +Search Results + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetSearchResultsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsRole.md b/docs/models/operations/GetSearchResultsRole.md new file mode 100644 index 00000000..de3296c7 --- /dev/null +++ b/docs/models/operations/GetSearchResultsRole.md @@ -0,0 +1,8 @@ +# GetSearchResultsRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Tom Cruise | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsSearchResponseBody.md b/docs/models/operations/GetSearchResultsSearchResponseBody.md new file mode 100644 index 00000000..021bd7ae --- /dev/null +++ b/docs/models/operations/GetSearchResultsSearchResponseBody.md @@ -0,0 +1,10 @@ +# GetSearchResultsSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetSearchResultsErrors](../../models/operations/GetSearchResultsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsWriter.md b/docs/models/operations/GetSearchResultsWriter.md new file mode 100644 index 00000000..5114c456 --- /dev/null +++ b/docs/models/operations/GetSearchResultsWriter.md @@ -0,0 +1,8 @@ +# GetSearchResultsWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | David Koepp | \ No newline at end of file diff --git a/docs/models/operations/GetServerActivitiesActivitiesResponseBody.md b/docs/models/operations/GetServerActivitiesActivitiesResponseBody.md new file mode 100644 index 00000000..821d3ee0 --- /dev/null +++ b/docs/models/operations/GetServerActivitiesActivitiesResponseBody.md @@ -0,0 +1,10 @@ +# GetServerActivitiesActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesErrors](../../models/operations/GetServerActivitiesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerActivitiesErrors.md b/docs/models/operations/GetServerActivitiesErrors.md new file mode 100644 index 00000000..43cc8db5 --- /dev/null +++ b/docs/models/operations/GetServerActivitiesErrors.md @@ -0,0 +1,10 @@ +# GetServerActivitiesErrors + + +## 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/operations/GetServerActivitiesMediaContainer.md b/docs/models/operations/GetServerActivitiesMediaContainer.md new file mode 100644 index 00000000..ade8b66d --- /dev/null +++ b/docs/models/operations/GetServerActivitiesMediaContainer.md @@ -0,0 +1,9 @@ +# GetServerActivitiesMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | +| `activity` | List<[lukehagar.plexapi.plexapi.models.operations.Activity](../../models/operations/Activity.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerActivitiesResponse.md b/docs/models/operations/GetServerActivitiesResponse.md new file mode 100644 index 00000000..78ef98c0 --- /dev/null +++ b/docs/models/operations/GetServerActivitiesResponse.md @@ -0,0 +1,12 @@ +# GetServerActivitiesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetServerActivitiesResponseBody.md) | :heavy_minus_sign: | The Server Activities | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetServerActivitiesActivitiesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetServerActivitiesResponseBody.md b/docs/models/operations/GetServerActivitiesResponseBody.md new file mode 100644 index 00000000..54b03a12 --- /dev/null +++ b/docs/models/operations/GetServerActivitiesResponseBody.md @@ -0,0 +1,10 @@ +# GetServerActivitiesResponseBody + +The Server Activities + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetServerActivitiesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerCapabilitiesResponse.md b/docs/models/operations/GetServerCapabilitiesResponse.md new file mode 100644 index 00000000..9a56a215 --- /dev/null +++ b/docs/models/operations/GetServerCapabilitiesResponse.md @@ -0,0 +1,12 @@ +# GetServerCapabilitiesResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetServerCapabilitiesResponseBody.md) | :heavy_minus_sign: | The Server Capabilities | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetServerCapabilitiesServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetServerCapabilitiesResponseBody.md b/docs/models/operations/GetServerCapabilitiesResponseBody.md new file mode 100644 index 00000000..b34aecfa --- /dev/null +++ b/docs/models/operations/GetServerCapabilitiesResponseBody.md @@ -0,0 +1,10 @@ +# GetServerCapabilitiesResponseBody + +The Server Capabilities + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerCapabilitiesServerResponseBody.md b/docs/models/operations/GetServerCapabilitiesServerResponseBody.md new file mode 100644 index 00000000..593761d9 --- /dev/null +++ b/docs/models/operations/GetServerCapabilitiesServerResponseBody.md @@ -0,0 +1,10 @@ +# GetServerCapabilitiesServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.Errors](../../models/operations/Errors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerIdentityErrors.md b/docs/models/operations/GetServerIdentityErrors.md new file mode 100644 index 00000000..7d210f5a --- /dev/null +++ b/docs/models/operations/GetServerIdentityErrors.md @@ -0,0 +1,10 @@ +# GetServerIdentityErrors + + +## 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/operations/GetServerIdentityMediaContainer.md b/docs/models/operations/GetServerIdentityMediaContainer.md new file mode 100644 index 00000000..6d451962 --- /dev/null +++ b/docs/models/operations/GetServerIdentityMediaContainer.md @@ -0,0 +1,11 @@ +# GetServerIdentityMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `claimed` | *Optional* | :heavy_minus_sign: | N/A | | +| `machineIdentifier` | *Optional* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | +| `version` | *Optional* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/models/operations/GetServerIdentityResponse.md b/docs/models/operations/GetServerIdentityResponse.md new file mode 100644 index 00000000..b502da76 --- /dev/null +++ b/docs/models/operations/GetServerIdentityResponse.md @@ -0,0 +1,12 @@ +# GetServerIdentityResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetServerIdentityResponseBody.md) | :heavy_minus_sign: | The Server Identity information | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetServerIdentityServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetServerIdentityResponseBody.md b/docs/models/operations/GetServerIdentityResponseBody.md new file mode 100644 index 00000000..7018df87 --- /dev/null +++ b/docs/models/operations/GetServerIdentityResponseBody.md @@ -0,0 +1,10 @@ +# GetServerIdentityResponseBody + +The Server Identity information + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetServerIdentityMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerIdentityServerResponseBody.md b/docs/models/operations/GetServerIdentityServerResponseBody.md new file mode 100644 index 00000000..3df7ea44 --- /dev/null +++ b/docs/models/operations/GetServerIdentityServerResponseBody.md @@ -0,0 +1,10 @@ +# GetServerIdentityServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetServerIdentityErrors](../../models/operations/GetServerIdentityErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerListErrors.md b/docs/models/operations/GetServerListErrors.md new file mode 100644 index 00000000..d690b4b7 --- /dev/null +++ b/docs/models/operations/GetServerListErrors.md @@ -0,0 +1,10 @@ +# GetServerListErrors + + +## 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/operations/GetServerListMediaContainer.md b/docs/models/operations/GetServerListMediaContainer.md new file mode 100644 index 00000000..8d6854b5 --- /dev/null +++ b/docs/models/operations/GetServerListMediaContainer.md @@ -0,0 +1,9 @@ +# GetServerListMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `server` | List<[lukehagar.plexapi.plexapi.models.operations.GetServerListServer](../../models/operations/GetServerListServer.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetServerListResponse.md b/docs/models/operations/GetServerListResponse.md new file mode 100644 index 00000000..28eeec7f --- /dev/null +++ b/docs/models/operations/GetServerListResponse.md @@ -0,0 +1,12 @@ +# GetServerListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetServerListResponseBody.md) | :heavy_minus_sign: | List of Servers | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetServerListServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetServerListResponseBody.md b/docs/models/operations/GetServerListResponseBody.md new file mode 100644 index 00000000..ece73e76 --- /dev/null +++ b/docs/models/operations/GetServerListResponseBody.md @@ -0,0 +1,10 @@ +# GetServerListResponseBody + +List of Servers + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetServerListMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerListServer.md b/docs/models/operations/GetServerListServer.md new file mode 100644 index 00000000..82e3ec71 --- /dev/null +++ b/docs/models/operations/GetServerListServer.md @@ -0,0 +1,13 @@ +# GetServerListServer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `name` | *Optional* | :heavy_minus_sign: | N/A | Hera | +| `host` | *Optional* | :heavy_minus_sign: | N/A | 10.10.10.47 | +| `address` | *Optional* | :heavy_minus_sign: | N/A | 10.10.10.47 | +| `port` | *Optional* | :heavy_minus_sign: | N/A | 32400 | +| `machineIdentifier` | *Optional* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | +| `version` | *Optional* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/models/operations/GetServerListServerResponseBody.md b/docs/models/operations/GetServerListServerResponseBody.md new file mode 100644 index 00000000..ff655ac1 --- /dev/null +++ b/docs/models/operations/GetServerListServerResponseBody.md @@ -0,0 +1,10 @@ +# GetServerListServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetServerListErrors](../../models/operations/GetServerListErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerPreferencesErrors.md b/docs/models/operations/GetServerPreferencesErrors.md new file mode 100644 index 00000000..f3ab07cc --- /dev/null +++ b/docs/models/operations/GetServerPreferencesErrors.md @@ -0,0 +1,10 @@ +# GetServerPreferencesErrors + + +## 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/operations/GetServerPreferencesMediaContainer.md b/docs/models/operations/GetServerPreferencesMediaContainer.md new file mode 100644 index 00000000..21a8b462 --- /dev/null +++ b/docs/models/operations/GetServerPreferencesMediaContainer.md @@ -0,0 +1,9 @@ +# GetServerPreferencesMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 161 | +| `setting` | List<[lukehagar.plexapi.plexapi.models.operations.Setting](../../models/operations/Setting.md)> | :heavy_minus_sign: | N/A | [
{
"id": "EnableDatabaseTrace",
"label": "",
"summary": "",
"type": "bool",
"default": false,
"value": false,
"hidden": true,
"advanced": false,
"group": "",
"enumValues": "1:admin only\|2:everyone"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetServerPreferencesResponse.md b/docs/models/operations/GetServerPreferencesResponse.md new file mode 100644 index 00000000..df891888 --- /dev/null +++ b/docs/models/operations/GetServerPreferencesResponse.md @@ -0,0 +1,12 @@ +# GetServerPreferencesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetServerPreferencesResponseBody.md) | :heavy_minus_sign: | Server Preferences | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetServerPreferencesServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetServerPreferencesResponseBody.md b/docs/models/operations/GetServerPreferencesResponseBody.md new file mode 100644 index 00000000..adfda0c3 --- /dev/null +++ b/docs/models/operations/GetServerPreferencesResponseBody.md @@ -0,0 +1,10 @@ +# GetServerPreferencesResponseBody + +Server Preferences + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetServerPreferencesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerPreferencesServerResponseBody.md b/docs/models/operations/GetServerPreferencesServerResponseBody.md new file mode 100644 index 00000000..3576a991 --- /dev/null +++ b/docs/models/operations/GetServerPreferencesServerResponseBody.md @@ -0,0 +1,10 @@ +# GetServerPreferencesServerResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesErrors](../../models/operations/GetServerPreferencesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryErrors.md b/docs/models/operations/GetSessionHistoryErrors.md new file mode 100644 index 00000000..ac4449b5 --- /dev/null +++ b/docs/models/operations/GetSessionHistoryErrors.md @@ -0,0 +1,10 @@ +# GetSessionHistoryErrors + + +## 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/operations/GetSessionHistoryMediaContainer.md b/docs/models/operations/GetSessionHistoryMediaContainer.md new file mode 100644 index 00000000..21ecfb5a --- /dev/null +++ b/docs/models/operations/GetSessionHistoryMediaContainer.md @@ -0,0 +1,9 @@ +# GetSessionHistoryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 10855 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryMetadata](../../models/operations/GetSessionHistoryMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"historyKey": "/status/sessions/history/1",
"key": "/library/metadata/32171",
"ratingKey": "32171",
"librarySectionID": "2",
"parentKey": "/library/metadata/32170",
"grandparentKey": "/library/metadata/32132",
"title": "The Noise That Blue Makes",
"grandparentTitle": "Taskmaster",
"type": "episode",
"thumb": "/library/metadata/32171/thumb/-1",
"parentThumb": "/library/metadata/32170/thumb/1654134301",
"grandparentThumb": "/library/metadata/32132/thumb/1703933346",
"grandparentArt": "/library/metadata/32132/art/1703933346",
"index": 1,
"parentIndex": 13,
"originallyAvailableAt": "2022-04-14T00:00:00Z",
"viewedAt": 1654139223,
"accountID": 1,
"deviceID": 5
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryMetadata.md b/docs/models/operations/GetSessionHistoryMetadata.md new file mode 100644 index 00000000..5960acac --- /dev/null +++ b/docs/models/operations/GetSessionHistoryMetadata.md @@ -0,0 +1,26 @@ +# GetSessionHistoryMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `historyKey` | *Optional* | :heavy_minus_sign: | N/A | /status/sessions/history/1 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/32171 | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 32171 | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `parentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/32170 | +| `grandparentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/32132 | +| `title` | *Optional* | :heavy_minus_sign: | N/A | The Noise That Blue Makes | +| `grandparentTitle` | *Optional* | :heavy_minus_sign: | N/A | Taskmaster | +| `type` | *Optional* | :heavy_minus_sign: | N/A | episode | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/32171/thumb/-1 | +| `parentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/32170/thumb/1654134301 | +| `grandparentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/32132/thumb/1703933346 | +| `grandparentArt` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/32132/art/1703933346 | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentIndex` | *Optional* | :heavy_minus_sign: | N/A | 13 | +| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2022-04-14 00:00:00 +0000 UTC | +| `viewedAt` | *Optional* | :heavy_minus_sign: | N/A | 1654139223 | +| `accountID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `deviceID` | *Optional* | :heavy_minus_sign: | N/A | 5 | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryResponse.md b/docs/models/operations/GetSessionHistoryResponse.md new file mode 100644 index 00000000..14cbf3f3 --- /dev/null +++ b/docs/models/operations/GetSessionHistoryResponse.md @@ -0,0 +1,12 @@ +# GetSessionHistoryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetSessionHistoryResponseBody.md) | :heavy_minus_sign: | List of Plex Sessions | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetSessionHistorySessionsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryResponseBody.md b/docs/models/operations/GetSessionHistoryResponseBody.md new file mode 100644 index 00000000..089665fc --- /dev/null +++ b/docs/models/operations/GetSessionHistoryResponseBody.md @@ -0,0 +1,10 @@ +# GetSessionHistoryResponseBody + +List of Plex Sessions + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetSessionHistoryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistorySessionsResponseBody.md b/docs/models/operations/GetSessionHistorySessionsResponseBody.md new file mode 100644 index 00000000..da0f79ad --- /dev/null +++ b/docs/models/operations/GetSessionHistorySessionsResponseBody.md @@ -0,0 +1,10 @@ +# GetSessionHistorySessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryErrors](../../models/operations/GetSessionHistoryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsErrors.md b/docs/models/operations/GetSessionsErrors.md new file mode 100644 index 00000000..97a6388e --- /dev/null +++ b/docs/models/operations/GetSessionsErrors.md @@ -0,0 +1,10 @@ +# GetSessionsErrors + + +## 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/operations/GetSessionsMedia.md b/docs/models/operations/GetSessionsMedia.md new file mode 100644 index 00000000..10a584ce --- /dev/null +++ b/docs/models/operations/GetSessionsMedia.md @@ -0,0 +1,15 @@ +# GetSessionsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | flac | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 1014 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | flac | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 186240 | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 130355 | +| `selected` | *Optional* | :heavy_minus_sign: | N/A | true | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.GetSessionsPart](../../models/operations/GetSessionsPart.md)> | :heavy_minus_sign: | N/A | [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsMediaContainer.md b/docs/models/operations/GetSessionsMediaContainer.md new file mode 100644 index 00000000..7566517a --- /dev/null +++ b/docs/models/operations/GetSessionsMediaContainer.md @@ -0,0 +1,9 @@ +# GetSessionsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetSessionsMetadata](../../models/operations/GetSessionsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"addedAt": 1705543312,
"art": "/library/metadata/39904/art/1705310687",
"duration": 186240,
"grandparentArt": "/library/metadata/39904/art/1705310687",
"grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480",
"grandparentKey": "/library/metadata/39904",
"grandparentRatingKey": "39904",
"grandparentThumb": "/library/metadata/39904/thumb/1705310687",
"grandparentTitle": "Green Day",
"guid": "plex://track/6535834f71f22f36f71a8e8f",
"index": 1,
"key": "/library/metadata/67085",
"librarySectionID": "3",
"librarySectionKey": "/library/sections/3",
"librarySectionTitle": "Music",
"musicAnalysisVersion": "1",
"parentGuid": "plex://album/65394d6d472b8ab03ef47f12",
"parentIndex": 1,
"parentKey": "/library/metadata/67084",
"parentRatingKey": "67084",
"parentStudio": "Reprise Records",
"parentThumb": "/library/metadata/67084/thumb/1705543314",
"parentTitle": "Saviors",
"parentYear": 2024,
"ratingCount": 45885,
"ratingKey": "67085",
"sessionKey": "203",
"thumb": "/library/metadata/67084/thumb/1705543314",
"title": "The American Dream Is Killing Me",
"titleSort": "American Dream Is Killing Me",
"type": "track",
"updatedAt": 1705543314,
"viewOffset": 1000,
"Media": [
{
"audioChannels": 2,
"audioCodec": "flac",
"bitrate": 1014,
"container": "flac",
"duration": 186240,
"id": "130355",
"selected": true,
"Part": [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
]
}
],
"User": {
"id": "1",
"thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661",
"title": "Blindkitty38"
},
"Player": {
"address": "10.10.10.171",
"machineIdentifier": "3tsdzir85m2onc3qyr255aq1",
"model": "standalone",
"platform": "windows",
"platformVersion": "10.0.22621",
"product": "Plex for Windows",
"profile": "Plex Desktop",
"remotePublicAddress": "68.248.140.20",
"state": "playing",
"title": "DESKTOP-BL80MTD",
"version": "1.85.0.4071-21128b56",
"local": true,
"relayed": false,
"secure": true,
"userID": 1
},
"Session": {
"id": "93h7e00ncblxncqw9lkfaoxi",
"bandwidth": 1050,
"location": "lan"
}
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsMetadata.md b/docs/models/operations/GetSessionsMetadata.md new file mode 100644 index 00000000..85298c01 --- /dev/null +++ b/docs/models/operations/GetSessionsMetadata.md @@ -0,0 +1,44 @@ +# GetSessionsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705543312 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 186240 | +| `grandparentArt` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | +| `grandparentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 | +| `grandparentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/39904 | +| `grandparentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 39904 | +| `grandparentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 | +| `grandparentTitle` | *Optional* | :heavy_minus_sign: | N/A | Green Day | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/67085 | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 3 | +| `librarySectionKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/3 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Music | +| `musicAnalysisVersion` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 | +| `parentIndex` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/67084 | +| `parentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 67084 | +| `parentStudio` | *Optional* | :heavy_minus_sign: | N/A | Reprise Records | +| `parentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | +| `parentTitle` | *Optional* | :heavy_minus_sign: | N/A | Saviors | +| `parentYear` | *Optional* | :heavy_minus_sign: | N/A | 2024 | +| `ratingCount` | *Optional* | :heavy_minus_sign: | N/A | 45885 | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 67085 | +| `sessionKey` | *Optional* | :heavy_minus_sign: | N/A | 203 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | +| `title` | *Optional* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me | +| `titleSort` | *Optional* | :heavy_minus_sign: | N/A | American Dream Is Killing Me | +| `type` | *Optional* | :heavy_minus_sign: | N/A | track | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705543314 | +| `viewOffset` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.GetSessionsMedia](../../models/operations/GetSessionsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"audioChannels": 2,
"audioCodec": "flac",
"bitrate": 1014,
"container": "flac",
"duration": 186240,
"id": "130355",
"selected": true,
"Part": [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
]
}
] | +| `user` | [Optional](../../models/operations/User.md) | :heavy_minus_sign: | N/A | | +| `player` | [Optional](../../models/operations/Player.md) | :heavy_minus_sign: | N/A | | +| `session` | [Optional](../../models/operations/Session.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsPart.md b/docs/models/operations/GetSessionsPart.md new file mode 100644 index 00000000..83bcbd1d --- /dev/null +++ b/docs/models/operations/GetSessionsPart.md @@ -0,0 +1,17 @@ +# GetSessionsPart + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container` | *Optional* | :heavy_minus_sign: | N/A | flac | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 186240 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac | +| `hasThumbnail` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 130625 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/130625/1705543268/file.flac | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 23644000 | +| `decision` | *Optional* | :heavy_minus_sign: | N/A | directplay | +| `selected` | *Optional* | :heavy_minus_sign: | N/A | true | +| `stream` | List<[lukehagar.plexapi.plexapi.models.operations.GetSessionsStream](../../models/operations/GetSessionsStream.md)> | :heavy_minus_sign: | N/A | [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsResponse.md b/docs/models/operations/GetSessionsResponse.md new file mode 100644 index 00000000..52cac25b --- /dev/null +++ b/docs/models/operations/GetSessionsResponse.md @@ -0,0 +1,12 @@ +# GetSessionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetSessionsResponseBody.md) | :heavy_minus_sign: | List of Active Plex Sessions | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetSessionsSessionsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsResponseBody.md b/docs/models/operations/GetSessionsResponseBody.md new file mode 100644 index 00000000..dd6b3dd3 --- /dev/null +++ b/docs/models/operations/GetSessionsResponseBody.md @@ -0,0 +1,10 @@ +# GetSessionsResponseBody + +List of Active Plex Sessions + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetSessionsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsSessionsResponseBody.md b/docs/models/operations/GetSessionsSessionsResponseBody.md new file mode 100644 index 00000000..bafac48a --- /dev/null +++ b/docs/models/operations/GetSessionsSessionsResponseBody.md @@ -0,0 +1,10 @@ +# GetSessionsSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetSessionsErrors](../../models/operations/GetSessionsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsStream.md b/docs/models/operations/GetSessionsStream.md new file mode 100644 index 00000000..aca3c603 --- /dev/null +++ b/docs/models/operations/GetSessionsStream.md @@ -0,0 +1,27 @@ +# GetSessionsStream + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `albumGain` | *Optional* | :heavy_minus_sign: | N/A | -12.94 | +| `albumPeak` | *Optional* | :heavy_minus_sign: | N/A | 1.000000 | +| `albumRange` | *Optional* | :heavy_minus_sign: | N/A | 4.751014 | +| `audioChannelLayout` | *Optional* | :heavy_minus_sign: | N/A | stereo | +| `bitDepth` | *Optional* | :heavy_minus_sign: | N/A | 16 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 1014 | +| `channels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `codec` | *Optional* | :heavy_minus_sign: | N/A | flac | +| `displayTitle` | *Optional* | :heavy_minus_sign: | N/A | FLAC (Stereo) | +| `extendedDisplayTitle` | *Optional* | :heavy_minus_sign: | N/A | FLAC (Stereo) | +| `gain` | *Optional* | :heavy_minus_sign: | N/A | -12.94 | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 352487 | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `loudness` | *Optional* | :heavy_minus_sign: | N/A | -5.94 | +| `lra` | *Optional* | :heavy_minus_sign: | N/A | 1.74 | +| `peak` | *Optional* | :heavy_minus_sign: | N/A | 1.000000 | +| `samplingRate` | *Optional* | :heavy_minus_sign: | N/A | 44100 | +| `selected` | *Optional* | :heavy_minus_sign: | N/A | true | +| `streamType` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `location` | *Optional* | :heavy_minus_sign: | N/A | direct | \ No newline at end of file diff --git a/docs/models/operations/GetSourceConnectionInformationErrors.md b/docs/models/operations/GetSourceConnectionInformationErrors.md new file mode 100644 index 00000000..3067c3c7 --- /dev/null +++ b/docs/models/operations/GetSourceConnectionInformationErrors.md @@ -0,0 +1,10 @@ +# GetSourceConnectionInformationErrors + + +## 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/operations/GetSourceConnectionInformationRequest.md b/docs/models/operations/GetSourceConnectionInformationRequest.md new file mode 100644 index 00000000..a173a061 --- /dev/null +++ b/docs/models/operations/GetSourceConnectionInformationRequest.md @@ -0,0 +1,8 @@ +# GetSourceConnectionInformationRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `source` | *String* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier | \ No newline at end of file diff --git a/docs/models/operations/GetSourceConnectionInformationResponse.md b/docs/models/operations/GetSourceConnectionInformationResponse.md new file mode 100644 index 00000000..a9b00f93 --- /dev/null +++ b/docs/models/operations/GetSourceConnectionInformationResponse.md @@ -0,0 +1,11 @@ +# GetSourceConnectionInformationResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetSourceConnectionInformationResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetSourceConnectionInformationResponseBody.md b/docs/models/operations/GetSourceConnectionInformationResponseBody.md new file mode 100644 index 00000000..80e0f17e --- /dev/null +++ b/docs/models/operations/GetSourceConnectionInformationResponseBody.md @@ -0,0 +1,10 @@ +# GetSourceConnectionInformationResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationErrors](../../models/operations/GetSourceConnectionInformationErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsDevice.md b/docs/models/operations/GetStatisticsDevice.md new file mode 100644 index 00000000..55a55e4d --- /dev/null +++ b/docs/models/operations/GetStatisticsDevice.md @@ -0,0 +1,12 @@ +# GetStatisticsDevice + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 208 | +| `name` | *Optional* | :heavy_minus_sign: | N/A | Roku Express | +| `platform` | *Optional* | :heavy_minus_sign: | N/A | Roku | +| `clientIdentifier` | *Optional* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 | +| `createdAt` | *Optional* | :heavy_minus_sign: | N/A | 1706470556 | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsErrors.md b/docs/models/operations/GetStatisticsErrors.md new file mode 100644 index 00000000..74db22a2 --- /dev/null +++ b/docs/models/operations/GetStatisticsErrors.md @@ -0,0 +1,10 @@ +# GetStatisticsErrors + + +## 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/operations/GetStatisticsMediaContainer.md b/docs/models/operations/GetStatisticsMediaContainer.md new file mode 100644 index 00000000..1b7c2319 --- /dev/null +++ b/docs/models/operations/GetStatisticsMediaContainer.md @@ -0,0 +1,11 @@ +# GetStatisticsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 5497 | +| `device` | List<[lukehagar.plexapi.plexapi.models.operations.GetStatisticsDevice](../../models/operations/GetStatisticsDevice.md)> | :heavy_minus_sign: | N/A | [
{
"id": 208,
"name": "Roku Express",
"platform": "Roku",
"clientIdentifier": "793095d235660625108ef785cc7646e9",
"createdAt": 1706470556
}
] | +| `account` | List<[lukehagar.plexapi.plexapi.models.operations.Account](../../models/operations/Account.md)> | :heavy_minus_sign: | N/A | [
{
"id": 238960586,
"key": "/accounts/238960586",
"name": "Diane",
"defaultAudioLanguage": "en",
"autoSelectAudio": true,
"defaultSubtitleLanguage": "en",
"subtitleMode": 1,
"thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"
}
] | +| `statisticsMedia` | List<[lukehagar.plexapi.plexapi.models.operations.StatisticsMedia](../../models/operations/StatisticsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"accountID": 1,
"deviceID": 13,
"timespan": 4,
"at": 1707141600,
"metadataType": 4,
"count": 1,
"duration": 1555
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsRequest.md b/docs/models/operations/GetStatisticsRequest.md new file mode 100644 index 00000000..833e13a5 --- /dev/null +++ b/docs/models/operations/GetStatisticsRequest.md @@ -0,0 +1,8 @@ +# GetStatisticsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `timespan` | *Optional* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsResponse.md b/docs/models/operations/GetStatisticsResponse.md new file mode 100644 index 00000000..a3090e42 --- /dev/null +++ b/docs/models/operations/GetStatisticsResponse.md @@ -0,0 +1,12 @@ +# GetStatisticsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetStatisticsResponseBody.md) | :heavy_minus_sign: | Media Statistics | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetStatisticsStatisticsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsResponseBody.md b/docs/models/operations/GetStatisticsResponseBody.md new file mode 100644 index 00000000..b89329bf --- /dev/null +++ b/docs/models/operations/GetStatisticsResponseBody.md @@ -0,0 +1,10 @@ +# GetStatisticsResponseBody + +Media Statistics + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetStatisticsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsStatisticsResponseBody.md b/docs/models/operations/GetStatisticsStatisticsResponseBody.md new file mode 100644 index 00000000..d5d4f457 --- /dev/null +++ b/docs/models/operations/GetStatisticsStatisticsResponseBody.md @@ -0,0 +1,10 @@ +# GetStatisticsStatisticsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetStatisticsErrors](../../models/operations/GetStatisticsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTimelineErrors.md b/docs/models/operations/GetTimelineErrors.md new file mode 100644 index 00000000..2d061105 --- /dev/null +++ b/docs/models/operations/GetTimelineErrors.md @@ -0,0 +1,10 @@ +# GetTimelineErrors + + +## 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/operations/GetTimelineRequest.md b/docs/models/operations/GetTimelineRequest.md new file mode 100644 index 00000000..9e7a6a97 --- /dev/null +++ b/docs/models/operations/GetTimelineRequest.md @@ -0,0 +1,17 @@ +# GetTimelineRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `ratingKey` | *double* | :heavy_check_mark: | The rating key of the media item | +| `key` | *String* | :heavy_check_mark: | The key of the media item to get the timeline for | +| `state` | [lukehagar.plexapi.plexapi.models.operations.State](../../models/operations/State.md) | :heavy_check_mark: | The state of the media item | +| `hasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | +| `time` | *double* | :heavy_check_mark: | The time of the media item | +| `duration` | *double* | :heavy_check_mark: | The duration of the media item | +| `context` | *String* | :heavy_check_mark: | The context of the media item | +| `playQueueItemID` | *double* | :heavy_check_mark: | The play queue item ID of the media item | +| `playBackTime` | *double* | :heavy_check_mark: | The playback time of the media item | +| `row` | *double* | :heavy_check_mark: | The row of the media item | \ No newline at end of file diff --git a/docs/models/operations/GetTimelineResponse.md b/docs/models/operations/GetTimelineResponse.md new file mode 100644 index 00000000..a5e9cf3b --- /dev/null +++ b/docs/models/operations/GetTimelineResponse.md @@ -0,0 +1,11 @@ +# GetTimelineResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetTimelineResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetTimelineResponseBody.md b/docs/models/operations/GetTimelineResponseBody.md new file mode 100644 index 00000000..ae9fb10b --- /dev/null +++ b/docs/models/operations/GetTimelineResponseBody.md @@ -0,0 +1,10 @@ +# GetTimelineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetTimelineErrors](../../models/operations/GetTimelineErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTokenErrors.md b/docs/models/operations/GetTokenErrors.md new file mode 100644 index 00000000..a6b5fe44 --- /dev/null +++ b/docs/models/operations/GetTokenErrors.md @@ -0,0 +1,10 @@ +# GetTokenErrors + + +## 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/operations/GetTokenRequest.md b/docs/models/operations/GetTokenRequest.md new file mode 100644 index 00000000..35b42626 --- /dev/null +++ b/docs/models/operations/GetTokenRequest.md @@ -0,0 +1,9 @@ +# GetTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `pinID` | *String* | :heavy_check_mark: | The PinID to retrieve an access token for | +| `xPlexClientIdentifier` | *String* | :heavy_check_mark: | 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)
| \ No newline at end of file diff --git a/docs/models/operations/GetTokenResponse.md b/docs/models/operations/GetTokenResponse.md new file mode 100644 index 00000000..1066b314 --- /dev/null +++ b/docs/models/operations/GetTokenResponse.md @@ -0,0 +1,11 @@ +# GetTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetTokenResponseBody.md) | :heavy_minus_sign: | X-Plex-Client-Identifier is missing | \ No newline at end of file diff --git a/docs/models/operations/GetTokenResponseBody.md b/docs/models/operations/GetTokenResponseBody.md new file mode 100644 index 00000000..d0380067 --- /dev/null +++ b/docs/models/operations/GetTokenResponseBody.md @@ -0,0 +1,10 @@ +# GetTokenResponseBody + +X-Plex-Client-Identifier is missing + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetTokenErrors](../../models/operations/GetTokenErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTranscodeSessionsErrors.md b/docs/models/operations/GetTranscodeSessionsErrors.md new file mode 100644 index 00000000..fb840f0d --- /dev/null +++ b/docs/models/operations/GetTranscodeSessionsErrors.md @@ -0,0 +1,10 @@ +# GetTranscodeSessionsErrors + + +## 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/operations/GetTranscodeSessionsMediaContainer.md b/docs/models/operations/GetTranscodeSessionsMediaContainer.md new file mode 100644 index 00000000..7802d80c --- /dev/null +++ b/docs/models/operations/GetTranscodeSessionsMediaContainer.md @@ -0,0 +1,9 @@ +# GetTranscodeSessionsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `transcodeSession` | List<[lukehagar.plexapi.plexapi.models.operations.TranscodeSession](../../models/operations/TranscodeSession.md)> | :heavy_minus_sign: | N/A | [
{
"key": "vv3i2q2lax92qlzul1hbd4bx",
"throttled": false,
"complete": false,
"progress": 1.7999999523162842,
"size": -22,
"speed": 25.100000381469727,
"error": false,
"duration": 1445695,
"remaining": 53,
"context": "streaming",
"sourceVideoCodec": "h264",
"sourceAudioCodec": "aac",
"videoDecision": "transcode",
"audioDecision": "transcode",
"subtitleDecision": "burn",
"protocol": "http",
"container": "mkv",
"videoCodec": "h264",
"audioCodec": "opus",
"audioChannels": 1,
"transcodeHwRequested": true,
"timeStamp": 1705895805.4919229,
"maxOffsetAvailable": 29.53,
"minOffsetAvailable": 3.003000020980835
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetTranscodeSessionsResponse.md b/docs/models/operations/GetTranscodeSessionsResponse.md new file mode 100644 index 00000000..9ba06503 --- /dev/null +++ b/docs/models/operations/GetTranscodeSessionsResponse.md @@ -0,0 +1,12 @@ +# GetTranscodeSessionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetTranscodeSessionsResponseBody.md) | :heavy_minus_sign: | The Transcode Sessions | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetTranscodeSessionsSessionsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetTranscodeSessionsResponseBody.md b/docs/models/operations/GetTranscodeSessionsResponseBody.md new file mode 100644 index 00000000..db72de2f --- /dev/null +++ b/docs/models/operations/GetTranscodeSessionsResponseBody.md @@ -0,0 +1,10 @@ +# GetTranscodeSessionsResponseBody + +The Transcode Sessions + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetTranscodeSessionsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTranscodeSessionsSessionsResponseBody.md b/docs/models/operations/GetTranscodeSessionsSessionsResponseBody.md new file mode 100644 index 00000000..9d0e8c9e --- /dev/null +++ b/docs/models/operations/GetTranscodeSessionsSessionsResponseBody.md @@ -0,0 +1,10 @@ +# GetTranscodeSessionsSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsErrors](../../models/operations/GetTranscodeSessionsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenErrors.md b/docs/models/operations/GetTransientTokenErrors.md new file mode 100644 index 00000000..176d28cb --- /dev/null +++ b/docs/models/operations/GetTransientTokenErrors.md @@ -0,0 +1,10 @@ +# GetTransientTokenErrors + + +## 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/operations/GetTransientTokenQueryParamType.md b/docs/models/operations/GetTransientTokenQueryParamType.md new file mode 100644 index 00000000..5c33dc3d --- /dev/null +++ b/docs/models/operations/GetTransientTokenQueryParamType.md @@ -0,0 +1,10 @@ +# GetTransientTokenQueryParamType + +`delegation` - This is the only supported `type` parameter. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DELEGATION` | delegation | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenRequest.md b/docs/models/operations/GetTransientTokenRequest.md new file mode 100644 index 00000000..9a93ae2b --- /dev/null +++ b/docs/models/operations/GetTransientTokenRequest.md @@ -0,0 +1,9 @@ +# GetTransientTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [lukehagar.plexapi.plexapi.models.operations.GetTransientTokenQueryParamType](../../models/operations/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | +| `scope` | [lukehagar.plexapi.plexapi.models.operations.Scope](../../models/operations/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenResponse.md b/docs/models/operations/GetTransientTokenResponse.md new file mode 100644 index 00000000..68843db0 --- /dev/null +++ b/docs/models/operations/GetTransientTokenResponse.md @@ -0,0 +1,11 @@ +# GetTransientTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetTransientTokenResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenResponseBody.md b/docs/models/operations/GetTransientTokenResponseBody.md new file mode 100644 index 00000000..29027794 --- /dev/null +++ b/docs/models/operations/GetTransientTokenResponseBody.md @@ -0,0 +1,10 @@ +# GetTransientTokenResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetTransientTokenErrors](../../models/operations/GetTransientTokenErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetUpdateStatusErrors.md b/docs/models/operations/GetUpdateStatusErrors.md new file mode 100644 index 00000000..37bbefd4 --- /dev/null +++ b/docs/models/operations/GetUpdateStatusErrors.md @@ -0,0 +1,10 @@ +# GetUpdateStatusErrors + + +## 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/operations/GetUpdateStatusMediaContainer.md b/docs/models/operations/GetUpdateStatusMediaContainer.md new file mode 100644 index 00000000..71f426d1 --- /dev/null +++ b/docs/models/operations/GetUpdateStatusMediaContainer.md @@ -0,0 +1,13 @@ +# GetUpdateStatusMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `canInstall` | *Optional* | :heavy_minus_sign: | N/A | false | +| `checkedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705801232 | +| `downloadURL` | *Optional* | :heavy_minus_sign: | N/A | https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `release` | List<[lukehagar.plexapi.plexapi.models.operations.Release](../../models/operations/Release.md)> | :heavy_minus_sign: | N/A | [
{
"key": "https://plex.tv/updater/releases/5136",
"version": "1.40.0.7775-456fbaf97",
"added": "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n(Music) Store track genres and add filtering options (#14653)\n(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n(View History) No longer create a view history entry for items marked as played (#10888)\n(Web) Updated to 4.118.0",
"fixed": "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n(Collection) Server could become unresponsive when collection membership changes (#14612)\n(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n(Library) The Content Rating not equal to None filter does not work (#14620)\n(Search) Album search results could contain all the album's tracks too (#14486)\n(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)",
"downloadURL": "https://plex.tv/downloads/latest/5?channel=8\u0026build=linux-x86_64\u0026distro=redhat\u0026X-Plex-Token=xxxxxxxxxxxxxxxxxxxx",
"state": "notify"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetUpdateStatusResponse.md b/docs/models/operations/GetUpdateStatusResponse.md new file mode 100644 index 00000000..927b43b8 --- /dev/null +++ b/docs/models/operations/GetUpdateStatusResponse.md @@ -0,0 +1,12 @@ +# GetUpdateStatusResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonObject` | [Optional](../../models/operations/GetUpdateStatusResponseBody.md) | :heavy_minus_sign: | The Server Updates | +| `fourHundredAndOneApplicationJsonObject` | [Optional](../../models/operations/GetUpdateStatusUpdaterResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/GetUpdateStatusResponseBody.md b/docs/models/operations/GetUpdateStatusResponseBody.md new file mode 100644 index 00000000..9cfefaa1 --- /dev/null +++ b/docs/models/operations/GetUpdateStatusResponseBody.md @@ -0,0 +1,10 @@ +# GetUpdateStatusResponseBody + +The Server Updates + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetUpdateStatusMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetUpdateStatusUpdaterResponseBody.md b/docs/models/operations/GetUpdateStatusUpdaterResponseBody.md new file mode 100644 index 00000000..47f91a6c --- /dev/null +++ b/docs/models/operations/GetUpdateStatusUpdaterResponseBody.md @@ -0,0 +1,10 @@ +# GetUpdateStatusUpdaterResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusErrors](../../models/operations/GetUpdateStatusErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Guids.md b/docs/models/operations/Guids.md new file mode 100644 index 00000000..62bc2565 --- /dev/null +++ b/docs/models/operations/Guids.md @@ -0,0 +1,8 @@ +# Guids + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | tvdb://2337 | \ No newline at end of file diff --git a/docs/models/operations/Hub.md b/docs/models/operations/Hub.md new file mode 100644 index 00000000..b9dead96 --- /dev/null +++ b/docs/models/operations/Hub.md @@ -0,0 +1,18 @@ +# Hub + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `hubKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/50768,65523,58188,57341,57302,57070 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Recent Playlists | +| `type` | *Optional* | :heavy_minus_sign: | N/A | playlist | +| `hubIdentifier` | *Optional* | :heavy_minus_sign: | N/A | home.playlists | +| `context` | *Optional* | :heavy_minus_sign: | N/A | hub.home.playlists | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 6 | +| `more` | *Optional* | :heavy_minus_sign: | N/A | true | +| `style` | *Optional* | :heavy_minus_sign: | N/A | shelf | +| `promoted` | *Optional* | :heavy_minus_sign: | N/A | true | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsMetadata](../../models/operations/GetGlobalHubsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"titleSort": "Tracks",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"icon": "playlist://image.smart",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
] | \ No newline at end of file diff --git a/docs/models/operations/IncludeDetails.md b/docs/models/operations/IncludeDetails.md new file mode 100644 index 00000000..55129417 --- /dev/null +++ b/docs/models/operations/IncludeDetails.md @@ -0,0 +1,13 @@ +# IncludeDetails + +Whether or not to include details for a section (types, filters, and sorts). +Only exists for backwards compatibility, media providers other than the server libraries have it on always. + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Level.md b/docs/models/operations/Level.md new file mode 100644 index 00000000..6f8db56a --- /dev/null +++ b/docs/models/operations/Level.md @@ -0,0 +1,20 @@ +# Level + +An integer log level to write to the PMS log with. +0: Error +1: Warning +2: Info +3: Debug +4: Verbose + + + +## Values + +| Name | Value | +| ------- | ------- | +| `ZERO` | 0 | +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | +| `FOUR` | 4 | \ No newline at end of file diff --git a/docs/models/operations/Location.md b/docs/models/operations/Location.md new file mode 100644 index 00000000..3775ea15 --- /dev/null +++ b/docs/models/operations/Location.md @@ -0,0 +1,17 @@ +# Location + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | US | +| `europeanUnionMember` | *Optional* | :heavy_minus_sign: | N/A | | +| `continentCode` | *Optional* | :heavy_minus_sign: | N/A | NA | +| `country` | *Optional* | :heavy_minus_sign: | N/A | United States | +| `city` | *Optional* | :heavy_minus_sign: | N/A | Austin | +| `timeZone` | *Optional* | :heavy_minus_sign: | N/A | America/Chicago | +| `postalCode` | *Optional* | :heavy_minus_sign: | N/A | 78732 | +| `inPrivacyRestrictedCountry` | *Optional* | :heavy_minus_sign: | N/A | | +| `subdivisions` | *Optional* | :heavy_minus_sign: | N/A | Texas | +| `coordinates` | *Optional* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 | \ No newline at end of file diff --git a/docs/models/operations/LogLineErrors.md b/docs/models/operations/LogLineErrors.md new file mode 100644 index 00000000..ccef7a58 --- /dev/null +++ b/docs/models/operations/LogLineErrors.md @@ -0,0 +1,10 @@ +# LogLineErrors + + +## 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/operations/LogLineRequest.md b/docs/models/operations/LogLineRequest.md new file mode 100644 index 00000000..1e72ae16 --- /dev/null +++ b/docs/models/operations/LogLineRequest.md @@ -0,0 +1,10 @@ +# LogLineRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `level` | [lukehagar.plexapi.plexapi.models.operations.Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | +| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message | +| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman | \ No newline at end of file diff --git a/docs/models/operations/LogLineResponse.md b/docs/models/operations/LogLineResponse.md new file mode 100644 index 00000000..5c007b69 --- /dev/null +++ b/docs/models/operations/LogLineResponse.md @@ -0,0 +1,11 @@ +# LogLineResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/LogLineResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/LogLineResponseBody.md b/docs/models/operations/LogLineResponseBody.md new file mode 100644 index 00000000..7ddb8781 --- /dev/null +++ b/docs/models/operations/LogLineResponseBody.md @@ -0,0 +1,10 @@ +# LogLineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.LogLineErrors](../../models/operations/LogLineErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/LogMultiLineErrors.md b/docs/models/operations/LogMultiLineErrors.md new file mode 100644 index 00000000..d2e531cf --- /dev/null +++ b/docs/models/operations/LogMultiLineErrors.md @@ -0,0 +1,10 @@ +# LogMultiLineErrors + + +## 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/operations/LogMultiLineResponse.md b/docs/models/operations/LogMultiLineResponse.md new file mode 100644 index 00000000..f1be9d3b --- /dev/null +++ b/docs/models/operations/LogMultiLineResponse.md @@ -0,0 +1,11 @@ +# LogMultiLineResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/LogMultiLineResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/LogMultiLineResponseBody.md b/docs/models/operations/LogMultiLineResponseBody.md new file mode 100644 index 00000000..e7fac304 --- /dev/null +++ b/docs/models/operations/LogMultiLineResponseBody.md @@ -0,0 +1,10 @@ +# LogMultiLineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.LogMultiLineErrors](../../models/operations/LogMultiLineErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MarkPlayedErrors.md b/docs/models/operations/MarkPlayedErrors.md new file mode 100644 index 00000000..02878d85 --- /dev/null +++ b/docs/models/operations/MarkPlayedErrors.md @@ -0,0 +1,10 @@ +# MarkPlayedErrors + + +## 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/operations/MarkPlayedRequest.md b/docs/models/operations/MarkPlayedRequest.md new file mode 100644 index 00000000..59ec5aa2 --- /dev/null +++ b/docs/models/operations/MarkPlayedRequest.md @@ -0,0 +1,8 @@ +# MarkPlayedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `key` | *double* | :heavy_check_mark: | The media key to mark as played | 59398 | \ No newline at end of file diff --git a/docs/models/operations/MarkPlayedResponse.md b/docs/models/operations/MarkPlayedResponse.md new file mode 100644 index 00000000..6b249cca --- /dev/null +++ b/docs/models/operations/MarkPlayedResponse.md @@ -0,0 +1,11 @@ +# MarkPlayedResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/MarkPlayedResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/MarkPlayedResponseBody.md b/docs/models/operations/MarkPlayedResponseBody.md new file mode 100644 index 00000000..6057f113 --- /dev/null +++ b/docs/models/operations/MarkPlayedResponseBody.md @@ -0,0 +1,10 @@ +# MarkPlayedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.MarkPlayedErrors](../../models/operations/MarkPlayedErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MarkUnplayedErrors.md b/docs/models/operations/MarkUnplayedErrors.md new file mode 100644 index 00000000..8e71310c --- /dev/null +++ b/docs/models/operations/MarkUnplayedErrors.md @@ -0,0 +1,10 @@ +# MarkUnplayedErrors + + +## 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/operations/MarkUnplayedRequest.md b/docs/models/operations/MarkUnplayedRequest.md new file mode 100644 index 00000000..c365eda1 --- /dev/null +++ b/docs/models/operations/MarkUnplayedRequest.md @@ -0,0 +1,8 @@ +# MarkUnplayedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `key` | *double* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 | \ No newline at end of file diff --git a/docs/models/operations/MarkUnplayedResponse.md b/docs/models/operations/MarkUnplayedResponse.md new file mode 100644 index 00000000..8e46baac --- /dev/null +++ b/docs/models/operations/MarkUnplayedResponse.md @@ -0,0 +1,11 @@ +# MarkUnplayedResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/MarkUnplayedResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/MarkUnplayedResponseBody.md b/docs/models/operations/MarkUnplayedResponseBody.md new file mode 100644 index 00000000..7e4800b7 --- /dev/null +++ b/docs/models/operations/MarkUnplayedResponseBody.md @@ -0,0 +1,10 @@ +# MarkUnplayedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.MarkUnplayedErrors](../../models/operations/MarkUnplayedErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Media.md b/docs/models/operations/Media.md new file mode 100644 index 00000000..86a8587c --- /dev/null +++ b/docs/models/operations/Media.md @@ -0,0 +1,23 @@ +# Media + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 120345 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 3623 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 804 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 6 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | ac3 | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | +| `part` | List<[lukehagar.plexapi.plexapi.models.operations.Part](../../models/operations/Part.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/MediaContainer.md b/docs/models/operations/MediaContainer.md new file mode 100644 index 00000000..430bd1ea --- /dev/null +++ b/docs/models/operations/MediaContainer.md @@ -0,0 +1,58 @@ +# MediaContainer + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | +| `allowCameraUpload` | *Optional* | :heavy_minus_sign: | N/A | +| `allowChannelAccess` | *Optional* | :heavy_minus_sign: | N/A | +| `allowMediaDeletion` | *Optional* | :heavy_minus_sign: | N/A | +| `allowSharing` | *Optional* | :heavy_minus_sign: | N/A | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | +| `allowTuners` | *Optional* | :heavy_minus_sign: | N/A | +| `backgroundProcessing` | *Optional* | :heavy_minus_sign: | N/A | +| `certificate` | *Optional* | :heavy_minus_sign: | N/A | +| `companionProxy` | *Optional* | :heavy_minus_sign: | N/A | +| `countryCode` | *Optional* | :heavy_minus_sign: | N/A | +| `diagnostics` | *Optional* | :heavy_minus_sign: | N/A | +| `eventStream` | *Optional* | :heavy_minus_sign: | N/A | +| `friendlyName` | *Optional* | :heavy_minus_sign: | N/A | +| `hubSearch` | *Optional* | :heavy_minus_sign: | N/A | +| `itemClusters` | *Optional* | :heavy_minus_sign: | N/A | +| `livetv` | *Optional* | :heavy_minus_sign: | N/A | +| `machineIdentifier` | *Optional* | :heavy_minus_sign: | N/A | +| `mediaProviders` | *Optional* | :heavy_minus_sign: | N/A | +| `multiuser` | *Optional* | :heavy_minus_sign: | N/A | +| `musicAnalysis` | *Optional* | :heavy_minus_sign: | N/A | +| `myPlex` | *Optional* | :heavy_minus_sign: | N/A | +| `myPlexMappingState` | *Optional* | :heavy_minus_sign: | N/A | +| `myPlexSigninState` | *Optional* | :heavy_minus_sign: | N/A | +| `myPlexSubscription` | *Optional* | :heavy_minus_sign: | N/A | +| `myPlexUsername` | *Optional* | :heavy_minus_sign: | N/A | +| `offlineTranscode` | *Optional* | :heavy_minus_sign: | N/A | +| `ownerFeatures` | *Optional* | :heavy_minus_sign: | N/A | +| `photoAutoTag` | *Optional* | :heavy_minus_sign: | N/A | +| `platform` | *Optional* | :heavy_minus_sign: | N/A | +| `platformVersion` | *Optional* | :heavy_minus_sign: | N/A | +| `pluginHost` | *Optional* | :heavy_minus_sign: | N/A | +| `pushNotifications` | *Optional* | :heavy_minus_sign: | N/A | +| `readOnlyLibraries` | *Optional* | :heavy_minus_sign: | N/A | +| `streamingBrainABRVersion` | *Optional* | :heavy_minus_sign: | N/A | +| `streamingBrainVersion` | *Optional* | :heavy_minus_sign: | N/A | +| `sync` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderActiveVideoSessions` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderAudio` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderLyrics` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderPhoto` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderSubtitles` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderVideo` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderVideoBitrates` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderVideoQualities` | *Optional* | :heavy_minus_sign: | N/A | +| `transcoderVideoResolutions` | *Optional* | :heavy_minus_sign: | N/A | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | +| `updater` | *Optional* | :heavy_minus_sign: | N/A | +| `version` | *Optional* | :heavy_minus_sign: | N/A | +| `voiceSearch` | *Optional* | :heavy_minus_sign: | N/A | +| `directory` | List<[lukehagar.plexapi.plexapi.models.operations.Directory](../../models/operations/Directory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Metadata.md b/docs/models/operations/Metadata.md new file mode 100644 index 00000000..6bc34bb4 --- /dev/null +++ b/docs/models/operations/Metadata.md @@ -0,0 +1,39 @@ +# Metadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 59398 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | +| `studio` | *Optional* | :heavy_minus_sign: | N/A | Marvel Studios | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | +| `rating` | *Optional* | :heavy_minus_sign: | N/A | 4.7 | +| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 8.3 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 2023 | +| `tagline` | *Optional* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | +| `originallyAvailableAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1681803215 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1681888010 | +| `audienceRatingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `chapterSource` | *Optional* | :heavy_minus_sign: | N/A | media | +| `primaryExtraKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59399 | +| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | +| `media` | List<[lukehagar.plexapi.plexapi.models.operations.Media](../../models/operations/Media.md)> | :heavy_minus_sign: | N/A | | +| `genre` | List<[lukehagar.plexapi.plexapi.models.operations.Genre](../../models/operations/Genre.md)> | :heavy_minus_sign: | N/A | | +| `director` | List<[lukehagar.plexapi.plexapi.models.operations.Director](../../models/operations/Director.md)> | :heavy_minus_sign: | N/A | | +| `writer` | List<[lukehagar.plexapi.plexapi.models.operations.Writer](../../models/operations/Writer.md)> | :heavy_minus_sign: | N/A | | +| `country` | List<[lukehagar.plexapi.plexapi.models.operations.Country](../../models/operations/Country.md)> | :heavy_minus_sign: | N/A | | +| `role` | List<[lukehagar.plexapi.plexapi.models.operations.Role](../../models/operations/Role.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/MinSize.md b/docs/models/operations/MinSize.md new file mode 100644 index 00000000..815444ca --- /dev/null +++ b/docs/models/operations/MinSize.md @@ -0,0 +1,11 @@ +# MinSize + +images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/MyPlex.md b/docs/models/operations/MyPlex.md new file mode 100644 index 00000000..9b8b8888 --- /dev/null +++ b/docs/models/operations/MyPlex.md @@ -0,0 +1,19 @@ +# MyPlex + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `authToken` | *Optional* | :heavy_minus_sign: | N/A | Z5v-PrNASDFpsaCi3CPK7 | +| `username` | *Optional* | :heavy_minus_sign: | N/A | example.email@mail.com | +| `mappingState` | *Optional* | :heavy_minus_sign: | N/A | mapped | +| `mappingError` | *Optional* | :heavy_minus_sign: | N/A | | +| `signInState` | *Optional* | :heavy_minus_sign: | N/A | ok | +| `publicAddress` | *Optional* | :heavy_minus_sign: | N/A | 140.20.68.140 | +| `publicPort` | *Optional* | :heavy_minus_sign: | N/A | 32400 | +| `privateAddress` | *Optional* | :heavy_minus_sign: | N/A | 10.10.10.47 | +| `privatePort` | *Optional* | :heavy_minus_sign: | N/A | 32400 | +| `subscriptionFeatures` | *Optional* | :heavy_minus_sign: | N/A | federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks | +| `subscriptionActive` | *Optional* | :heavy_minus_sign: | N/A | | +| `subscriptionState` | *Optional* | :heavy_minus_sign: | N/A | Active | \ No newline at end of file diff --git a/docs/models/operations/OnlyTransient.md b/docs/models/operations/OnlyTransient.md new file mode 100644 index 00000000..c91d3d73 --- /dev/null +++ b/docs/models/operations/OnlyTransient.md @@ -0,0 +1,11 @@ +# OnlyTransient + +Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Operator.md b/docs/models/operations/Operator.md new file mode 100644 index 00000000..e9575212 --- /dev/null +++ b/docs/models/operations/Operator.md @@ -0,0 +1,9 @@ +# Operator + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | = | +| `title` | *Optional* | :heavy_minus_sign: | N/A | is | \ No newline at end of file diff --git a/docs/models/operations/Part.md b/docs/models/operations/Part.md new file mode 100644 index 00000000..8af6c5dc --- /dev/null +++ b/docs/models/operations/Part.md @@ -0,0 +1,17 @@ +# Part + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 120353 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/120353/1681803203/file.mp4 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4 | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 3395307162 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | | +| `hasThumbnail` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/models/operations/PathParamTaskName.md b/docs/models/operations/PathParamTaskName.md new file mode 100644 index 00000000..87cffd14 --- /dev/null +++ b/docs/models/operations/PathParamTaskName.md @@ -0,0 +1,23 @@ +# PathParamTaskName + +The name of the task to be started. + + +## Values + +| Name | Value | +| ----------------------------- | ----------------------------- | +| `BACKUP_DATABASE` | BackupDatabase | +| `BUILD_GRACENOTE_COLLECTIONS` | BuildGracenoteCollections | +| `CHECK_FOR_UPDATES` | CheckForUpdates | +| `CLEAN_OLD_BUNDLES` | CleanOldBundles | +| `CLEAN_OLD_CACHE_FILES` | CleanOldCacheFiles | +| `DEEP_MEDIA_ANALYSIS` | DeepMediaAnalysis | +| `GENERATE_AUTO_TAGS` | GenerateAutoTags | +| `GENERATE_CHAPTER_THUMBS` | GenerateChapterThumbs | +| `GENERATE_MEDIA_INDEX_FILES` | GenerateMediaIndexFiles | +| `OPTIMIZE_DATABASE` | OptimizeDatabase | +| `REFRESH_LIBRARIES` | RefreshLibraries | +| `REFRESH_LOCAL_MEDIA` | RefreshLocalMedia | +| `REFRESH_PERIODIC_METADATA` | RefreshPeriodicMetadata | +| `UPGRADE_MEDIA_ANALYSIS` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/PerformSearchErrors.md b/docs/models/operations/PerformSearchErrors.md new file mode 100644 index 00000000..862f8216 --- /dev/null +++ b/docs/models/operations/PerformSearchErrors.md @@ -0,0 +1,10 @@ +# PerformSearchErrors + + +## 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/operations/PerformSearchRequest.md b/docs/models/operations/PerformSearchRequest.md new file mode 100644 index 00000000..198a00cb --- /dev/null +++ b/docs/models/operations/PerformSearchRequest.md @@ -0,0 +1,10 @@ +# PerformSearchRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `query` | *String* | :heavy_check_mark: | The query term | arnold | +| `sectionId` | *Optional* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | +| `limit` | *Optional* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/models/operations/PerformSearchResponse.md b/docs/models/operations/PerformSearchResponse.md new file mode 100644 index 00000000..3ecd7ecf --- /dev/null +++ b/docs/models/operations/PerformSearchResponse.md @@ -0,0 +1,11 @@ +# PerformSearchResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/PerformSearchResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/PerformSearchResponseBody.md b/docs/models/operations/PerformSearchResponseBody.md new file mode 100644 index 00000000..67bf4c74 --- /dev/null +++ b/docs/models/operations/PerformSearchResponseBody.md @@ -0,0 +1,10 @@ +# PerformSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.PerformSearchErrors](../../models/operations/PerformSearchErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PerformVoiceSearchErrors.md b/docs/models/operations/PerformVoiceSearchErrors.md new file mode 100644 index 00000000..343873c5 --- /dev/null +++ b/docs/models/operations/PerformVoiceSearchErrors.md @@ -0,0 +1,10 @@ +# PerformVoiceSearchErrors + + +## 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/operations/PerformVoiceSearchRequest.md b/docs/models/operations/PerformVoiceSearchRequest.md new file mode 100644 index 00000000..c7f4e75c --- /dev/null +++ b/docs/models/operations/PerformVoiceSearchRequest.md @@ -0,0 +1,10 @@ +# PerformVoiceSearchRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `query` | *String* | :heavy_check_mark: | The query term | dead+poop | +| `sectionId` | *Optional* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | +| `limit` | *Optional* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/models/operations/PerformVoiceSearchResponse.md b/docs/models/operations/PerformVoiceSearchResponse.md new file mode 100644 index 00000000..c755869a --- /dev/null +++ b/docs/models/operations/PerformVoiceSearchResponse.md @@ -0,0 +1,11 @@ +# PerformVoiceSearchResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/PerformVoiceSearchResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/PerformVoiceSearchResponseBody.md b/docs/models/operations/PerformVoiceSearchResponseBody.md new file mode 100644 index 00000000..b7079bfd --- /dev/null +++ b/docs/models/operations/PerformVoiceSearchResponseBody.md @@ -0,0 +1,10 @@ +# PerformVoiceSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchErrors](../../models/operations/PerformVoiceSearchErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Player.md b/docs/models/operations/Player.md new file mode 100644 index 00000000..48a31d10 --- /dev/null +++ b/docs/models/operations/Player.md @@ -0,0 +1,22 @@ +# Player + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `address` | *Optional* | :heavy_minus_sign: | N/A | 10.10.10.171 | +| `machineIdentifier` | *Optional* | :heavy_minus_sign: | N/A | 3tsdzir85m2onc3qyr255aq1 | +| `model` | *Optional* | :heavy_minus_sign: | N/A | standalone | +| `platform` | *Optional* | :heavy_minus_sign: | N/A | windows | +| `platformVersion` | *Optional* | :heavy_minus_sign: | N/A | 10.0.22621 | +| `product` | *Optional* | :heavy_minus_sign: | N/A | Plex for Windows | +| `profile` | *Optional* | :heavy_minus_sign: | N/A | Plex Desktop | +| `remotePublicAddress` | *Optional* | :heavy_minus_sign: | N/A | 68.248.140.20 | +| `state` | *Optional* | :heavy_minus_sign: | N/A | playing | +| `title` | *Optional* | :heavy_minus_sign: | N/A | DESKTOP-BL80MTD | +| `version` | *Optional* | :heavy_minus_sign: | N/A | 1.85.0.4071-21128b56 | +| `local` | *Optional* | :heavy_minus_sign: | N/A | true | +| `relayed` | *Optional* | :heavy_minus_sign: | N/A | false | +| `secure` | *Optional* | :heavy_minus_sign: | N/A | true | +| `userID` | *Optional* | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/PlaylistType.md b/docs/models/operations/PlaylistType.md new file mode 100644 index 00000000..276ac5f7 --- /dev/null +++ b/docs/models/operations/PlaylistType.md @@ -0,0 +1,12 @@ +# PlaylistType + +limit to a type of playlist. + + +## Values + +| Name | Value | +| ------- | ------- | +| `AUDIO` | audio | +| `VIDEO` | video | +| `PHOTO` | photo | \ No newline at end of file diff --git a/docs/models/operations/Producer.md b/docs/models/operations/Producer.md new file mode 100644 index 00000000..23c5b53a --- /dev/null +++ b/docs/models/operations/Producer.md @@ -0,0 +1,12 @@ +# Producer + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 221 | +| `filter` | *Optional* | :heavy_minus_sign: | N/A | producer=221 | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Barry Mendel | +| `tagKey` | *Optional* | :heavy_minus_sign: | N/A | 5d776826961905001eb90e2b | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg | \ No newline at end of file diff --git a/docs/models/operations/Provider.md b/docs/models/operations/Provider.md new file mode 100644 index 00000000..fe99486b --- /dev/null +++ b/docs/models/operations/Provider.md @@ -0,0 +1,10 @@ +# Provider + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /system/search | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Local Network | +| `type` | *Optional* | :heavy_minus_sign: | N/A | mixed | \ No newline at end of file diff --git a/docs/models/operations/QueryParamOnlyTransient.md b/docs/models/operations/QueryParamOnlyTransient.md new file mode 100644 index 00000000..6c2e1403 --- /dev/null +++ b/docs/models/operations/QueryParamOnlyTransient.md @@ -0,0 +1,11 @@ +# QueryParamOnlyTransient + +Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamSmart.md b/docs/models/operations/QueryParamSmart.md new file mode 100644 index 00000000..bb53a11a --- /dev/null +++ b/docs/models/operations/QueryParamSmart.md @@ -0,0 +1,11 @@ +# QueryParamSmart + +type of playlists to return (default is all). + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamType.md b/docs/models/operations/QueryParamType.md new file mode 100644 index 00000000..c72a4f72 --- /dev/null +++ b/docs/models/operations/QueryParamType.md @@ -0,0 +1,12 @@ +# QueryParamType + +type of playlist to create + + +## Values + +| Name | Value | +| ------- | ------- | +| `AUDIO` | audio | +| `VIDEO` | video | +| `PHOTO` | photo | \ No newline at end of file diff --git a/docs/models/operations/Ratings.md b/docs/models/operations/Ratings.md new file mode 100644 index 00000000..5072fab4 --- /dev/null +++ b/docs/models/operations/Ratings.md @@ -0,0 +1,10 @@ +# Ratings + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `image` | *Optional* | :heavy_minus_sign: | N/A | themoviedb://image.rating | +| `value` | *Optional* | :heavy_minus_sign: | N/A | 7.4 | +| `type` | *Optional* | :heavy_minus_sign: | N/A | audience | \ No newline at end of file diff --git a/docs/models/operations/RefreshLibraryErrors.md b/docs/models/operations/RefreshLibraryErrors.md new file mode 100644 index 00000000..53ef46f9 --- /dev/null +++ b/docs/models/operations/RefreshLibraryErrors.md @@ -0,0 +1,10 @@ +# RefreshLibraryErrors + + +## 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/operations/RefreshLibraryRequest.md b/docs/models/operations/RefreshLibraryRequest.md new file mode 100644 index 00000000..b3e8d636 --- /dev/null +++ b/docs/models/operations/RefreshLibraryRequest.md @@ -0,0 +1,8 @@ +# RefreshLibraryRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `sectionId` | *double* | :heavy_check_mark: | the Id of the library to refresh | \ No newline at end of file diff --git a/docs/models/operations/RefreshLibraryResponse.md b/docs/models/operations/RefreshLibraryResponse.md new file mode 100644 index 00000000..a0950613 --- /dev/null +++ b/docs/models/operations/RefreshLibraryResponse.md @@ -0,0 +1,11 @@ +# RefreshLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/RefreshLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/RefreshLibraryResponseBody.md b/docs/models/operations/RefreshLibraryResponseBody.md new file mode 100644 index 00000000..7a77b69c --- /dev/null +++ b/docs/models/operations/RefreshLibraryResponseBody.md @@ -0,0 +1,10 @@ +# RefreshLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.RefreshLibraryErrors](../../models/operations/RefreshLibraryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Release.md b/docs/models/operations/Release.md new file mode 100644 index 00000000..1cd76487 --- /dev/null +++ b/docs/models/operations/Release.md @@ -0,0 +1,13 @@ +# Release + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | https://plex.tv/updater/releases/5136 | +| `version` | *Optional* | :heavy_minus_sign: | N/A | 1.40.0.7775-456fbaf97 | +| `added` | *Optional* | :heavy_minus_sign: | N/A | (PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.
(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)
(Music) Store track genres and add filtering options (#14653)
(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)
(View History) No longer create a view history entry for items marked as played (#10888)
(Web) Updated to 4.118.0 | +| `fixed` | *Optional* | :heavy_minus_sign: | N/A | (Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)
(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)
(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)
(Collection) Server could become unresponsive when collection membership changes (#14612)
(DVR) Previously watched recordings could be deleted without being watched again (#13779)
(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)
(Library) The Content Rating not equal to None filter does not work (#14620)
(Search) Album search results could contain all the album's tracks too (#14486)
(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)
(Transcoder) HW encoding would fail on devices with no rate control (#14222)
(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605) | +| `downloadURL` | *Optional* | :heavy_minus_sign: | N/A | https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx | +| `state` | *Optional* | :heavy_minus_sign: | N/A | notify | \ No newline at end of file diff --git a/docs/models/operations/Role.md b/docs/models/operations/Role.md new file mode 100644 index 00000000..3d666328 --- /dev/null +++ b/docs/models/operations/Role.md @@ -0,0 +1,8 @@ +# Role + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Paul Rudd | \ No newline at end of file diff --git a/docs/models/operations/Scope.md b/docs/models/operations/Scope.md new file mode 100644 index 00000000..dfa16809 --- /dev/null +++ b/docs/models/operations/Scope.md @@ -0,0 +1,10 @@ +# Scope + +`all` - This is the only supported `scope` parameter. + + +## Values + +| Name | Value | +| ----- | ----- | +| `ALL` | all | \ No newline at end of file diff --git a/docs/models/operations/SearchLibraryMediaContainer.md b/docs/models/operations/SearchLibraryMediaContainer.md new file mode 100644 index 00000000..83ab307a --- /dev/null +++ b/docs/models/operations/SearchLibraryMediaContainer.md @@ -0,0 +1,20 @@ +# SearchLibraryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | false | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1698860922 | +| `nocache` | *Optional* | :heavy_minus_sign: | N/A | true | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /:/resources/show.png | +| `title1` | *Optional* | :heavy_minus_sign: | N/A | TV Shows | +| `title2` | *Optional* | :heavy_minus_sign: | N/A | Search for '' | +| `viewGroup` | *Optional* | :heavy_minus_sign: | N/A | season | +| `viewMode` | *Optional* | :heavy_minus_sign: | N/A | 65593 | +| `metadata` | List<[lukehagar.plexapi.plexapi.models.operations.SearchLibraryMetadata](../../models/operations/SearchLibraryMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "2",
"key": "/library/metadata/2/children",
"parentRatingKey": "1",
"guid": "plex://season/602e67e766dfdb002c0a1b5b",
"parentGuid": "plex://show/5d9c086c7d06d9001ffd27aa",
"parentStudio": "Mutant Enemy Productions",
"type": "season",
"title": "Season 1",
"parentKey": "/library/metadata/1",
"parentTitle": "Firefly",
"summary": "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.",
"index": 1,
"parentIndex": 1,
"parentYear": 2002,
"thumb": "/library/metadata/2/thumb/1705636920",
"art": "/library/metadata/1/art/1705636920",
"parentThumb": "/library/metadata/1/thumb/1705636920",
"parentTheme": "/library/metadata/1/theme/1705636920",
"addedAt": 1705636916,
"updatedAt": 1705636920
}
] | \ No newline at end of file diff --git a/docs/models/operations/SearchLibraryMetadata.md b/docs/models/operations/SearchLibraryMetadata.md new file mode 100644 index 00000000..348ca67d --- /dev/null +++ b/docs/models/operations/SearchLibraryMetadata.md @@ -0,0 +1,27 @@ +# SearchLibraryMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/2/children | +| `parentRatingKey` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://season/602e67e766dfdb002c0a1b5b | +| `parentGuid` | *Optional* | :heavy_minus_sign: | N/A | plex://show/5d9c086c7d06d9001ffd27aa | +| `parentStudio` | *Optional* | :heavy_minus_sign: | N/A | Mutant Enemy Productions | +| `type` | *Optional* | :heavy_minus_sign: | N/A | season | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Season 1 | +| `parentKey` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/1 | +| `parentTitle` | *Optional* | :heavy_minus_sign: | N/A | Firefly | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship "Serenity". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government "The Alliance"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space. | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentIndex` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `parentYear` | *Optional* | :heavy_minus_sign: | N/A | 2002 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/2/thumb/1705636920 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/1/art/1705636920 | +| `parentThumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/1/thumb/1705636920 | +| `parentTheme` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705636916 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1705636920 | \ No newline at end of file diff --git a/docs/models/operations/SearchLibraryRequest.md b/docs/models/operations/SearchLibraryRequest.md new file mode 100644 index 00000000..51a83211 --- /dev/null +++ b/docs/models/operations/SearchLibraryRequest.md @@ -0,0 +1,9 @@ +# SearchLibraryRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `sectionId` | *long* | :heavy_check_mark: | the Id of the library to query | +| `type` | [lukehagar.plexapi.plexapi.models.operations.Type](../../models/operations/Type.md) | :heavy_check_mark: | Plex content type to search for | \ No newline at end of file diff --git a/docs/models/operations/SearchLibraryResponse.md b/docs/models/operations/SearchLibraryResponse.md new file mode 100644 index 00000000..0112bda8 --- /dev/null +++ b/docs/models/operations/SearchLibraryResponse.md @@ -0,0 +1,11 @@ +# SearchLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/SearchLibraryResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file diff --git a/docs/models/operations/SearchLibraryResponseBody.md b/docs/models/operations/SearchLibraryResponseBody.md new file mode 100644 index 00000000..642bd4d5 --- /dev/null +++ b/docs/models/operations/SearchLibraryResponseBody.md @@ -0,0 +1,10 @@ +# SearchLibraryResponseBody + +The contents of the library by section and type + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/SearchLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Server.md b/docs/models/operations/Server.md new file mode 100644 index 00000000..073d611d --- /dev/null +++ b/docs/models/operations/Server.md @@ -0,0 +1,18 @@ +# Server + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `name` | *Optional* | :heavy_minus_sign: | N/A | iPad | +| `host` | *Optional* | :heavy_minus_sign: | N/A | 10.10.10.102 | +| `address` | *Optional* | :heavy_minus_sign: | N/A | 10.10.10.102 | +| `port` | *Optional* | :heavy_minus_sign: | N/A | 32500 | +| `machineIdentifier` | *Optional* | :heavy_minus_sign: | N/A | A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05 | +| `version` | *Optional* | :heavy_minus_sign: | N/A | 8.17 | +| `protocol` | *Optional* | :heavy_minus_sign: | N/A | plex | +| `product` | *Optional* | :heavy_minus_sign: | N/A | Plex for iOS | +| `deviceClass` | *Optional* | :heavy_minus_sign: | N/A | tablet | +| `protocolVersion` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `protocolCapabilities` | *Optional* | :heavy_minus_sign: | N/A | playback,playqueues,timeline,provider-playback | \ No newline at end of file diff --git a/docs/models/operations/Session.md b/docs/models/operations/Session.md new file mode 100644 index 00000000..1d21f35a --- /dev/null +++ b/docs/models/operations/Session.md @@ -0,0 +1,10 @@ +# Session + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 93h7e00ncblxncqw9lkfaoxi | +| `bandwidth` | *Optional* | :heavy_minus_sign: | N/A | 1050 | +| `location` | *Optional* | :heavy_minus_sign: | N/A | lan | \ No newline at end of file diff --git a/docs/models/operations/Setting.md b/docs/models/operations/Setting.md new file mode 100644 index 00000000..8e0bebe3 --- /dev/null +++ b/docs/models/operations/Setting.md @@ -0,0 +1,17 @@ +# Setting + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | EnableDatabaseTrace | +| `label` | *Optional* | :heavy_minus_sign: | N/A | | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | | +| `type` | *Optional* | :heavy_minus_sign: | N/A | bool | +| `default_` | *Optional* | :heavy_minus_sign: | N/A | false | +| `value` | *Optional* | :heavy_minus_sign: | N/A | false | +| `hidden` | *Optional* | :heavy_minus_sign: | N/A | true | +| `advanced` | *Optional* | :heavy_minus_sign: | N/A | false | +| `group` | *Optional* | :heavy_minus_sign: | N/A | | +| `enumValues` | *Optional* | :heavy_minus_sign: | N/A | 1:admin only\|2:everyone | \ No newline at end of file diff --git a/docs/models/operations/Skip.md b/docs/models/operations/Skip.md new file mode 100644 index 00000000..5e71f0e6 --- /dev/null +++ b/docs/models/operations/Skip.md @@ -0,0 +1,11 @@ +# Skip + +Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Smart.md b/docs/models/operations/Smart.md new file mode 100644 index 00000000..a4d5e784 --- /dev/null +++ b/docs/models/operations/Smart.md @@ -0,0 +1,11 @@ +# Smart + +whether the playlist is smart or not + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Sort.md b/docs/models/operations/Sort.md new file mode 100644 index 00000000..00ae8b6e --- /dev/null +++ b/docs/models/operations/Sort.md @@ -0,0 +1,13 @@ +# Sort + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `default_` | *Optional* | :heavy_minus_sign: | N/A | asc | +| `defaultDirection` | *Optional* | :heavy_minus_sign: | N/A | desc | +| `descKey` | *Optional* | :heavy_minus_sign: | N/A | random:desc | +| `firstCharacterKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1/firstCharacter | +| `key` | *Optional* | :heavy_minus_sign: | N/A | random | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Randomly | \ No newline at end of file diff --git a/docs/models/operations/StartAllTasksErrors.md b/docs/models/operations/StartAllTasksErrors.md new file mode 100644 index 00000000..c18c98c8 --- /dev/null +++ b/docs/models/operations/StartAllTasksErrors.md @@ -0,0 +1,10 @@ +# StartAllTasksErrors + + +## 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/operations/StartAllTasksResponse.md b/docs/models/operations/StartAllTasksResponse.md new file mode 100644 index 00000000..eb0b1a94 --- /dev/null +++ b/docs/models/operations/StartAllTasksResponse.md @@ -0,0 +1,11 @@ +# StartAllTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/StartAllTasksResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/StartAllTasksResponseBody.md b/docs/models/operations/StartAllTasksResponseBody.md new file mode 100644 index 00000000..07022af3 --- /dev/null +++ b/docs/models/operations/StartAllTasksResponseBody.md @@ -0,0 +1,10 @@ +# StartAllTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.StartAllTasksErrors](../../models/operations/StartAllTasksErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/StartTaskErrors.md b/docs/models/operations/StartTaskErrors.md new file mode 100644 index 00000000..84dc2465 --- /dev/null +++ b/docs/models/operations/StartTaskErrors.md @@ -0,0 +1,10 @@ +# StartTaskErrors + + +## 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/operations/StartTaskRequest.md b/docs/models/operations/StartTaskRequest.md new file mode 100644 index 00000000..aeabe2ba --- /dev/null +++ b/docs/models/operations/StartTaskRequest.md @@ -0,0 +1,8 @@ +# StartTaskRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `taskName` | [lukehagar.plexapi.plexapi.models.operations.TaskName](../../models/operations/TaskName.md) | :heavy_check_mark: | the name of the task to be started. | \ No newline at end of file diff --git a/docs/models/operations/StartTaskResponse.md b/docs/models/operations/StartTaskResponse.md new file mode 100644 index 00000000..25cace1a --- /dev/null +++ b/docs/models/operations/StartTaskResponse.md @@ -0,0 +1,11 @@ +# StartTaskResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/StartTaskResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/StartTaskResponseBody.md b/docs/models/operations/StartTaskResponseBody.md new file mode 100644 index 00000000..32d42daa --- /dev/null +++ b/docs/models/operations/StartTaskResponseBody.md @@ -0,0 +1,10 @@ +# StartTaskResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.StartTaskErrors](../../models/operations/StartTaskErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/StartUniversalTranscodeErrors.md b/docs/models/operations/StartUniversalTranscodeErrors.md new file mode 100644 index 00000000..8ee3e29a --- /dev/null +++ b/docs/models/operations/StartUniversalTranscodeErrors.md @@ -0,0 +1,10 @@ +# StartUniversalTranscodeErrors + + +## 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/operations/StartUniversalTranscodeRequest.md b/docs/models/operations/StartUniversalTranscodeRequest.md new file mode 100644 index 00000000..4c07f461 --- /dev/null +++ b/docs/models/operations/StartUniversalTranscodeRequest.md @@ -0,0 +1,23 @@ +# StartUniversalTranscodeRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `hasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | +| `path` | *String* | :heavy_check_mark: | The path to the media item to transcode | +| `mediaIndex` | *double* | :heavy_check_mark: | The index of the media item to transcode | +| `partIndex` | *double* | :heavy_check_mark: | The index of the part to transcode | +| `protocol` | *String* | :heavy_check_mark: | The protocol to use for the transcode session | +| `fastSeek` | *Optional* | :heavy_minus_sign: | Whether to use fast seek or not | +| `directPlay` | *Optional* | :heavy_minus_sign: | Whether to use direct play or not | +| `directStream` | *Optional* | :heavy_minus_sign: | Whether to use direct stream or not | +| `subtitleSize` | *Optional* | :heavy_minus_sign: | The size of the subtitles | +| `subtites` | *Optional* | :heavy_minus_sign: | The subtitles | +| `audioBoost` | *Optional* | :heavy_minus_sign: | The audio boost | +| `location` | *Optional* | :heavy_minus_sign: | The location of the transcode session | +| `mediaBufferSize` | *Optional* | :heavy_minus_sign: | The size of the media buffer | +| `session` | *Optional* | :heavy_minus_sign: | The session ID | +| `addDebugOverlay` | *Optional* | :heavy_minus_sign: | Whether to add a debug overlay or not | +| `autoAdjustQuality` | *Optional* | :heavy_minus_sign: | Whether to auto adjust quality or not | \ No newline at end of file diff --git a/docs/models/operations/StartUniversalTranscodeResponse.md b/docs/models/operations/StartUniversalTranscodeResponse.md new file mode 100644 index 00000000..e84f1dfa --- /dev/null +++ b/docs/models/operations/StartUniversalTranscodeResponse.md @@ -0,0 +1,11 @@ +# StartUniversalTranscodeResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/StartUniversalTranscodeResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/StartUniversalTranscodeResponseBody.md b/docs/models/operations/StartUniversalTranscodeResponseBody.md new file mode 100644 index 00000000..cd9790ea --- /dev/null +++ b/docs/models/operations/StartUniversalTranscodeResponseBody.md @@ -0,0 +1,10 @@ +# StartUniversalTranscodeResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeErrors](../../models/operations/StartUniversalTranscodeErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/State.md b/docs/models/operations/State.md new file mode 100644 index 00000000..f4f712a5 --- /dev/null +++ b/docs/models/operations/State.md @@ -0,0 +1,12 @@ +# State + +The state of the media item + + +## Values + +| Name | Value | +| --------- | --------- | +| `PLAYING` | playing | +| `PAUSED` | paused | +| `STOPPED` | stopped | \ No newline at end of file diff --git a/docs/models/operations/StatisticsMedia.md b/docs/models/operations/StatisticsMedia.md new file mode 100644 index 00000000..a67be1df --- /dev/null +++ b/docs/models/operations/StatisticsMedia.md @@ -0,0 +1,14 @@ +# StatisticsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `accountID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `deviceID` | *Optional* | :heavy_minus_sign: | N/A | 13 | +| `timespan` | *Optional* | :heavy_minus_sign: | N/A | 4 | +| `at` | *Optional* | :heavy_minus_sign: | N/A | 1707141600 | +| `metadataType` | *Optional* | :heavy_minus_sign: | N/A | 4 | +| `count` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 1555 | \ No newline at end of file diff --git a/docs/models/operations/StopAllTasksErrors.md b/docs/models/operations/StopAllTasksErrors.md new file mode 100644 index 00000000..c140f8de --- /dev/null +++ b/docs/models/operations/StopAllTasksErrors.md @@ -0,0 +1,10 @@ +# StopAllTasksErrors + + +## 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/operations/StopAllTasksResponse.md b/docs/models/operations/StopAllTasksResponse.md new file mode 100644 index 00000000..97e367fc --- /dev/null +++ b/docs/models/operations/StopAllTasksResponse.md @@ -0,0 +1,11 @@ +# StopAllTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/StopAllTasksResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/StopAllTasksResponseBody.md b/docs/models/operations/StopAllTasksResponseBody.md new file mode 100644 index 00000000..2f2b1007 --- /dev/null +++ b/docs/models/operations/StopAllTasksResponseBody.md @@ -0,0 +1,10 @@ +# StopAllTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.StopAllTasksErrors](../../models/operations/StopAllTasksErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/StopTaskErrors.md b/docs/models/operations/StopTaskErrors.md new file mode 100644 index 00000000..525de390 --- /dev/null +++ b/docs/models/operations/StopTaskErrors.md @@ -0,0 +1,10 @@ +# StopTaskErrors + + +## 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/operations/StopTaskRequest.md b/docs/models/operations/StopTaskRequest.md new file mode 100644 index 00000000..7e84af8f --- /dev/null +++ b/docs/models/operations/StopTaskRequest.md @@ -0,0 +1,8 @@ +# StopTaskRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `taskName` | [lukehagar.plexapi.plexapi.models.operations.PathParamTaskName](../../models/operations/PathParamTaskName.md) | :heavy_check_mark: | The name of the task to be started. | \ No newline at end of file diff --git a/docs/models/operations/StopTaskResponse.md b/docs/models/operations/StopTaskResponse.md new file mode 100644 index 00000000..09dae435 --- /dev/null +++ b/docs/models/operations/StopTaskResponse.md @@ -0,0 +1,11 @@ +# StopTaskResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/StopTaskResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/StopTaskResponseBody.md b/docs/models/operations/StopTaskResponseBody.md new file mode 100644 index 00000000..6f36f78e --- /dev/null +++ b/docs/models/operations/StopTaskResponseBody.md @@ -0,0 +1,10 @@ +# StopTaskResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.StopTaskErrors](../../models/operations/StopTaskErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/StopTranscodeSessionErrors.md b/docs/models/operations/StopTranscodeSessionErrors.md new file mode 100644 index 00000000..c237071b --- /dev/null +++ b/docs/models/operations/StopTranscodeSessionErrors.md @@ -0,0 +1,10 @@ +# StopTranscodeSessionErrors + + +## 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/operations/StopTranscodeSessionRequest.md b/docs/models/operations/StopTranscodeSessionRequest.md new file mode 100644 index 00000000..863a31c0 --- /dev/null +++ b/docs/models/operations/StopTranscodeSessionRequest.md @@ -0,0 +1,8 @@ +# StopTranscodeSessionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `sessionKey` | *String* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep | \ No newline at end of file diff --git a/docs/models/operations/StopTranscodeSessionResponse.md b/docs/models/operations/StopTranscodeSessionResponse.md new file mode 100644 index 00000000..2d0dd858 --- /dev/null +++ b/docs/models/operations/StopTranscodeSessionResponse.md @@ -0,0 +1,11 @@ +# StopTranscodeSessionResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/StopTranscodeSessionResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/StopTranscodeSessionResponseBody.md b/docs/models/operations/StopTranscodeSessionResponseBody.md new file mode 100644 index 00000000..596baa18 --- /dev/null +++ b/docs/models/operations/StopTranscodeSessionResponseBody.md @@ -0,0 +1,10 @@ +# StopTranscodeSessionResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionErrors](../../models/operations/StopTranscodeSessionErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Stream.md b/docs/models/operations/Stream.md new file mode 100644 index 00000000..9ffcff4c --- /dev/null +++ b/docs/models/operations/Stream.md @@ -0,0 +1,39 @@ +# Stream + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 29 | +| `streamType` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `default_` | *Optional* | :heavy_minus_sign: | N/A | true | +| `codec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 128 | +| `bitDepth` | *Optional* | :heavy_minus_sign: | N/A | 8 | +| `chromaLocation` | *Optional* | :heavy_minus_sign: | N/A | left | +| `chromaSubsampling` | *Optional* | :heavy_minus_sign: | N/A | 14520 | +| `codedHeight` | *Optional* | :heavy_minus_sign: | N/A | 816 | +| `codedWidth` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `colorPrimaries` | *Optional* | :heavy_minus_sign: | N/A | bt709 | +| `colorRange` | *Optional* | :heavy_minus_sign: | N/A | tv | +| `colorSpace` | *Optional* | :heavy_minus_sign: | N/A | bt709 | +| `colorTrc` | *Optional* | :heavy_minus_sign: | N/A | bt709 | +| `frameRate` | *Optional* | :heavy_minus_sign: | N/A | 24 | +| `hasScalingMatrix` | *Optional* | :heavy_minus_sign: | N/A | false | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 814 | +| `level` | *Optional* | :heavy_minus_sign: | N/A | 40 | +| `profile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `refFrames` | *Optional* | :heavy_minus_sign: | N/A | 4 | +| `scanType` | *Optional* | :heavy_minus_sign: | N/A | progressive | +| `streamIdentifier` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `displayTitle` | *Optional* | :heavy_minus_sign: | N/A | English (AAC Stereo) | +| `extendedDisplayTitle` | *Optional* | :heavy_minus_sign: | N/A | English (AAC Stereo) | +| `selected` | *Optional* | :heavy_minus_sign: | N/A | true | +| `channels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `language` | *Optional* | :heavy_minus_sign: | N/A | English | +| `languageTag` | *Optional* | :heavy_minus_sign: | N/A | en | +| `languageCode` | *Optional* | :heavy_minus_sign: | N/A | eng | +| `samplingRate` | *Optional* | :heavy_minus_sign: | N/A | 44100 | \ No newline at end of file diff --git a/docs/models/operations/Tag.md b/docs/models/operations/Tag.md new file mode 100644 index 00000000..19a3a0df --- /dev/null +++ b/docs/models/operations/Tag.md @@ -0,0 +1,28 @@ +# Tag + +A key representing a specific tag within the section. + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `ALL` | all | +| `UNWATCHED` | unwatched | +| `NEWEST` | newest | +| `RECENTLY_ADDED` | recentlyAdded | +| `RECENTLY_VIEWED` | recentlyViewed | +| `ON_DECK` | onDeck | +| `COLLECTION` | collection | +| `EDITION` | edition | +| `GENRE` | genre | +| `YEAR` | year | +| `DECADE` | decade | +| `DIRECTOR` | director | +| `ACTOR` | actor | +| `COUNTRY` | country | +| `CONTENT_RATING` | contentRating | +| `RATING` | rating | +| `RESOLUTION` | resolution | +| `FIRST_CHARACTER` | firstCharacter | +| `FOLDER` | folder | \ No newline at end of file diff --git a/docs/models/operations/TaskName.md b/docs/models/operations/TaskName.md new file mode 100644 index 00000000..44383b38 --- /dev/null +++ b/docs/models/operations/TaskName.md @@ -0,0 +1,23 @@ +# TaskName + +the name of the task to be started. + + +## Values + +| Name | Value | +| ----------------------------- | ----------------------------- | +| `BACKUP_DATABASE` | BackupDatabase | +| `BUILD_GRACENOTE_COLLECTIONS` | BuildGracenoteCollections | +| `CHECK_FOR_UPDATES` | CheckForUpdates | +| `CLEAN_OLD_BUNDLES` | CleanOldBundles | +| `CLEAN_OLD_CACHE_FILES` | CleanOldCacheFiles | +| `DEEP_MEDIA_ANALYSIS` | DeepMediaAnalysis | +| `GENERATE_AUTO_TAGS` | GenerateAutoTags | +| `GENERATE_CHAPTER_THUMBS` | GenerateChapterThumbs | +| `GENERATE_MEDIA_INDEX_FILES` | GenerateMediaIndexFiles | +| `OPTIMIZE_DATABASE` | OptimizeDatabase | +| `REFRESH_LIBRARIES` | RefreshLibraries | +| `REFRESH_LOCAL_MEDIA` | RefreshLocalMedia | +| `REFRESH_PERIODIC_METADATA` | RefreshPeriodicMetadata | +| `UPGRADE_MEDIA_ANALYSIS` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/Tonight.md b/docs/models/operations/Tonight.md new file mode 100644 index 00000000..7bf98ba0 --- /dev/null +++ b/docs/models/operations/Tonight.md @@ -0,0 +1,11 @@ +# Tonight + +Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/TranscodeSession.md b/docs/models/operations/TranscodeSession.md new file mode 100644 index 00000000..f410d38e --- /dev/null +++ b/docs/models/operations/TranscodeSession.md @@ -0,0 +1,31 @@ +# TranscodeSession + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `key` | *Optional* | :heavy_minus_sign: | N/A | vv3i2q2lax92qlzul1hbd4bx | +| `throttled` | *Optional* | :heavy_minus_sign: | N/A | false | +| `complete` | *Optional* | :heavy_minus_sign: | N/A | false | +| `progress` | *Optional* | :heavy_minus_sign: | N/A | 1.7999999523162842 | +| `size` | *Optional* | :heavy_minus_sign: | N/A | -22 | +| `speed` | *Optional* | :heavy_minus_sign: | N/A | 25.100000381469727 | +| `error` | *Optional* | :heavy_minus_sign: | N/A | false | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 1445695 | +| `remaining` | *Optional* | :heavy_minus_sign: | N/A | 53 | +| `context` | *Optional* | :heavy_minus_sign: | N/A | streaming | +| `sourceVideoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | +| `sourceAudioCodec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `videoDecision` | *Optional* | :heavy_minus_sign: | N/A | transcode | +| `audioDecision` | *Optional* | :heavy_minus_sign: | N/A | transcode | +| `subtitleDecision` | *Optional* | :heavy_minus_sign: | N/A | burn | +| `protocol` | *Optional* | :heavy_minus_sign: | N/A | http | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mkv | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | opus | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `transcodeHwRequested` | *Optional* | :heavy_minus_sign: | N/A | true | +| `timeStamp` | *Optional* | :heavy_minus_sign: | N/A | 1.7058958054919229e+09 | +| `maxOffsetAvailable` | *Optional* | :heavy_minus_sign: | N/A | 29.53 | +| `minOffsetAvailable` | *Optional* | :heavy_minus_sign: | N/A | 3.003000020980835 | \ No newline at end of file diff --git a/docs/models/operations/Type.md b/docs/models/operations/Type.md new file mode 100644 index 00000000..8cfa2e45 --- /dev/null +++ b/docs/models/operations/Type.md @@ -0,0 +1,13 @@ +# Type + +Plex content type to search for + + +## Values + +| Name | Value | +| ------- | ------- | +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | +| `FOUR` | 4 | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlayProgressErrors.md b/docs/models/operations/UpdatePlayProgressErrors.md new file mode 100644 index 00000000..5dfceded --- /dev/null +++ b/docs/models/operations/UpdatePlayProgressErrors.md @@ -0,0 +1,10 @@ +# UpdatePlayProgressErrors + + +## 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/operations/UpdatePlayProgressRequest.md b/docs/models/operations/UpdatePlayProgressRequest.md new file mode 100644 index 00000000..9a66f8f9 --- /dev/null +++ b/docs/models/operations/UpdatePlayProgressRequest.md @@ -0,0 +1,10 @@ +# UpdatePlayProgressRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `key` | *String* | :heavy_check_mark: | the media key | +| `time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | +| `state` | *String* | :heavy_check_mark: | The playback state of the media item. | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlayProgressResponse.md b/docs/models/operations/UpdatePlayProgressResponse.md new file mode 100644 index 00000000..3152f9f9 --- /dev/null +++ b/docs/models/operations/UpdatePlayProgressResponse.md @@ -0,0 +1,11 @@ +# UpdatePlayProgressResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/UpdatePlayProgressResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlayProgressResponseBody.md b/docs/models/operations/UpdatePlayProgressResponseBody.md new file mode 100644 index 00000000..9404b433 --- /dev/null +++ b/docs/models/operations/UpdatePlayProgressResponseBody.md @@ -0,0 +1,10 @@ +# UpdatePlayProgressResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressErrors](../../models/operations/UpdatePlayProgressErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlaylistErrors.md b/docs/models/operations/UpdatePlaylistErrors.md new file mode 100644 index 00000000..af6ff2aa --- /dev/null +++ b/docs/models/operations/UpdatePlaylistErrors.md @@ -0,0 +1,10 @@ +# UpdatePlaylistErrors + + +## 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/operations/UpdatePlaylistRequest.md b/docs/models/operations/UpdatePlaylistRequest.md new file mode 100644 index 00000000..730d4feb --- /dev/null +++ b/docs/models/operations/UpdatePlaylistRequest.md @@ -0,0 +1,10 @@ +# UpdatePlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | +| `title` | *Optional* | :heavy_minus_sign: | name of the playlist | +| `summary` | *Optional* | :heavy_minus_sign: | summary description of the playlist | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlaylistResponse.md b/docs/models/operations/UpdatePlaylistResponse.md new file mode 100644 index 00000000..7e166c81 --- /dev/null +++ b/docs/models/operations/UpdatePlaylistResponse.md @@ -0,0 +1,11 @@ +# UpdatePlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/UpdatePlaylistResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlaylistResponseBody.md b/docs/models/operations/UpdatePlaylistResponseBody.md new file mode 100644 index 00000000..2eaaa256 --- /dev/null +++ b/docs/models/operations/UpdatePlaylistResponseBody.md @@ -0,0 +1,10 @@ +# UpdatePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistErrors](../../models/operations/UpdatePlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UploadPlaylistErrors.md b/docs/models/operations/UploadPlaylistErrors.md new file mode 100644 index 00000000..bf15816f --- /dev/null +++ b/docs/models/operations/UploadPlaylistErrors.md @@ -0,0 +1,10 @@ +# UploadPlaylistErrors + + +## 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/operations/UploadPlaylistRequest.md b/docs/models/operations/UploadPlaylistRequest.md new file mode 100644 index 00000000..619b645e --- /dev/null +++ b/docs/models/operations/UploadPlaylistRequest.md @@ -0,0 +1,9 @@ +# UploadPlaylistRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | +| `force` | [lukehagar.plexapi.plexapi.models.operations.Force](../../models/operations/Force.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | \ No newline at end of file diff --git a/docs/models/operations/UploadPlaylistResponse.md b/docs/models/operations/UploadPlaylistResponse.md new file mode 100644 index 00000000..f3f414b9 --- /dev/null +++ b/docs/models/operations/UploadPlaylistResponse.md @@ -0,0 +1,11 @@ +# UploadPlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/UploadPlaylistResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file diff --git a/docs/models/operations/UploadPlaylistResponseBody.md b/docs/models/operations/UploadPlaylistResponseBody.md new file mode 100644 index 00000000..128ca61d --- /dev/null +++ b/docs/models/operations/UploadPlaylistResponseBody.md @@ -0,0 +1,10 @@ +# UploadPlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List<[lukehagar.plexapi.plexapi.models.operations.UploadPlaylistErrors](../../models/operations/UploadPlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Upscale.md b/docs/models/operations/Upscale.md new file mode 100644 index 00000000..1622f51f --- /dev/null +++ b/docs/models/operations/Upscale.md @@ -0,0 +1,11 @@ +# Upscale + +allow images to be resized beyond native dimensions. + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/User.md b/docs/models/operations/User.md new file mode 100644 index 00000000..ea240269 --- /dev/null +++ b/docs/models/operations/User.md @@ -0,0 +1,10 @@ +# User + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Blindkitty38 | \ No newline at end of file diff --git a/docs/models/operations/Writer.md b/docs/models/operations/Writer.md new file mode 100644 index 00000000..0eaada5e --- /dev/null +++ b/docs/models/operations/Writer.md @@ -0,0 +1,8 @@ +# Writer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Jeff Loveness | \ No newline at end of file diff --git a/docs/models/shared/Security.md b/docs/models/shared/Security.md new file mode 100644 index 00000000..751e411e --- /dev/null +++ b/docs/models/shared/Security.md @@ -0,0 +1,8 @@ +# Security + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `accessToken` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..1af9e093 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 00000000..1aa94a42 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100755 index 00000000..93e3f59f --- /dev/null +++ b/gradlew.bat @@ -0,0 +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 diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..6942dacd --- /dev/null +++ b/settings.gradle @@ -0,0 +1,10 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user manual at https://docs.gradle.org/7.5.1/userguide/multi_project_builds.html + */ + +rootProject.name = 'plexapi' diff --git a/src/main/java/lukehagar/plexapi/plexapi/Activities.java b/src/main/java/lukehagar/plexapi/plexapi/Activities.java new file mode 100644 index 00000000..41dae91b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Activities.java @@ -0,0 +1,188 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: + * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. + * - They must contain an `type` which is used by clients to distinguish the specific activity. + * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) + * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * + */ +public class Activities implements + MethodCallGetServerActivities, + MethodCallCancelServerActivities { + + private final SDKConfiguration sdkConfiguration; + + Activities(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesRequestBuilder getServerActivities() { + return new lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesRequestBuilder(this); + } + + /** + * Get Server Activities + * Get Server Activities + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse getServerActivitiesDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/activities"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesActivitiesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequestBuilder cancelServerActivities() { + return new lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequestBuilder(this); + } + + /** + * Cancel Server Activities + * Cancel Server Activities + * @param activityUUID The UUID of the activity to cancel. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse cancelServerActivities( + String activityUUID) throws Exception { + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequest request = + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequest + .builder() + .activityUUID(activityUUID) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesRequest.class, + baseUrl, + "/activities/{activityUUID}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("DELETE"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Authentication.java b/src/main/java/lukehagar/plexapi/plexapi/Authentication.java new file mode 100644 index 00000000..18b4d423 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Authentication.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls regarding authentication for Plex Media Server + * + */ +public class Authentication implements + MethodCallGetTransientToken, + MethodCallGetSourceConnectionInformation { + + private final SDKConfiguration sdkConfiguration; + + Authentication(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequestBuilder getTransientToken() { + return new lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequestBuilder(this); + } + + /** + * Get a Transient Token. + * This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + * + * @param type `delegation` - This is the only supported `type` parameter. + * @param scope `all` - This is the only supported `scope` parameter. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse getTransientToken( + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenQueryParamType type, + lukehagar.plexapi.plexapi.models.operations.Scope scope) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequest request = + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequest + .builder() + .type(type) + .scope(scope) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/security/token"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequestBuilder getSourceConnectionInformation() { + return new lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequestBuilder(this); + } + + /** + * Get Source Connection Information + * If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + * Note: requires Plex Media Server >= 1.15.4. + * + * @param source The source identifier with an included prefix. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse getSourceConnectionInformation( + String source) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequest request = + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequest + .builder() + .source(source) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/security/resources"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Butler.java b/src/main/java/lukehagar/plexapi/plexapi/Butler.java new file mode 100644 index 00000000..4f12d058 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Butler.java @@ -0,0 +1,396 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Butler is the task manager of the Plex Media Server Ecosystem. + * + */ +public class Butler implements + MethodCallGetButlerTasks, + MethodCallStartAllTasks, + MethodCallStopAllTasks, + MethodCallStartTask, + MethodCallStopTask { + + private final SDKConfiguration sdkConfiguration; + + Butler(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetButlerTasksRequestBuilder getButlerTasks() { + return new lukehagar.plexapi.plexapi.models.operations.GetButlerTasksRequestBuilder(this); + } + + /** + * Get Butler tasks + * Returns a list of butler tasks + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse getButlerTasksDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/butler"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetButlerTasksButlerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.StartAllTasksRequestBuilder startAllTasks() { + return new lukehagar.plexapi.plexapi.models.operations.StartAllTasksRequestBuilder(this); + } + + /** + * Start all Butler tasks + * This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * 1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + * + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse startAllTasksDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/butler"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.StopAllTasksRequestBuilder stopAllTasks() { + return new lukehagar.plexapi.plexapi.models.operations.StopAllTasksRequestBuilder(this); + } + + /** + * Stop all Butler tasks + * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. + * + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse stopAllTasksDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/butler"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("DELETE"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.StartTaskRequestBuilder startTask() { + return new lukehagar.plexapi.plexapi.models.operations.StartTaskRequestBuilder(this); + } + + /** + * Start a single Butler task + * This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * 1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + * + * @param taskName the name of the task to be started. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.StartTaskResponse startTask( + lukehagar.plexapi.plexapi.models.operations.TaskName taskName) throws Exception { + lukehagar.plexapi.plexapi.models.operations.StartTaskRequest request = + lukehagar.plexapi.plexapi.models.operations.StartTaskRequest + .builder() + .taskName(taskName) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.StartTaskRequest.class, + baseUrl, + "/butler/{taskName}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.StartTaskResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.StartTaskResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.StartTaskResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 202 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.StartTaskResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.StopTaskRequestBuilder stopTask() { + return new lukehagar.plexapi.plexapi.models.operations.StopTaskRequestBuilder(this); + } + + /** + * Stop a single Butler task + * This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + * + * @param taskName The name of the task to be started. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.StopTaskResponse stopTask( + lukehagar.plexapi.plexapi.models.operations.PathParamTaskName taskName) throws Exception { + lukehagar.plexapi.plexapi.models.operations.StopTaskRequest request = + lukehagar.plexapi.plexapi.models.operations.StopTaskRequest + .builder() + .taskName(taskName) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.StopTaskRequest.class, + baseUrl, + "/butler/{taskName}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("DELETE"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.StopTaskResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.StopTaskResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.StopTaskResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400 || httpRes.statusCode() == 404) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.StopTaskResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Hubs.java b/src/main/java/lukehagar/plexapi/plexapi/Hubs.java new file mode 100644 index 00000000..9eb4947b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Hubs.java @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * + */ +public class Hubs implements + MethodCallGetGlobalHubs, + MethodCallGetLibraryHubs { + + private final SDKConfiguration sdkConfiguration; + + Hubs(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequestBuilder getGlobalHubs() { + return new lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequestBuilder(this); + } + + /** + * Get Global Hubs + * Get Global Hubs filtered by the parameters provided. + * @param count The number of items to return with each hub. + * @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse getGlobalHubs( + Optional count, + Optional onlyTransient) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequest request = + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequest + .builder() + .count(count) + .onlyTransient(onlyTransient) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/hubs"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsHubsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequestBuilder getLibraryHubs() { + return new lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequestBuilder(this); + } + + /** + * Get library specific hubs + * This endpoint will return a list of library specific hubs + * + * @param sectionId the Id of the library to query + * @param count The number of items to return with each hub. + * @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse getLibraryHubs( + double sectionId, + Optional count, + Optional onlyTransient) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest request = + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest + .builder() + .sectionId(sectionId) + .count(count) + .onlyTransient(onlyTransient) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest.class, + baseUrl, + "/hubs/sections/{sectionId}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsHubsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Library.java b/src/main/java/lukehagar/plexapi/plexapi/Library.java new file mode 100644 index 00000000..c8c4d92a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Library.java @@ -0,0 +1,1001 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls interacting with Plex Media Server Libraries + * + */ +public class Library implements + MethodCallGetFileHash, + MethodCallGetRecentlyAdded, + MethodCallGetLibraries, + MethodCallGetLibrary, + MethodCallDeleteLibrary, + MethodCallGetLibraryItems, + MethodCallRefreshLibrary, + MethodCallSearchLibrary, + MethodCallGetMetadata, + MethodCallGetMetadataChildren, + MethodCallGetOnDeck { + + private final SDKConfiguration sdkConfiguration; + + Library(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetFileHashRequestBuilder getFileHash() { + return new lukehagar.plexapi.plexapi.models.operations.GetFileHashRequestBuilder(this); + } + + /** + * Get Hash Value + * This resource returns hash values for local files + * @param url This is the path to the local file, must be prefixed by `file://` + * @param type Item type + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetFileHashResponse getFileHash( + String url, + Optional type) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetFileHashRequest request = + lukehagar.plexapi.plexapi.models.operations.GetFileHashRequest + .builder() + .url(url) + .type(type) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/library/hashes"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetFileHashRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetFileHashResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetFileHashResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetFileHashResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetFileHashResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedRequestBuilder getRecentlyAdded() { + return new lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedRequestBuilder(this); + } + + /** + * Get Recently Added + * This endpoint will return the recently added content. + * + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedResponse getRecentlyAddedDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/library/recentlyAdded"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetLibrariesRequestBuilder getLibraries() { + return new lukehagar.plexapi.plexapi.models.operations.GetLibrariesRequestBuilder(this); + } + + /** + * Get All Libraries + * A library section (commonly referred to as just a library) is a collection of media. + * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. + * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + * + * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. + * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). + * + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetLibrariesResponse getLibrariesDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/library/sections"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetLibrariesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetLibrariesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetLibrariesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetLibrariesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetLibrariesLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetLibraryRequestBuilder getLibrary() { + return new lukehagar.plexapi.plexapi.models.operations.GetLibraryRequestBuilder(this); + } + + /** + * Get Library Details + * ## Library Details Endpoint + * + * This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. + * + * The details include: + * + * ### Directories + * Organized into three categories: + * + * - **Primary Directories**: + * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). + * - Most can be replicated via media queries. + * - Customizable by users. + * + * - **Secondary Directories**: + * - Marked with `secondary="1"`. + * - Used in older clients for structured navigation. + * + * - **Special Directories**: + * - Includes a "By Folder" entry for filesystem-based browsing. + * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. + * + * ### Types + * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + * + * - **Type Object Attributes**: + * - `key`: Endpoint for the media list of this type. + * - `type`: Metadata type (if standard Plex type). + * - `title`: Title for this content type (e.g., "Movies"). + * + * - **Filter Objects**: + * - Subset of the media query language. + * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + * + * - **Sort Objects**: + * - Description of sort fields. + * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + * + * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + * + * @param sectionId the Id of the library to query + * @param includeDetails Whether or not to include details for a section (types, filters, and sorts). + Only exists for backwards compatibility, media providers other than the server libraries have it on always. + + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetLibraryResponse getLibrary( + double sectionId, + Optional includeDetails) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetLibraryRequest request = + lukehagar.plexapi.plexapi.models.operations.GetLibraryRequest + .builder() + .sectionId(sectionId) + .includeDetails(includeDetails) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetLibraryRequest.class, + baseUrl, + "/library/sections/{sectionId}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetLibraryRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetLibraryResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetLibraryResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetLibraryResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetLibraryLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.DeleteLibraryRequestBuilder deleteLibrary() { + return new lukehagar.plexapi.plexapi.models.operations.DeleteLibraryRequestBuilder(this); + } + + /** + * Delete Library Section + * Delate a library using a specific section + * @param sectionId the Id of the library to query + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.DeleteLibraryResponse deleteLibrary( + double sectionId) throws Exception { + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryRequest request = + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryRequest + .builder() + .sectionId(sectionId) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryRequest.class, + baseUrl, + "/library/sections/{sectionId}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("DELETE"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsRequestBuilder getLibraryItems() { + return new lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsRequestBuilder(this); + } + + /** + * Get Library Items + * Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: + * - `all`: All items in the section. + * - `unwatched`: Items that have not been played. + * - `newest`: Items that are recently released. + * - `recentlyAdded`: Items that are recently added to the library. + * - `recentlyViewed`: Items that were recently viewed. + * - `onDeck`: Items to continue watching. + * - `collection`: Items categorized by collection. + * - `edition`: Items categorized by edition. + * - `genre`: Items categorized by genre. + * - `year`: Items categorized by year of release. + * - `decade`: Items categorized by decade. + * - `director`: Items categorized by director. + * - `actor`: Items categorized by starring actor. + * - `country`: Items categorized by country of origin. + * - `contentRating`: Items categorized by content rating. + * - `rating`: Items categorized by rating. + * - `resolution`: Items categorized by resolution. + * - `firstCharacter`: Items categorized by the first letter. + * - `folder`: Items categorized by folder. + * + * @param sectionId the Id of the library to query + * @param tag A key representing a specific tag within the section. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsResponse getLibraryItems( + long sectionId, + lukehagar.plexapi.plexapi.models.operations.Tag tag) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsRequest request = + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsRequest + .builder() + .sectionId(sectionId) + .tag(tag) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsRequest.class, + baseUrl, + "/library/sections/{sectionId}/{tag}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.RefreshLibraryRequestBuilder refreshLibrary() { + return new lukehagar.plexapi.plexapi.models.operations.RefreshLibraryRequestBuilder(this); + } + + /** + * Refresh Library + * This endpoint Refreshes the library. + * + * @param sectionId the Id of the library to refresh + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.RefreshLibraryResponse refreshLibrary( + double sectionId) throws Exception { + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryRequest request = + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryRequest + .builder() + .sectionId(sectionId) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryRequest.class, + baseUrl, + "/library/sections/{sectionId}/refresh", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.SearchLibraryRequestBuilder searchLibrary() { + return new lukehagar.plexapi.plexapi.models.operations.SearchLibraryRequestBuilder(this); + } + + /** + * Search Library + * Search for content within a specific section of the library. + * + * ### Types + * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + * + * - **Type Object Attributes**: + * - `type`: Metadata type (if standard Plex type). + * - `title`: Title for this content type (e.g., "Movies"). + * + * - **Filter Objects**: + * - Subset of the media query language. + * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + * + * - **Sort Objects**: + * - Description of sort fields. + * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + * + * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + * + * @param sectionId the Id of the library to query + * @param type Plex content type to search for + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.SearchLibraryResponse searchLibrary( + long sectionId, + lukehagar.plexapi.plexapi.models.operations.Type type) throws Exception { + lukehagar.plexapi.plexapi.models.operations.SearchLibraryRequest request = + lukehagar.plexapi.plexapi.models.operations.SearchLibraryRequest + .builder() + .sectionId(sectionId) + .type(type) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.SearchLibraryRequest.class, + baseUrl, + "/library/sections/{sectionId}/search", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.SearchLibraryRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.SearchLibraryResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.SearchLibraryResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.SearchLibraryResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.SearchLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetMetadataRequestBuilder getMetadata() { + return new lukehagar.plexapi.plexapi.models.operations.GetMetadataRequestBuilder(this); + } + + /** + * Get Items Metadata + * This endpoint will return the metadata of a library item specified with the ratingKey. + * + * @param ratingKey the id of the library item to return the children of. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetMetadataResponse getMetadata( + double ratingKey) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetMetadataRequest request = + lukehagar.plexapi.plexapi.models.operations.GetMetadataRequest + .builder() + .ratingKey(ratingKey) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetMetadataRequest.class, + baseUrl, + "/library/metadata/{ratingKey}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetMetadataResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetMetadataResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetMetadataResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetMetadataResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetMetadataLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenRequestBuilder getMetadataChildren() { + return new lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenRequestBuilder(this); + } + + /** + * Get Items Children + * This endpoint will return the children of of a library item specified with the ratingKey. + * + * @param ratingKey the id of the library item to return the children of. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenResponse getMetadataChildren( + double ratingKey) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenRequest request = + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenRequest + .builder() + .ratingKey(ratingKey) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenRequest.class, + baseUrl, + "/library/metadata/{ratingKey}/children", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetOnDeckRequestBuilder getOnDeck() { + return new lukehagar.plexapi.plexapi.models.operations.GetOnDeckRequestBuilder(this); + } + + /** + * Get On Deck + * This endpoint will return the on deck content. + * + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetOnDeckResponse getOnDeckDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/library/onDeck"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetOnDeckResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetOnDeckResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetOnDeckResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetOnDeckResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetOnDeckLibraryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Log.java b/src/main/java/lukehagar/plexapi/plexapi/Log.java new file mode 100644 index 00000000..2f100e02 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Log.java @@ -0,0 +1,289 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.SerializedBody; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Submit logs to the Log Handler for Plex Media Server + * + */ +public class Log implements + MethodCallLogLine, + MethodCallLogMultiLine, + MethodCallEnablePaperTrail { + + private final SDKConfiguration sdkConfiguration; + + Log(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.LogLineRequestBuilder logLine() { + return new lukehagar.plexapi.plexapi.models.operations.LogLineRequestBuilder(this); + } + + /** + * Logging a single line message. + * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + * + * @param level An integer log level to write to the PMS log with. + 0: Error + 1: Warning + 2: Info + 3: Debug + 4: Verbose + + * @param message The text of the message to write to the log. + * @param source a string indicating the source of the message. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.LogLineResponse logLine( + lukehagar.plexapi.plexapi.models.operations.Level level, + String message, + String source) throws Exception { + lukehagar.plexapi.plexapi.models.operations.LogLineRequest request = + lukehagar.plexapi.plexapi.models.operations.LogLineRequest + .builder() + .level(level) + .message(message) + .source(source) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/log"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.LogLineRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.LogLineResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.LogLineResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.LogLineResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.LogLineResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.LogMultiLineRequestBuilder logMultiLine() { + return new lukehagar.plexapi.plexapi.models.operations.LogMultiLineRequestBuilder(this); + } + + /** + * Logging a multi-line message + * This endpoint allows for the batch addition of log entries to the main Plex Media Server log. + * It accepts a text/plain request body, where each line represents a distinct log entry. + * Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. + * + * Log entries are separated by a newline character (`\n`). + * Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. + * This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. + * + * The 'level' parameter specifies the log entry's severity or importance, with the following integer values: + * - `0`: Error - Critical issues that require immediate attention. + * - `1`: Warning - Important events that are not critical but may indicate potential issues. + * - `2`: Info - General informational messages about system operation. + * - `3`: Debug - Detailed information useful for debugging purposes. + * - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. + * + * The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). + * + * Example of a single log entry format: + * `level=4&message=Sample%20log%20entry&source=applicationName` + * + * Ensure each parameter is properly URL-encoded to avoid interpretation issues. + * + * @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 lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse logMultiLine( + String request) throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/log"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody serializedRequestBody = lukehagar.plexapi.plexapi.utils.Utils.serializeRequestBody( + _convertedRequest, "request", "string", false); + if (serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + req.setBody(serializedRequestBody); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailRequestBuilder enablePaperTrail() { + return new lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailRequestBuilder(this); + } + + /** + * Enabling Papertrail + * This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + * + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse enablePaperTrailDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/log/networked"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400 || httpRes.statusCode() == 403) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Media.java b/src/main/java/lukehagar/plexapi/plexapi/Media.java new file mode 100644 index 00000000..f08a63de --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Media.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls interacting with Plex Media Server Media + * + */ +public class Media implements + MethodCallMarkPlayed, + MethodCallMarkUnplayed, + MethodCallUpdatePlayProgress { + + private final SDKConfiguration sdkConfiguration; + + Media(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequestBuilder markPlayed() { + return new lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequestBuilder(this); + } + + /** + * Mark Media Played + * This will mark the provided media key as Played. + * @param key The media key to mark as played + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse markPlayed( + double key) throws Exception { + lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequest request = + lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequest + .builder() + .key(key) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/:/scrobble"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.MarkPlayedRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequestBuilder markUnplayed() { + return new lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequestBuilder(this); + } + + /** + * Mark Media Unplayed + * This will mark the provided media key as Unplayed. + * @param key The media key to mark as Unplayed + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse markUnplayed( + double key) throws Exception { + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequest request = + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequest + .builder() + .key(key) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/:/unscrobble"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequestBuilder updatePlayProgress() { + return new lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequestBuilder(this); + } + + /** + * Update Media Play Progress + * This API command can be used to update the play progress of a media item. + * + * @param key the media key + * @param time The time, in milliseconds, used to set the media playback progress. + * @param state The playback state of the media item. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse updatePlayProgress( + String key, + double time, + String state) throws Exception { + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequest request = + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequest + .builder() + .key(key) + .time(time) + .state(state) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/:/progress"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Playlists.java b/src/main/java/lukehagar/plexapi/plexapi/Playlists.java new file mode 100644 index 00000000..f3a75262 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Playlists.java @@ -0,0 +1,836 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). + * They can be organized in (optionally nesting) folders. + * Retrieving a playlist, or its items, will trigger a refresh of its metadata. + * This may cause the duration and number of items to change. + * + */ +public class Playlists implements + MethodCallCreatePlaylist, + MethodCallGetPlaylists, + MethodCallGetPlaylist, + MethodCallDeletePlaylist, + MethodCallUpdatePlaylist, + MethodCallGetPlaylistContents, + MethodCallClearPlaylistContents, + MethodCallAddPlaylistContents, + MethodCallUploadPlaylist { + + private final SDKConfiguration sdkConfiguration; + + Playlists(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequestBuilder createPlaylist() { + return new lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequestBuilder(this); + } + + /** + * Create a Playlist + * Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: + * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). + * - `playQueueID` - To create a playlist from an existing play queue. + * + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse createPlaylist( + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequest request) throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/playlists"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistPlaylistsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequestBuilder getPlaylists() { + return new lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequestBuilder(this); + } + + /** + * Get All Playlists + * Get All Playlists given the specified filters. + * @param playlistType limit to a type of playlist. + * @param smart type of playlists to return (default is all). + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse getPlaylists( + Optional playlistType, + Optional smart) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequest request = + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequest + .builder() + .playlistType(playlistType) + .smart(smart) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/playlists"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsPlaylistsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequestBuilder getPlaylist() { + return new lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequestBuilder(this); + } + + /** + * Retrieve Playlist + * Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + * + * @param playlistID the ID of the playlist + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse getPlaylist( + double playlistID) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequest request = + lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequest + .builder() + .playlistID(playlistID) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetPlaylistRequest.class, + baseUrl, + "/playlists/{playlistID}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistPlaylistsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequestBuilder deletePlaylist() { + return new lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequestBuilder(this); + } + + /** + * Deletes a Playlist + * This endpoint will delete a playlist + * + * @param playlistID the ID of the playlist + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse deletePlaylist( + double playlistID) throws Exception { + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequest request = + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequest + .builder() + .playlistID(playlistID) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistRequest.class, + baseUrl, + "/playlists/{playlistID}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("DELETE"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequestBuilder updatePlaylist() { + return new lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequestBuilder(this); + } + + /** + * Update a Playlist + * From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` + * + * @param playlistID the ID of the playlist + * @param title name of the playlist + * @param summary summary description of the playlist + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse updatePlaylist( + double playlistID, + Optional title, + Optional summary) throws Exception { + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest request = + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest + .builder() + .playlistID(playlistID) + .title(title) + .summary(summary) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest.class, + baseUrl, + "/playlists/{playlistID}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("PUT"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequestBuilder getPlaylistContents() { + return new lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequestBuilder(this); + } + + /** + * Retrieve Playlist Contents + * Gets the contents of a playlist. Should be paged by clients via standard mechanisms. + * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. + * For example, you could use this to display a list of recently added albums vis a smart playlist. + * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + * + * @param playlistID the ID of the playlist + * @param type the metadata type of the item to return + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse getPlaylistContents( + double playlistID, + double type) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest request = + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest + .builder() + .playlistID(playlistID) + .type(type) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest.class, + baseUrl, + "/playlists/{playlistID}/items", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsPlaylistsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequestBuilder clearPlaylistContents() { + return new lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequestBuilder(this); + } + + /** + * Delete Playlist Contents + * Clears a playlist, only works with dumb playlists. Returns the playlist. + * + * @param playlistID the ID of the playlist + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse clearPlaylistContents( + double playlistID) throws Exception { + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequest request = + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequest + .builder() + .playlistID(playlistID) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsRequest.class, + baseUrl, + "/playlists/{playlistID}/items", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("DELETE"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequestBuilder addPlaylistContents() { + return new lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequestBuilder(this); + } + + /** + * Adding to a Playlist + * Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. + * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + * + * @param playlistID the ID of the playlist + * @param uri the content URI for the playlist + * @param playQueueID the play queue to add to a playlist + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse addPlaylistContents( + double playlistID, + String uri, + Optional playQueueID) throws Exception { + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest request = + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest + .builder() + .playlistID(playlistID) + .uri(uri) + .playQueueID(playQueueID) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest.class, + baseUrl, + "/playlists/{playlistID}/items", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("PUT"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsPlaylistsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequestBuilder uploadPlaylist() { + return new lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequestBuilder(this); + } + + /** + * Upload Playlist + * Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + * + * @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + The GUID of each playlist is based on the filename. + If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + The GUID of each playlist is based on the filename. + + * @param force Force overwriting of duplicate playlists. + By default, a playlist file uploaded with the same path will overwrite the existing playlist. + The `force` argument is used to disable overwriting. + If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse uploadPlaylist( + String path, + lukehagar.plexapi.plexapi.models.operations.Force force) throws Exception { + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequest request = + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequest + .builder() + .path(path) + .force(force) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/playlists/upload"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Plex.java b/src/main/java/lukehagar/plexapi/plexapi/Plex.java new file mode 100644 index 00000000..16dca54e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Plex.java @@ -0,0 +1,250 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls that perform operations directly against https://Plex.tv + * + */ +public class Plex implements + MethodCallGetPin, + MethodCallGetToken { + + /** + * 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", + }; + + /** + * GET_TOKEN_SERVERS contains the list of server urls available to the SDK. + */ + public static final String[] GET_TOKEN_SERVERS = { + "https://plex.tv/api/v2", + }; + + private final SDKConfiguration sdkConfiguration; + + Plex(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetPinRequestBuilder getPin() { + return new lukehagar.plexapi.plexapi.models.operations.GetPinRequestBuilder(this); + } + + /** + * Get a Pin + * Retrieve a Pin from Plex.tv for authentication flows + * @param strong Determines the kind of code returned by the API call + Strong codes are used for Pin authentication flows + Non-Strong codes are used for `Plex.tv/link` + + * @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 serverURL Overrides the server URL. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetPinResponse getPin( + Optional strong, + String xPlexClientIdentifier, + java.util.Optional serverURL) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetPinRequest request = + lukehagar.plexapi.plexapi.models.operations.GetPinRequest + .builder() + .strong(strong) + .xPlexClientIdentifier(xPlexClientIdentifier) + .build(); + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(GET_PIN_SERVERS[0], new java.util.HashMap()); + if (serverURL.isPresent() && !serverURL.get().isBlank()) { + baseUrl = serverURL.get(); + } + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/pins"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetPinRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + java.util.Map> headers = lukehagar.plexapi.plexapi.utils.Utils.getHeaders(request); + if (headers != null) { + for (java.util.Map.Entry> header : headers.entrySet()) { + for (String value : header.getValue()) { + req.addHeader(header.getKey(), value); + } + } + } + + HTTPClient client = this.sdkConfiguration.defaultClient; + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetPinResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetPinResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetPinResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPinResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetPinPlexResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetTokenRequestBuilder getToken() { + return new lukehagar.plexapi.plexapi.models.operations.GetTokenRequestBuilder(this); + } + + /** + * Get Access Token + * Retrieve an Access Token from Plex.tv after the Pin has already been authenticated + * @param pinID The PinID to retrieve an access token for + * @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 serverURL Overrides the server URL. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetTokenResponse getToken( + String pinID, + String xPlexClientIdentifier, + java.util.Optional serverURL) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetTokenRequest request = + lukehagar.plexapi.plexapi.models.operations.GetTokenRequest + .builder() + .pinID(pinID) + .xPlexClientIdentifier(xPlexClientIdentifier) + .build(); + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(GET_TOKEN_SERVERS[0], new java.util.HashMap()); + if (serverURL.isPresent() && !serverURL.get().isBlank()) { + baseUrl = serverURL.get(); + } + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.GetTokenRequest.class, + baseUrl, + "/pins/{pinID}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.Map> headers = lukehagar.plexapi.plexapi.utils.Utils.getHeaders(request); + if (headers != null) { + for (java.util.Map.Entry> header : headers.entrySet()) { + for (String value : header.getValue()) { + req.addHeader(header.getKey(), value); + } + } + } + + HTTPClient client = this.sdkConfiguration.defaultClient; + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetTokenResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetTokenResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetTokenResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + } else if (httpRes.statusCode() == 400) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetTokenResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/PlexAPI.java b/src/main/java/lukehagar/plexapi/plexapi/PlexAPI.java new file mode 100644 index 00000000..46ffbb69 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/PlexAPI.java @@ -0,0 +1,534 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.RetryConfig; +import lukehagar.plexapi.plexapi.utils.SpeakeasyHTTPClient; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Plex-API: A Plex Media Server API Map + * An Open API Spec for interacting with Plex.tv and Plex Servers + */ +public class PlexAPI { + /** + * SERVERS contains the list of server urls available to the SDK. + */ + public static final String[] SERVERS = { + /** + * The full address of your Plex Server + */ + "{protocol}://{ip}:{port}", + }; + + /** + * Operations against the Plex Media Server System. + * + */ + private final Server server; + + /** + * API Calls interacting with Plex Media Server Media + * + */ + private final Media media; + + /** + * API Calls that perform operations with Plex Media Server Videos + * + */ + private final Video video; + + /** + * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: + * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. + * - They must contain an `type` which is used by clients to distinguish the specific activity. + * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) + * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * + */ + private final Activities activities; + + /** + * Butler is the task manager of the Plex Media Server Ecosystem. + * + */ + private final Butler butler; + + /** + * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * + */ + private final Hubs hubs; + + /** + * API Calls that perform search operations with Plex Media Server + * + */ + private final Search search; + + /** + * API Calls interacting with Plex Media Server Libraries + * + */ + private final Library library; + + /** + * Submit logs to the Log Handler for Plex Media Server + * + */ + private final Log log; + + /** + * API Calls that perform operations directly against https://Plex.tv + * + */ + private final Plex plex; + + /** + * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). + * They can be organized in (optionally nesting) folders. + * Retrieving a playlist, or its items, will trigger a refresh of its metadata. + * This may cause the duration and number of items to change. + * + */ + private final Playlists playlists; + + /** + * API Calls regarding authentication for Plex Media Server + * + */ + private final Authentication authentication; + + /** + * API Calls that perform operations with Plex Media Server Statistics + * + */ + private final Statistics statistics; + + /** + * API Calls that perform search operations with Plex Media Server Sessions + * + */ + private final Sessions sessions; + + /** + * This describes the API for searching and applying updates to the Plex Media Server. + * Updates to the status can be observed via the Event API. + * + */ + private final Updater updater; + + /** + * Operations against the Plex Media Server System. + * + */ + public Server server() { + return server; + } + + /** + * API Calls interacting with Plex Media Server Media + * + */ + public Media media() { + return media; + } + + /** + * API Calls that perform operations with Plex Media Server Videos + * + */ + public Video video() { + return video; + } + + /** + * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: + * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. + * - They must contain an `type` which is used by clients to distinguish the specific activity. + * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) + * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * + */ + public Activities activities() { + return activities; + } + + /** + * Butler is the task manager of the Plex Media Server Ecosystem. + * + */ + public Butler butler() { + return butler; + } + + /** + * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * + */ + public Hubs hubs() { + return hubs; + } + + /** + * API Calls that perform search operations with Plex Media Server + * + */ + public Search search() { + return search; + } + + /** + * API Calls interacting with Plex Media Server Libraries + * + */ + public Library library() { + return library; + } + + /** + * Submit logs to the Log Handler for Plex Media Server + * + */ + public Log log() { + return log; + } + + /** + * API Calls that perform operations directly against https://Plex.tv + * + */ + public Plex plex() { + return plex; + } + + /** + * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). + * They can be organized in (optionally nesting) folders. + * Retrieving a playlist, or its items, will trigger a refresh of its metadata. + * This may cause the duration and number of items to change. + * + */ + public Playlists playlists() { + return playlists; + } + + /** + * API Calls regarding authentication for Plex Media Server + * + */ + public Authentication authentication() { + return authentication; + } + + /** + * API Calls that perform operations with Plex Media Server Statistics + * + */ + public Statistics statistics() { + return statistics; + } + + /** + * API Calls that perform search operations with Plex Media Server Sessions + * + */ + public Sessions sessions() { + return sessions; + } + + /** + * This describes the API for searching and applying updates to the Plex Media Server. + * Updates to the status can be observed via the Event API. + * + */ + public Updater updater() { + return updater; + } + + private final SDKConfiguration sdkConfiguration; + + /** + * The Builder class allows the configuration of a new instance of the SDK. + */ + public static class Builder { + + private final SDKConfiguration sdkConfiguration = new SDKConfiguration(); + + private Builder() { + } + + /** + * Allows the default HTTP client to be overridden with a custom implementation. + * + * @param client The HTTP client to use for all requests. + * @return The builder instance. + */ + public Builder client(HTTPClient client) { + this.sdkConfiguration.defaultClient = client; + return this; + } + /** + * Configures the SDK security to use the provided secret. + * + * @param accessToken The secret to use for all requests. + * @return The builder instance. + */ + public Builder accessToken(String accessToken) { + this.sdkConfiguration.securitySource = SecuritySource.of(lukehagar.plexapi.plexapi.models.shared.Security.builder() + .accessToken(accessToken) + .build()); + return this; + } + + /** + * Configures the SDK to use a custom security source. + * @param securitySource The security source to use for all requests. + * @return The builder instance. + */ + public Builder securitySource(SecuritySource securitySource) { + this.sdkConfiguration.securitySource = securitySource; + return this; + } + + /** + * Overrides the default server URL. + * + * @param serverUrl The server URL to use for all requests. + * @return The builder instance. + */ + public Builder serverURL(String serverUrl) { + this.sdkConfiguration.serverUrl = serverUrl; + return this; + } + + /** + * Overrides the default server URL with a templated URL populated with the provided parameters. + * + * @param serverUrl The server URL to use for all requests. + * @param params The parameters to use when templating the URL. + * @return The builder instance. + */ + public Builder serverURL(String serverUrl, java.util.Map params) { + this.sdkConfiguration.serverUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl(serverUrl, params); + return this; + } + + /** + * Overrides the default server by index. + * + * @param serverIdx The server to use for all requests. + * @return The builder instance. + */ + public Builder serverIndex(int serverIdx) { + this.sdkConfiguration.serverIdx = serverIdx; + this.sdkConfiguration.serverUrl = SERVERS[serverIdx]; + return this; + } + + /** + * Overrides the default configuration for retries + * + * @param retryConfig The retry configuration to use for all requests. + * @return The builder instance. + */ + public Builder retryConfig(RetryConfig retryConfig) { + this.sdkConfiguration.retryConfig = Optional.of(retryConfig); + return this; + } + /** + * ServerProtocol - The protocol to use when connecting to your plex server. + */ + public enum ServerProtocol { + HTTP("http"), + HTTPS("https"); + + @JsonValue + private final String value; + + private ServerProtocol(String value) { + this.value = value; + } + + public String value() { + return value; + } + } + + /** + * Sets the protocol variable for url substitution. + * + * @param protocol The value to set. + * @return The builder instance. + */ + public Builder protocol(ServerProtocol protocol) { + for (java.util.Map server : this.sdkConfiguration.serverDefaults) { + if (!server.containsKey("protocol")) { + continue; + } + server.put("protocol", protocol.toString()); + } + + return this; + } + + /** + * Sets the ip variable for url substitution. + * + * @param ip The value to set. + * @return The builder instance. + */ + public Builder ip(String ip) { + for (java.util.Map server : this.sdkConfiguration.serverDefaults) { + if (!server.containsKey("ip")) { + continue; + } + server.put("ip", ip.toString()); + } + + return this; + } + + /** + * Sets the port variable for url substitution. + * + * @param port The value to set. + * @return The builder instance. + */ + public Builder port(String port) { + for (java.util.Map server : this.sdkConfiguration.serverDefaults) { + if (!server.containsKey("port")) { + continue; + } + server.put("port", port.toString()); + } + + return this; + } + + /** + * Builds a new instance of the SDK. + * @return The SDK instance. + */ + public PlexAPI build() { + if (sdkConfiguration.defaultClient == null) { + sdkConfiguration.defaultClient = new SpeakeasyHTTPClient(); + } + if (sdkConfiguration.securitySource == null) { + sdkConfiguration.securitySource = SecuritySource.of(null); + } + if (sdkConfiguration.serverUrl == null || sdkConfiguration.serverUrl.isBlank()) { + sdkConfiguration.serverUrl = SERVERS[0]; + sdkConfiguration.serverIdx = 0; + } + if (sdkConfiguration.serverUrl.endsWith("/")) { + sdkConfiguration.serverUrl = sdkConfiguration.serverUrl.substring(0, sdkConfiguration.serverUrl.length() - 1); + } + return new PlexAPI(sdkConfiguration); + } + } + + /** + * Get a new instance of the SDK builder to configure a new instance of the SDK. + * @return The SDK builder instance. + */ + public static Builder builder() { + return new Builder(); + } + + private PlexAPI(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.server = new Server(sdkConfiguration); + this.media = new Media(sdkConfiguration); + this.video = new Video(sdkConfiguration); + this.activities = new Activities(sdkConfiguration); + this.butler = new Butler(sdkConfiguration); + this.hubs = new Hubs(sdkConfiguration); + this.search = new Search(sdkConfiguration); + this.library = new Library(sdkConfiguration); + this.log = new Log(sdkConfiguration); + this.plex = new Plex(sdkConfiguration); + this.playlists = new Playlists(sdkConfiguration); + this.authentication = new Authentication(sdkConfiguration); + this.statistics = new Statistics(sdkConfiguration); + this.sessions = new Sessions(sdkConfiguration); + this.updater = new Updater(sdkConfiguration); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/SDKConfiguration.java b/src/main/java/lukehagar/plexapi/plexapi/SDKConfiguration.java new file mode 100644 index 00000000..73ac01d4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/SDKConfiguration.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.RetryConfig; +import lukehagar.plexapi.plexapi.models.shared.Security; +import java.util.Map; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Optional; + +class SDKConfiguration { + public SecuritySource securitySource; + public HTTPClient defaultClient; + public String serverUrl; + public int serverIdx = 0; + List> serverDefaults = new ArrayList<>(){{ + add(new HashMap<>(){{ + put("protocol", "http"); + put("ip", "10.10.10.47"); + put("port", "32400"); + }}); + }}; + public String language = "java"; + public String openapiDocVersion = "0.0.3"; + public String sdkVersion = "0.0.1"; + public String genVersion = "2.281.2"; + public String userAgent = "speakeasy-sdk/java 0.0.1 2.281.2 0.0.3 lukehagar.plexapi.plexapi"; + + + public Map getServerVariableDefaults() { + return serverDefaults.get(this.serverIdx); + } + public Optional retryConfig = Optional.empty(); +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Search.java b/src/main/java/lukehagar/plexapi/plexapi/Search.java new file mode 100644 index 00000000..0f8a8451 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Search.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls that perform search operations with Plex Media Server + * + */ +public class Search implements + MethodCallPerformSearch, + MethodCallPerformVoiceSearch, + MethodCallGetSearchResults { + + private final SDKConfiguration sdkConfiguration; + + Search(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.PerformSearchRequestBuilder performSearch() { + return new lukehagar.plexapi.plexapi.models.operations.PerformSearchRequestBuilder(this); + } + + /** + * Perform a search + * This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). + * + * In the response's items, the following extra attributes are returned to further describe or disambiguate the result: + * + * - `reason`: The reason for the result, if not because of a direct search term match; can be either: + * - `section`: There are multiple identical results from different sections. + * - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). + * - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` + * - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). + * - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. + * + * This request is intended to be very fast, and called as the user types. + * + * @param query The query term + * @param sectionId This gives context to the search, and can result in re-ordering of search result hubs + * @param limit The number of items to return per hub + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse performSearch( + String query, + Optional sectionId, + Optional limit) throws Exception { + lukehagar.plexapi.plexapi.models.operations.PerformSearchRequest request = + lukehagar.plexapi.plexapi.models.operations.PerformSearchRequest + .builder() + .query(query) + .sectionId(sectionId) + .limit(limit) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/hubs/search"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.PerformSearchRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.PerformSearchResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequestBuilder performVoiceSearch() { + return new lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequestBuilder(this); + } + + /** + * Perform a voice search + * This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. + * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. + * Whenever possible, clients should limit the search to the appropriate type. + * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + * + * @param query The query term + * @param sectionId This gives context to the search, and can result in re-ordering of search result hubs + * @param limit The number of items to return per hub + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse performVoiceSearch( + String query, + Optional sectionId, + Optional limit) throws Exception { + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequest request = + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequest + .builder() + .query(query) + .sectionId(sectionId) + .limit(limit) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/hubs/search/voice"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequestBuilder getSearchResults() { + return new lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequestBuilder(this); + } + + /** + * Get Search Results + * This will search the database for the string provided. + * @param query The search query string to use + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse getSearchResults( + String query) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequest request = + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequest + .builder() + .query(query) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/search"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsSearchResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/SecuritySource.java b/src/main/java/lukehagar/plexapi/plexapi/SecuritySource.java new file mode 100644 index 00000000..fc4deca8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/SecuritySource.java @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import lukehagar.plexapi.plexapi.models.shared.Security; + +public interface SecuritySource { + + Security getSecurity(); + + public static SecuritySource of(Security security) { + return new DefaultSecuritySource(security); + } + + public static class DefaultSecuritySource implements SecuritySource { + private Security security; + + public DefaultSecuritySource(Security security) { + this.security = security; + } + + public Security getSecurity() { + return security; + } + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Server.java b/src/main/java/lukehagar/plexapi/plexapi/Server.java new file mode 100644 index 00000000..04e7b0da --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Server.java @@ -0,0 +1,628 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Operations against the Plex Media Server System. + * + */ +public class Server implements + MethodCallGetServerCapabilities, + MethodCallGetServerPreferences, + MethodCallGetAvailableClients, + MethodCallGetDevices, + MethodCallGetServerIdentity, + MethodCallGetMyPlexAccount, + MethodCallGetResizedPhoto, + MethodCallGetServerList { + + private final SDKConfiguration sdkConfiguration; + + Server(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesRequestBuilder getServerCapabilities() { + return new lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesRequestBuilder(this); + } + + /** + * Server Capabilities + * Server Capabilities + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse getServerCapabilitiesDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesServerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesRequestBuilder getServerPreferences() { + return new lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesRequestBuilder(this); + } + + /** + * Get Server Preferences + * Get Server Preferences + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse getServerPreferencesDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/:/prefs"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesServerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsRequestBuilder getAvailableClients() { + return new lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsRequestBuilder(this); + } + + /** + * Get Available Clients + * Get Available Clients + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse getAvailableClientsDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/clients"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsServerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetDevicesRequestBuilder getDevices() { + return new lukehagar.plexapi.plexapi.models.operations.GetDevicesRequestBuilder(this); + } + + /** + * Get Devices + * Get Devices + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse getDevicesDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/devices"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetDevicesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetDevicesServerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetServerIdentityRequestBuilder getServerIdentity() { + return new lukehagar.plexapi.plexapi.models.operations.GetServerIdentityRequestBuilder(this); + } + + /** + * Get Server Identity + * Get Server Identity + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse getServerIdentityDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/identity"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerIdentityServerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountRequestBuilder getMyPlexAccount() { + return new lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountRequestBuilder(this); + } + + /** + * Get MyPlex Account + * Returns MyPlex Account Information + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse getMyPlexAccountDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/myplex/account"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountServerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequestBuilder getResizedPhoto() { + return new lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequestBuilder(this); + } + + /** + * Get a Resized Photo + * Plex's Photo transcoder is used throughout the service to serve images at specified sizes. + * + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse getResizedPhoto( + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequest request) throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/photo/:/transcode"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetServerListRequestBuilder getServerList() { + return new lukehagar.plexapi.plexapi.models.operations.GetServerListRequestBuilder(this); + } + + /** + * Get Server List + * Get Server List + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetServerListResponse getServerListDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/servers"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetServerListResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetServerListResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetServerListResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerListResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetServerListServerResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Sessions.java b/src/main/java/lukehagar/plexapi/plexapi/Sessions.java new file mode 100644 index 00000000..e278615b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Sessions.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls that perform search operations with Plex Media Server Sessions + * + */ +public class Sessions implements + MethodCallGetSessions, + MethodCallGetSessionHistory, + MethodCallGetTranscodeSessions, + MethodCallStopTranscodeSession { + + private final SDKConfiguration sdkConfiguration; + + Sessions(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetSessionsRequestBuilder getSessions() { + return new lukehagar.plexapi.plexapi.models.operations.GetSessionsRequestBuilder(this); + } + + /** + * Get Active Sessions + * This will retrieve the "Now Playing" Information of the PMS. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse getSessionsDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/status/sessions"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetSessionsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetSessionsSessionsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryRequestBuilder getSessionHistory() { + return new lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryRequestBuilder(this); + } + + /** + * Get Session History + * This will Retrieve a listing of all history views. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse getSessionHistoryDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/status/sessions/history/all"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetSessionHistorySessionsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsRequestBuilder getTranscodeSessions() { + return new lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsRequestBuilder(this); + } + + /** + * Get Transcode Sessions + * Get Transcode Sessions + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse getTranscodeSessionsDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/transcode/sessions"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsSessionsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequestBuilder stopTranscodeSession() { + return new lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequestBuilder(this); + } + + /** + * Stop a Transcode Session + * Stop a Transcode Session + * @param sessionKey the Key of the transcode session to stop + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse stopTranscodeSession( + String sessionKey) throws Exception { + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequest request = + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequest + .builder() + .sessionKey(sessionKey) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionRequest.class, + baseUrl, + "/transcode/sessions/{sessionKey}", + request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("DELETE"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 204 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Statistics.java b/src/main/java/lukehagar/plexapi/plexapi/Statistics.java new file mode 100644 index 00000000..0d74012b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Statistics.java @@ -0,0 +1,127 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls that perform operations with Plex Media Server Statistics + * + */ +public class Statistics implements + MethodCallGetStatistics { + + private final SDKConfiguration sdkConfiguration; + + Statistics(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequestBuilder getStatistics() { + return new lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequestBuilder(this); + } + + /** + * Get Media Statistics + * This will return the media statistics for the server + * @param timespan The timespan to retrieve statistics for + the exact meaning of this parameter is not known + + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse getStatistics( + Optional timespan) throws Exception { + lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequest request = + lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequest + .builder() + .timespan(timespan) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/statistics/media"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetStatisticsRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetStatisticsStatisticsResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Updater.java b/src/main/java/lukehagar/plexapi/plexapi/Updater.java new file mode 100644 index 00000000..45b5eaaf --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Updater.java @@ -0,0 +1,274 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * This describes the API for searching and applying updates to the Plex Media Server. + * Updates to the status can be observed via the Event API. + * + */ +public class Updater implements + MethodCallGetUpdateStatus, + MethodCallCheckForUpdates, + MethodCallApplyUpdates { + + private final SDKConfiguration sdkConfiguration; + + Updater(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusRequestBuilder getUpdateStatus() { + return new lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusRequestBuilder(this); + } + + /** + * Querying status of updates + * Querying status of updates + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse getUpdateStatusDirect() throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/updater/status"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withTwoHundredApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } else if (httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusUpdaterResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withFourHundredAndOneApplicationJsonObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequestBuilder checkForUpdates() { + return new lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequestBuilder(this); + } + + /** + * Checking for updates + * Checking for updates + * @param download Indicate that you want to start download any updates found. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse checkForUpdates( + Optional download) throws Exception { + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequest request = + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequest + .builder() + .download(download) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/updater/check"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("PUT"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequestBuilder applyUpdates() { + return new lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequestBuilder(this); + } + + /** + * Apply Updates + * Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + * + * @param tonight Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + * @param skip Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + * @return The response from the API call. + * @throws Exception if the API call fails. + */ + public lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse applyUpdates( + Optional tonight, + Optional skip) throws Exception { + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequest request = + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequest + .builder() + .tonight(tonight) + .skip(skip) + .build(); + + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/updater/apply"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("PUT"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400 || httpRes.statusCode() == 500) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/Video.java b/src/main/java/lukehagar/plexapi/plexapi/Video.java new file mode 100644 index 00000000..2a76460a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/Video.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.models.operations.SDKMethodInterfaces.*; +import lukehagar.plexapi.plexapi.utils.HTTPClient; +import lukehagar.plexapi.plexapi.utils.HTTPRequest; +import lukehagar.plexapi.plexapi.utils.JSON; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.apache.http.NameValuePair; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * API Calls that perform operations with Plex Media Server Videos + * + */ +public class Video implements + MethodCallGetTimeline, + MethodCallStartUniversalTranscode { + + private final SDKConfiguration sdkConfiguration; + + Video(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public lukehagar.plexapi.plexapi.models.operations.GetTimelineRequestBuilder getTimeline() { + return new lukehagar.plexapi.plexapi.models.operations.GetTimelineRequestBuilder(this); + } + + /** + * Get the timeline for a media item + * Get the timeline for a media item + * @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 lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse getTimeline( + lukehagar.plexapi.plexapi.models.operations.GetTimelineRequest request) throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/:/timeline"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.GetTimelineRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.GetTimelineResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + + + public lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequestBuilder startUniversalTranscode() { + return new lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequestBuilder(this); + } + + /** + * Start Universal Transcode + * Begin a Universal Transcode Session + * @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 lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse startUniversalTranscode( + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequest request) throws Exception { + + String baseUrl = lukehagar.plexapi.plexapi.utils.Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + + String url = lukehagar.plexapi.plexapi.utils.Utils.generateURL( + baseUrl, + "/video/:/transcode/universal/start.mpd"); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("GET"); + req.setURL(url); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + java.util.List queryParams = lukehagar.plexapi.plexapi.utils.Utils.getQueryParams( + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequest.class, request, null); + if (queryParams != null) { + for (NameValuePair queryParam : queryParams) { + req.addQueryParam(queryParam); + } + } + + HTTPClient client = lukehagar.plexapi.plexapi.utils.Utils.configureSecurityClient( + this.sdkConfiguration.defaultClient, this.sdkConfiguration.securitySource.getSecurity()); + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse.Builder resBuilder = + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse + .builder() + .contentType(contentType) + .statusCode(httpRes.statusCode()) + .rawResponse(httpRes); + + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse res = resBuilder.build(); + + res.withRawResponse(httpRes); + + if (httpRes.statusCode() == 200 || httpRes.statusCode() == 400) { + } else if (httpRes.statusCode() == 401) { + if (lukehagar.plexapi.plexapi.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponseBody out = mapper.readValue( + Utils.toUtf8AndClose(httpRes.body()), + new TypeReference() {}); + res.withObject(java.util.Optional.ofNullable(out)); + } else { + throw new SDKError(httpRes, httpRes.statusCode(), "Unknown content-type received: " + contentType, Utils.toByteArrayAndClose(httpRes.body())); + } + } + + return res; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/errors/SDKError.java b/src/main/java/lukehagar/plexapi/plexapi/models/errors/SDKError.java new file mode 100644 index 00000000..e56bca4f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/errors/SDKError.java @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.errors; + +import java.net.http.HttpResponse; +import java.io.InputStream; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Thrown by a service call when an error response occurs. Contains details about the response. + */ +public class SDKError extends Exception { + + private final HttpResponse rawResponse; + private final int code; + private final String message; + private final byte[] body; + + public SDKError( + HttpResponse rawResponse, + int code, + String message, + byte[] body) { + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(body, "body"); + this.rawResponse = rawResponse; + this.code = code; + this.message = message; + this.body = body; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKError other = (SDKError) o; + return + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + rawResponse, + code, + message, + body); + } + + @Override + public String toString() { + return Utils.toString(SDKError.class, + "rawResponse", rawResponse, + "code", code, + "message", message, + "body", body); + } + + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public int code() { + return this.code; + } + + public String message() { + return this.message; + } + + public byte[] body() { + return this.body; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Account.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Account.java new file mode 100644 index 00000000..d99460f5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Account.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Account { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("defaultAudioLanguage") + private Optional defaultAudioLanguage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("autoSelectAudio") + private Optional autoSelectAudio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("defaultSubtitleLanguage") + private Optional defaultSubtitleLanguage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtitleMode") + private Optional subtitleMode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + public Account( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("name") Optional name, + @JsonProperty("defaultAudioLanguage") Optional defaultAudioLanguage, + @JsonProperty("autoSelectAudio") Optional autoSelectAudio, + @JsonProperty("defaultSubtitleLanguage") Optional defaultSubtitleLanguage, + @JsonProperty("subtitleMode") Optional subtitleMode, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); + Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); + Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); + Utils.checkNotNull(subtitleMode, "subtitleMode"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; + this.key = key; + this.name = name; + this.defaultAudioLanguage = defaultAudioLanguage; + this.autoSelectAudio = autoSelectAudio; + this.defaultSubtitleLanguage = defaultSubtitleLanguage; + this.subtitleMode = subtitleMode; + this.thumb = thumb; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional name() { + return name; + } + + public Optional defaultAudioLanguage() { + return defaultAudioLanguage; + } + + public Optional autoSelectAudio() { + return autoSelectAudio; + } + + public Optional defaultSubtitleLanguage() { + return defaultSubtitleLanguage; + } + + public Optional subtitleMode() { + return subtitleMode; + } + + public Optional thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + public Account withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Account withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Account withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Account withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Account withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Account withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Account withDefaultAudioLanguage(String defaultAudioLanguage) { + Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); + this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); + return this; + } + + public Account withDefaultAudioLanguage(Optional defaultAudioLanguage) { + Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); + this.defaultAudioLanguage = defaultAudioLanguage; + return this; + } + + public Account withAutoSelectAudio(boolean autoSelectAudio) { + Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); + this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); + return this; + } + + public Account withAutoSelectAudio(Optional autoSelectAudio) { + Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); + this.autoSelectAudio = autoSelectAudio; + return this; + } + + public Account withDefaultSubtitleLanguage(String defaultSubtitleLanguage) { + Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); + this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); + return this; + } + + public Account withDefaultSubtitleLanguage(Optional defaultSubtitleLanguage) { + Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); + this.defaultSubtitleLanguage = defaultSubtitleLanguage; + return this; + } + + public Account withSubtitleMode(int subtitleMode) { + Utils.checkNotNull(subtitleMode, "subtitleMode"); + this.subtitleMode = Optional.ofNullable(subtitleMode); + return this; + } + + public Account withSubtitleMode(Optional subtitleMode) { + Utils.checkNotNull(subtitleMode, "subtitleMode"); + this.subtitleMode = subtitleMode; + return this; + } + + public Account withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Account withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Account other = (Account) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.name, other.name) && + java.util.Objects.deepEquals(this.defaultAudioLanguage, other.defaultAudioLanguage) && + java.util.Objects.deepEquals(this.autoSelectAudio, other.autoSelectAudio) && + java.util.Objects.deepEquals(this.defaultSubtitleLanguage, other.defaultSubtitleLanguage) && + java.util.Objects.deepEquals(this.subtitleMode, other.subtitleMode) && + java.util.Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + name, + defaultAudioLanguage, + autoSelectAudio, + defaultSubtitleLanguage, + subtitleMode, + thumb); + } + + @Override + public String toString() { + return Utils.toString(Account.class, + "id", id, + "key", key, + "name", name, + "defaultAudioLanguage", defaultAudioLanguage, + "autoSelectAudio", autoSelectAudio, + "defaultSubtitleLanguage", defaultSubtitleLanguage, + "subtitleMode", subtitleMode, + "thumb", thumb); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional defaultAudioLanguage = Optional.empty(); + + private Optional autoSelectAudio = Optional.empty(); + + private Optional defaultSubtitleLanguage = Optional.empty(); + + private Optional subtitleMode = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder defaultAudioLanguage(String defaultAudioLanguage) { + Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); + this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); + return this; + } + + public Builder defaultAudioLanguage(Optional defaultAudioLanguage) { + Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); + this.defaultAudioLanguage = defaultAudioLanguage; + return this; + } + + public Builder autoSelectAudio(boolean autoSelectAudio) { + Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); + this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); + return this; + } + + public Builder autoSelectAudio(Optional autoSelectAudio) { + Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); + this.autoSelectAudio = autoSelectAudio; + return this; + } + + public Builder defaultSubtitleLanguage(String defaultSubtitleLanguage) { + Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); + this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); + return this; + } + + public Builder defaultSubtitleLanguage(Optional defaultSubtitleLanguage) { + Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); + this.defaultSubtitleLanguage = defaultSubtitleLanguage; + return this; + } + + public Builder subtitleMode(int subtitleMode) { + Utils.checkNotNull(subtitleMode, "subtitleMode"); + this.subtitleMode = Optional.ofNullable(subtitleMode); + return this; + } + + public Builder subtitleMode(Optional subtitleMode) { + Utils.checkNotNull(subtitleMode, "subtitleMode"); + this.subtitleMode = subtitleMode; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Account build() { + return new Account( + id, + key, + name, + defaultAudioLanguage, + autoSelectAudio, + defaultSubtitleLanguage, + subtitleMode, + thumb); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Activity.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Activity.java new file mode 100644 index 00000000..5004c309 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Activity.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Activity { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("cancellable") + private Optional cancellable; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userID") + private Optional userID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtitle") + private Optional subtitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("progress") + private Optional progress; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Context") + private Optional context; + + public Activity( + @JsonProperty("uuid") Optional uuid, + @JsonProperty("type") Optional type, + @JsonProperty("cancellable") Optional cancellable, + @JsonProperty("userID") Optional userID, + @JsonProperty("title") Optional title, + @JsonProperty("subtitle") Optional subtitle, + @JsonProperty("progress") Optional progress, + @JsonProperty("Context") Optional context) { + Utils.checkNotNull(uuid, "uuid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(cancellable, "cancellable"); + Utils.checkNotNull(userID, "userID"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(subtitle, "subtitle"); + Utils.checkNotNull(progress, "progress"); + Utils.checkNotNull(context, "context"); + this.uuid = uuid; + this.type = type; + this.cancellable = cancellable; + this.userID = userID; + this.title = title; + this.subtitle = subtitle; + this.progress = progress; + this.context = context; + } + + public Optional uuid() { + return uuid; + } + + public Optional type() { + return type; + } + + public Optional cancellable() { + return cancellable; + } + + public Optional userID() { + return userID; + } + + public Optional title() { + return title; + } + + public Optional subtitle() { + return subtitle; + } + + public Optional progress() { + return progress; + } + + public Optional context() { + return context; + } + + public final static Builder builder() { + return new Builder(); + } + + public Activity withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Activity withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Activity withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Activity withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Activity withCancellable(boolean cancellable) { + Utils.checkNotNull(cancellable, "cancellable"); + this.cancellable = Optional.ofNullable(cancellable); + return this; + } + + public Activity withCancellable(Optional cancellable) { + Utils.checkNotNull(cancellable, "cancellable"); + this.cancellable = cancellable; + return this; + } + + public Activity withUserID(double userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + public Activity withUserID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + public Activity withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Activity withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Activity withSubtitle(String subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = Optional.ofNullable(subtitle); + return this; + } + + public Activity withSubtitle(Optional subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = subtitle; + return this; + } + + public Activity withProgress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + public Activity withProgress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + public Activity withContext(Context context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Activity withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Activity other = (Activity) o; + return + java.util.Objects.deepEquals(this.uuid, other.uuid) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.cancellable, other.cancellable) && + java.util.Objects.deepEquals(this.userID, other.userID) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.subtitle, other.subtitle) && + java.util.Objects.deepEquals(this.progress, other.progress) && + java.util.Objects.deepEquals(this.context, other.context); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + uuid, + type, + cancellable, + userID, + title, + subtitle, + progress, + context); + } + + @Override + public String toString() { + return Utils.toString(Activity.class, + "uuid", uuid, + "type", type, + "cancellable", cancellable, + "userID", userID, + "title", title, + "subtitle", subtitle, + "progress", progress, + "context", context); + } + + public final static class Builder { + + private Optional uuid = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional cancellable = Optional.empty(); + + private Optional userID = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional subtitle = Optional.empty(); + + private Optional progress = Optional.empty(); + + private Optional context = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder cancellable(boolean cancellable) { + Utils.checkNotNull(cancellable, "cancellable"); + this.cancellable = Optional.ofNullable(cancellable); + return this; + } + + public Builder cancellable(Optional cancellable) { + Utils.checkNotNull(cancellable, "cancellable"); + this.cancellable = cancellable; + return this; + } + + public Builder userID(double userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + public Builder userID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder subtitle(String subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = Optional.ofNullable(subtitle); + return this; + } + + public Builder subtitle(Optional subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = subtitle; + return this; + } + + public Builder progress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + public Builder progress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + public Builder context(Context context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public Activity build() { + return new Activity( + uuid, + type, + cancellable, + userID, + title, + subtitle, + progress, + context); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsErrors.java new file mode 100644 index 00000000..2fb9866f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class AddPlaylistContentsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public AddPlaylistContentsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public AddPlaylistContentsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public AddPlaylistContentsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public AddPlaylistContentsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public AddPlaylistContentsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public AddPlaylistContentsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public AddPlaylistContentsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistContentsErrors other = (AddPlaylistContentsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public AddPlaylistContentsErrors build() { + return new AddPlaylistContentsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMediaContainer.java new file mode 100644 index 00000000..a656b777 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMediaContainer.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class AddPlaylistContentsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCountAdded") + private Optional leafCountAdded; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCountRequested") + private Optional leafCountRequested; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public AddPlaylistContentsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("leafCountAdded") Optional leafCountAdded, + @JsonProperty("leafCountRequested") Optional leafCountRequested, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(leafCountAdded, "leafCountAdded"); + Utils.checkNotNull(leafCountRequested, "leafCountRequested"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.leafCountAdded = leafCountAdded; + this.leafCountRequested = leafCountRequested; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional leafCountAdded() { + return leafCountAdded; + } + + public Optional leafCountRequested() { + return leafCountRequested; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public AddPlaylistContentsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public AddPlaylistContentsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public AddPlaylistContentsMediaContainer withLeafCountAdded(int leafCountAdded) { + Utils.checkNotNull(leafCountAdded, "leafCountAdded"); + this.leafCountAdded = Optional.ofNullable(leafCountAdded); + return this; + } + + public AddPlaylistContentsMediaContainer withLeafCountAdded(Optional leafCountAdded) { + Utils.checkNotNull(leafCountAdded, "leafCountAdded"); + this.leafCountAdded = leafCountAdded; + return this; + } + + public AddPlaylistContentsMediaContainer withLeafCountRequested(int leafCountRequested) { + Utils.checkNotNull(leafCountRequested, "leafCountRequested"); + this.leafCountRequested = Optional.ofNullable(leafCountRequested); + return this; + } + + public AddPlaylistContentsMediaContainer withLeafCountRequested(Optional leafCountRequested) { + Utils.checkNotNull(leafCountRequested, "leafCountRequested"); + this.leafCountRequested = leafCountRequested; + return this; + } + + public AddPlaylistContentsMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public AddPlaylistContentsMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistContentsMediaContainer other = (AddPlaylistContentsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.leafCountAdded, other.leafCountAdded) && + java.util.Objects.deepEquals(this.leafCountRequested, other.leafCountRequested) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + leafCountAdded, + leafCountRequested, + metadata); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsMediaContainer.class, + "size", size, + "leafCountAdded", leafCountAdded, + "leafCountRequested", leafCountRequested, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional leafCountAdded = Optional.empty(); + + private Optional leafCountRequested = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder leafCountAdded(int leafCountAdded) { + Utils.checkNotNull(leafCountAdded, "leafCountAdded"); + this.leafCountAdded = Optional.ofNullable(leafCountAdded); + return this; + } + + public Builder leafCountAdded(Optional leafCountAdded) { + Utils.checkNotNull(leafCountAdded, "leafCountAdded"); + this.leafCountAdded = leafCountAdded; + return this; + } + + public Builder leafCountRequested(int leafCountRequested) { + Utils.checkNotNull(leafCountRequested, "leafCountRequested"); + this.leafCountRequested = Optional.ofNullable(leafCountRequested); + return this; + } + + public Builder leafCountRequested(Optional leafCountRequested) { + Utils.checkNotNull(leafCountRequested, "leafCountRequested"); + this.leafCountRequested = leafCountRequested; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public AddPlaylistContentsMediaContainer build() { + return new AddPlaylistContentsMediaContainer( + size, + leafCountAdded, + leafCountRequested, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMetadata.java new file mode 100644 index 00000000..d2af98a2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsMetadata.java @@ -0,0 +1,595 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class AddPlaylistContentsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("smart") + private Optional smart; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistType") + private Optional playlistType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + public AddPlaylistContentsMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("summary") Optional summary, + @JsonProperty("smart") Optional smart, + @JsonProperty("playlistType") Optional playlistType, + @JsonProperty("composite") Optional composite, + @JsonProperty("duration") Optional duration, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.type = type; + this.title = title; + this.summary = summary; + this.smart = smart; + this.playlistType = playlistType; + this.composite = composite; + this.duration = duration; + this.leafCount = leafCount; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional summary() { + return summary; + } + + public Optional smart() { + return smart; + } + + public Optional playlistType() { + return playlistType; + } + + public Optional composite() { + return composite; + } + + public Optional duration() { + return duration; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public AddPlaylistContentsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public AddPlaylistContentsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public AddPlaylistContentsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public AddPlaylistContentsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public AddPlaylistContentsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public AddPlaylistContentsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public AddPlaylistContentsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public AddPlaylistContentsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public AddPlaylistContentsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public AddPlaylistContentsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public AddPlaylistContentsMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public AddPlaylistContentsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public AddPlaylistContentsMetadata withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public AddPlaylistContentsMetadata withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public AddPlaylistContentsMetadata withPlaylistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public AddPlaylistContentsMetadata withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public AddPlaylistContentsMetadata withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public AddPlaylistContentsMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public AddPlaylistContentsMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public AddPlaylistContentsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public AddPlaylistContentsMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public AddPlaylistContentsMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public AddPlaylistContentsMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public AddPlaylistContentsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public AddPlaylistContentsMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public AddPlaylistContentsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistContentsMetadata other = (AddPlaylistContentsMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.smart, other.smart) && + java.util.Objects.deepEquals(this.playlistType, other.playlistType) && + java.util.Objects.deepEquals(this.composite, other.composite) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + composite, + duration, + leafCount, + addedAt, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "type", type, + "title", title, + "summary", summary, + "smart", smart, + "playlistType", playlistType, + "composite", composite, + "duration", duration, + "leafCount", leafCount, + "addedAt", addedAt, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public Builder playlistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public AddPlaylistContentsMetadata build() { + return new AddPlaylistContentsMetadata( + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + composite, + duration, + leafCount, + addedAt, + updatedAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsPlaylistsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsPlaylistsResponseBody.java new file mode 100644 index 00000000..2fefb042 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsPlaylistsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * AddPlaylistContentsPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class AddPlaylistContentsPlaylistsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public AddPlaylistContentsPlaylistsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public AddPlaylistContentsPlaylistsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public AddPlaylistContentsPlaylistsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistContentsPlaylistsResponseBody other = (AddPlaylistContentsPlaylistsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsPlaylistsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public AddPlaylistContentsPlaylistsResponseBody build() { + return new AddPlaylistContentsPlaylistsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequest.java new file mode 100644 index 00000000..2c7a4a58 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequest.java @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class AddPlaylistContentsRequest { + + /** + * the ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") + private double playlistID; + + /** + * the content URI for the playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private String uri; + + /** + * the play queue to add to a playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueID") + private Optional playQueueID; + + public AddPlaylistContentsRequest( + double playlistID, + String uri, + Optional playQueueID) { + Utils.checkNotNull(playlistID, "playlistID"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playlistID = playlistID; + this.uri = uri; + this.playQueueID = playQueueID; + } + + /** + * the ID of the playlist + */ + public double playlistID() { + return playlistID; + } + + /** + * the content URI for the playlist + */ + public String uri() { + return uri; + } + + /** + * the play queue to add to a playlist + */ + public Optional playQueueID() { + return playQueueID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the ID of the playlist + */ + public AddPlaylistContentsRequest withPlaylistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * the content URI for the playlist + */ + public AddPlaylistContentsRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * the play queue to add to a playlist + */ + public AddPlaylistContentsRequest withPlayQueueID(double playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + /** + * the play queue to add to a playlist + */ + public AddPlaylistContentsRequest withPlayQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistContentsRequest other = (AddPlaylistContentsRequest) o; + return + java.util.Objects.deepEquals(this.playlistID, other.playlistID) && + java.util.Objects.deepEquals(this.uri, other.uri) && + java.util.Objects.deepEquals(this.playQueueID, other.playQueueID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + playlistID, + uri, + playQueueID); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsRequest.class, + "playlistID", playlistID, + "uri", uri, + "playQueueID", playQueueID); + } + + public final static class Builder { + + private Double playlistID; + + private String uri; + + private Optional playQueueID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * the ID of the playlist + */ + public Builder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * the content URI for the playlist + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * the play queue to add to a playlist + */ + public Builder playQueueID(double playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + /** + * the play queue to add to a playlist + */ + public Builder playQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + public AddPlaylistContentsRequest build() { + return new AddPlaylistContentsRequest( + playlistID, + uri, + playQueueID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequestBuilder.java new file mode 100644 index 00000000..9b74e390 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsRequestBuilder.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AddPlaylistContentsRequestBuilder { + + private Double playlistID; + private String uri; + private Optional playQueueID = Optional.empty(); + private final SDKMethodInterfaces.MethodCallAddPlaylistContents sdk; + + public AddPlaylistContentsRequestBuilder(SDKMethodInterfaces.MethodCallAddPlaylistContents sdk) { + this.sdk = sdk; + } + + public AddPlaylistContentsRequestBuilder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public AddPlaylistContentsRequestBuilder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public AddPlaylistContentsRequestBuilder playQueueID(double playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.of(playQueueID); + return this; + } + + public AddPlaylistContentsRequestBuilder playQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + public AddPlaylistContentsResponse call() throws Exception { + + return sdk.addPlaylistContents( + playlistID, + uri, + playQueueID); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponse.java new file mode 100644 index 00000000..ebad4e96 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class AddPlaylistContentsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Playlist Updated + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public AddPlaylistContentsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Playlist Updated + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public AddPlaylistContentsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddPlaylistContentsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Playlist Updated + */ + public AddPlaylistContentsResponse withTwoHundredApplicationJsonObject(AddPlaylistContentsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Playlist Updated + */ + public AddPlaylistContentsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public AddPlaylistContentsResponse withFourHundredAndOneApplicationJsonObject(AddPlaylistContentsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public AddPlaylistContentsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistContentsResponse other = (AddPlaylistContentsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Playlist Updated + */ + public Builder twoHundredApplicationJsonObject(AddPlaylistContentsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Playlist Updated + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(AddPlaylistContentsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public AddPlaylistContentsResponse build() { + return new AddPlaylistContentsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponseBody.java new file mode 100644 index 00000000..a2df8f7a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/AddPlaylistContentsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * AddPlaylistContentsResponseBody - Playlist Updated + */ + +public class AddPlaylistContentsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public AddPlaylistContentsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public AddPlaylistContentsResponseBody withMediaContainer(AddPlaylistContentsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public AddPlaylistContentsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistContentsResponseBody other = (AddPlaylistContentsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistContentsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(AddPlaylistContentsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public AddPlaylistContentsResponseBody build() { + return new AddPlaylistContentsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesErrors.java new file mode 100644 index 00000000..da46a6ab --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ApplyUpdatesErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public ApplyUpdatesErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public ApplyUpdatesErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public ApplyUpdatesErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public ApplyUpdatesErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public ApplyUpdatesErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public ApplyUpdatesErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public ApplyUpdatesErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplyUpdatesErrors other = (ApplyUpdatesErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(ApplyUpdatesErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public ApplyUpdatesErrors build() { + return new ApplyUpdatesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequest.java new file mode 100644 index 00000000..6c577f94 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequest.java @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ApplyUpdatesRequest { + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=tonight") + private Optional tonight; + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=skip") + private Optional skip; + + public ApplyUpdatesRequest( + Optional tonight, + Optional skip) { + Utils.checkNotNull(tonight, "tonight"); + Utils.checkNotNull(skip, "skip"); + this.tonight = tonight; + this.skip = skip; + } + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + public Optional tonight() { + return tonight; + } + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ + public Optional skip() { + return skip; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + public ApplyUpdatesRequest withTonight(Tonight tonight) { + Utils.checkNotNull(tonight, "tonight"); + this.tonight = Optional.ofNullable(tonight); + return this; + } + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + public ApplyUpdatesRequest withTonight(Optional tonight) { + Utils.checkNotNull(tonight, "tonight"); + this.tonight = tonight; + return this; + } + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ + public ApplyUpdatesRequest withSkip(Skip skip) { + Utils.checkNotNull(skip, "skip"); + this.skip = Optional.ofNullable(skip); + return this; + } + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ + public ApplyUpdatesRequest withSkip(Optional skip) { + Utils.checkNotNull(skip, "skip"); + this.skip = skip; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplyUpdatesRequest other = (ApplyUpdatesRequest) o; + return + java.util.Objects.deepEquals(this.tonight, other.tonight) && + java.util.Objects.deepEquals(this.skip, other.skip); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tonight, + skip); + } + + @Override + public String toString() { + return Utils.toString(ApplyUpdatesRequest.class, + "tonight", tonight, + "skip", skip); + } + + public final static class Builder { + + private Optional tonight = Optional.empty(); + + private Optional skip = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + public Builder tonight(Tonight tonight) { + Utils.checkNotNull(tonight, "tonight"); + this.tonight = Optional.ofNullable(tonight); + return this; + } + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + public Builder tonight(Optional tonight) { + Utils.checkNotNull(tonight, "tonight"); + this.tonight = tonight; + return this; + } + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ + public Builder skip(Skip skip) { + Utils.checkNotNull(skip, "skip"); + this.skip = Optional.ofNullable(skip); + return this; + } + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ + public Builder skip(Optional skip) { + Utils.checkNotNull(skip, "skip"); + this.skip = skip; + return this; + } + + public ApplyUpdatesRequest build() { + return new ApplyUpdatesRequest( + tonight, + skip); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequestBuilder.java new file mode 100644 index 00000000..f3d258cf --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class ApplyUpdatesRequestBuilder { + + private Optional tonight = Optional.empty(); + private Optional skip = Optional.empty(); + private final SDKMethodInterfaces.MethodCallApplyUpdates sdk; + + public ApplyUpdatesRequestBuilder(SDKMethodInterfaces.MethodCallApplyUpdates sdk) { + this.sdk = sdk; + } + + public ApplyUpdatesRequestBuilder tonight(Tonight tonight) { + Utils.checkNotNull(tonight, "tonight"); + this.tonight = Optional.of(tonight); + return this; + } + + public ApplyUpdatesRequestBuilder tonight(Optional tonight) { + Utils.checkNotNull(tonight, "tonight"); + this.tonight = tonight; + return this; + } + + public ApplyUpdatesRequestBuilder skip(Skip skip) { + Utils.checkNotNull(skip, "skip"); + this.skip = Optional.of(skip); + return this; + } + + public ApplyUpdatesRequestBuilder skip(Optional skip) { + Utils.checkNotNull(skip, "skip"); + this.skip = skip; + return this; + } + + public ApplyUpdatesResponse call() throws Exception { + + return sdk.applyUpdates( + tonight, + skip); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponse.java new file mode 100644 index 00000000..be0619ab --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ApplyUpdatesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public ApplyUpdatesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public ApplyUpdatesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ApplyUpdatesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ApplyUpdatesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public ApplyUpdatesResponse withObject(ApplyUpdatesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public ApplyUpdatesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplyUpdatesResponse other = (ApplyUpdatesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ApplyUpdatesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(ApplyUpdatesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ApplyUpdatesResponse build() { + return new ApplyUpdatesResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponseBody.java new file mode 100644 index 00000000..22bbcb1d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ApplyUpdatesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * ApplyUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class ApplyUpdatesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public ApplyUpdatesResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public ApplyUpdatesResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public ApplyUpdatesResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplyUpdatesResponseBody other = (ApplyUpdatesResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(ApplyUpdatesResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public ApplyUpdatesResponseBody build() { + return new ApplyUpdatesResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTask.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTask.java new file mode 100644 index 00000000..de737de0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTask.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ButlerTask { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("interval") + private Optional interval; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scheduleRandomized") + private Optional scheduleRandomized; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enabled") + private Optional enabled; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("description") + private Optional description; + + public ButlerTask( + @JsonProperty("name") Optional name, + @JsonProperty("interval") Optional interval, + @JsonProperty("scheduleRandomized") Optional scheduleRandomized, + @JsonProperty("enabled") Optional enabled, + @JsonProperty("title") Optional title, + @JsonProperty("description") Optional description) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(interval, "interval"); + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + Utils.checkNotNull(enabled, "enabled"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(description, "description"); + this.name = name; + this.interval = interval; + this.scheduleRandomized = scheduleRandomized; + this.enabled = enabled; + this.title = title; + this.description = description; + } + + public Optional name() { + return name; + } + + public Optional interval() { + return interval; + } + + public Optional scheduleRandomized() { + return scheduleRandomized; + } + + public Optional enabled() { + return enabled; + } + + public Optional title() { + return title; + } + + public Optional description() { + return description; + } + + public final static Builder builder() { + return new Builder(); + } + + public ButlerTask withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public ButlerTask withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public ButlerTask withInterval(double interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = Optional.ofNullable(interval); + return this; + } + + public ButlerTask withInterval(Optional interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = interval; + return this; + } + + public ButlerTask withScheduleRandomized(boolean scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = Optional.ofNullable(scheduleRandomized); + return this; + } + + public ButlerTask withScheduleRandomized(Optional scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = scheduleRandomized; + return this; + } + + public ButlerTask withEnabled(boolean enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public ButlerTask withEnabled(Optional enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = enabled; + return this; + } + + public ButlerTask withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public ButlerTask withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public ButlerTask withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = Optional.ofNullable(description); + return this; + } + + public ButlerTask withDescription(Optional description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ButlerTask other = (ButlerTask) o; + return + java.util.Objects.deepEquals(this.name, other.name) && + java.util.Objects.deepEquals(this.interval, other.interval) && + java.util.Objects.deepEquals(this.scheduleRandomized, other.scheduleRandomized) && + java.util.Objects.deepEquals(this.enabled, other.enabled) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.description, other.description); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + name, + interval, + scheduleRandomized, + enabled, + title, + description); + } + + @Override + public String toString() { + return Utils.toString(ButlerTask.class, + "name", name, + "interval", interval, + "scheduleRandomized", scheduleRandomized, + "enabled", enabled, + "title", title, + "description", description); + } + + public final static class Builder { + + private Optional name = Optional.empty(); + + private Optional interval = Optional.empty(); + + private Optional scheduleRandomized = Optional.empty(); + + private Optional enabled = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional description = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder interval(double interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = Optional.ofNullable(interval); + return this; + } + + public Builder interval(Optional interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = interval; + return this; + } + + public Builder scheduleRandomized(boolean scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = Optional.ofNullable(scheduleRandomized); + return this; + } + + public Builder scheduleRandomized(Optional scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = scheduleRandomized; + return this; + } + + public Builder enabled(boolean enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public Builder enabled(Optional enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = enabled; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = Optional.ofNullable(description); + return this; + } + + public Builder description(Optional description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + public ButlerTask build() { + return new ButlerTask( + name, + interval, + scheduleRandomized, + enabled, + title, + description); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTasks.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTasks.java new file mode 100644 index 00000000..e65a4d0a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ButlerTasks.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ButlerTasks { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ButlerTask") + private Optional> butlerTask; + + public ButlerTasks( + @JsonProperty("ButlerTask") Optional> butlerTask) { + Utils.checkNotNull(butlerTask, "butlerTask"); + this.butlerTask = butlerTask; + } + + public Optional> butlerTask() { + return butlerTask; + } + + public final static Builder builder() { + return new Builder(); + } + + public ButlerTasks withButlerTask(java.util.List butlerTask) { + Utils.checkNotNull(butlerTask, "butlerTask"); + this.butlerTask = Optional.ofNullable(butlerTask); + return this; + } + + public ButlerTasks withButlerTask(Optional> butlerTask) { + Utils.checkNotNull(butlerTask, "butlerTask"); + this.butlerTask = butlerTask; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ButlerTasks other = (ButlerTasks) o; + return + java.util.Objects.deepEquals(this.butlerTask, other.butlerTask); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + butlerTask); + } + + @Override + public String toString() { + return Utils.toString(ButlerTasks.class, + "butlerTask", butlerTask); + } + + public final static class Builder { + + private Optional> butlerTask = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder butlerTask(java.util.List butlerTask) { + Utils.checkNotNull(butlerTask, "butlerTask"); + this.butlerTask = Optional.ofNullable(butlerTask); + return this; + } + + public Builder butlerTask(Optional> butlerTask) { + Utils.checkNotNull(butlerTask, "butlerTask"); + this.butlerTask = butlerTask; + return this; + } + + public ButlerTasks build() { + return new ButlerTasks( + butlerTask); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesErrors.java new file mode 100644 index 00000000..9e7cbfe6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CancelServerActivitiesErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public CancelServerActivitiesErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public CancelServerActivitiesErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public CancelServerActivitiesErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public CancelServerActivitiesErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public CancelServerActivitiesErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public CancelServerActivitiesErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public CancelServerActivitiesErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelServerActivitiesErrors other = (CancelServerActivitiesErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(CancelServerActivitiesErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public CancelServerActivitiesErrors build() { + return new CancelServerActivitiesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequest.java new file mode 100644 index 00000000..9c3c821d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CancelServerActivitiesRequest { + + /** + * The UUID of the activity to cancel. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=activityUUID") + private String activityUUID; + + public CancelServerActivitiesRequest( + String activityUUID) { + Utils.checkNotNull(activityUUID, "activityUUID"); + this.activityUUID = activityUUID; + } + + /** + * The UUID of the activity to cancel. + */ + public String activityUUID() { + return activityUUID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The UUID of the activity to cancel. + */ + public CancelServerActivitiesRequest withActivityUUID(String activityUUID) { + Utils.checkNotNull(activityUUID, "activityUUID"); + this.activityUUID = activityUUID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelServerActivitiesRequest other = (CancelServerActivitiesRequest) o; + return + java.util.Objects.deepEquals(this.activityUUID, other.activityUUID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + activityUUID); + } + + @Override + public String toString() { + return Utils.toString(CancelServerActivitiesRequest.class, + "activityUUID", activityUUID); + } + + public final static class Builder { + + private String activityUUID; + + private Builder() { + // force use of static builder() method + } + + /** + * The UUID of the activity to cancel. + */ + public Builder activityUUID(String activityUUID) { + Utils.checkNotNull(activityUUID, "activityUUID"); + this.activityUUID = activityUUID; + return this; + } + + public CancelServerActivitiesRequest build() { + return new CancelServerActivitiesRequest( + activityUUID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequestBuilder.java new file mode 100644 index 00000000..4144afe8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class CancelServerActivitiesRequestBuilder { + + private String activityUUID; + private final SDKMethodInterfaces.MethodCallCancelServerActivities sdk; + + public CancelServerActivitiesRequestBuilder(SDKMethodInterfaces.MethodCallCancelServerActivities sdk) { + this.sdk = sdk; + } + + public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) { + Utils.checkNotNull(activityUUID, "activityUUID"); + this.activityUUID = activityUUID; + return this; + } + + public CancelServerActivitiesResponse call() throws Exception { + + return sdk.cancelServerActivities( + activityUUID); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponse.java new file mode 100644 index 00000000..31dd037c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CancelServerActivitiesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public CancelServerActivitiesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CancelServerActivitiesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CancelServerActivitiesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CancelServerActivitiesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public CancelServerActivitiesResponse withObject(CancelServerActivitiesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public CancelServerActivitiesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelServerActivitiesResponse other = (CancelServerActivitiesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CancelServerActivitiesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(CancelServerActivitiesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CancelServerActivitiesResponse build() { + return new CancelServerActivitiesResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponseBody.java new file mode 100644 index 00000000..4eca3f96 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CancelServerActivitiesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * CancelServerActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class CancelServerActivitiesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public CancelServerActivitiesResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public CancelServerActivitiesResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public CancelServerActivitiesResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelServerActivitiesResponseBody other = (CancelServerActivitiesResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(CancelServerActivitiesResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public CancelServerActivitiesResponseBody build() { + return new CancelServerActivitiesResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesErrors.java new file mode 100644 index 00000000..803edf9a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CheckForUpdatesErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public CheckForUpdatesErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public CheckForUpdatesErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public CheckForUpdatesErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public CheckForUpdatesErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public CheckForUpdatesErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public CheckForUpdatesErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public CheckForUpdatesErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckForUpdatesErrors other = (CheckForUpdatesErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(CheckForUpdatesErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public CheckForUpdatesErrors build() { + return new CheckForUpdatesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequest.java new file mode 100644 index 00000000..f53f2e02 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequest.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CheckForUpdatesRequest { + + /** + * Indicate that you want to start download any updates found. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=download") + private Optional download; + + public CheckForUpdatesRequest( + Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + } + + /** + * Indicate that you want to start download any updates found. + */ + public Optional download() { + return download; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Indicate that you want to start download any updates found. + */ + public CheckForUpdatesRequest withDownload(Download download) { + Utils.checkNotNull(download, "download"); + this.download = Optional.ofNullable(download); + return this; + } + + /** + * Indicate that you want to start download any updates found. + */ + public CheckForUpdatesRequest withDownload(Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckForUpdatesRequest other = (CheckForUpdatesRequest) o; + return + java.util.Objects.deepEquals(this.download, other.download); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + download); + } + + @Override + public String toString() { + return Utils.toString(CheckForUpdatesRequest.class, + "download", download); + } + + public final static class Builder { + + private Optional download = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Indicate that you want to start download any updates found. + */ + public Builder download(Download download) { + Utils.checkNotNull(download, "download"); + this.download = Optional.ofNullable(download); + return this; + } + + /** + * Indicate that you want to start download any updates found. + */ + public Builder download(Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + return this; + } + + public CheckForUpdatesRequest build() { + return new CheckForUpdatesRequest( + download); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequestBuilder.java new file mode 100644 index 00000000..6d786564 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesRequestBuilder.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class CheckForUpdatesRequestBuilder { + + private Optional download = Optional.empty(); + private final SDKMethodInterfaces.MethodCallCheckForUpdates sdk; + + public CheckForUpdatesRequestBuilder(SDKMethodInterfaces.MethodCallCheckForUpdates sdk) { + this.sdk = sdk; + } + + public CheckForUpdatesRequestBuilder download(Download download) { + Utils.checkNotNull(download, "download"); + this.download = Optional.of(download); + return this; + } + + public CheckForUpdatesRequestBuilder download(Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + return this; + } + + public CheckForUpdatesResponse call() throws Exception { + + return sdk.checkForUpdates( + download); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponse.java new file mode 100644 index 00000000..b0cdb91a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CheckForUpdatesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public CheckForUpdatesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CheckForUpdatesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CheckForUpdatesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CheckForUpdatesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public CheckForUpdatesResponse withObject(CheckForUpdatesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public CheckForUpdatesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckForUpdatesResponse other = (CheckForUpdatesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CheckForUpdatesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(CheckForUpdatesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CheckForUpdatesResponse build() { + return new CheckForUpdatesResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponseBody.java new file mode 100644 index 00000000..029a6042 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CheckForUpdatesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * CheckForUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class CheckForUpdatesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public CheckForUpdatesResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public CheckForUpdatesResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public CheckForUpdatesResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckForUpdatesResponseBody other = (CheckForUpdatesResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(CheckForUpdatesResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public CheckForUpdatesResponseBody build() { + return new CheckForUpdatesResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsErrors.java new file mode 100644 index 00000000..7a0fe54e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ClearPlaylistContentsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public ClearPlaylistContentsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public ClearPlaylistContentsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public ClearPlaylistContentsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public ClearPlaylistContentsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public ClearPlaylistContentsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public ClearPlaylistContentsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public ClearPlaylistContentsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlaylistContentsErrors other = (ClearPlaylistContentsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistContentsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public ClearPlaylistContentsErrors build() { + return new ClearPlaylistContentsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequest.java new file mode 100644 index 00000000..76caf774 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ClearPlaylistContentsRequest { + + /** + * the ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") + private double playlistID; + + public ClearPlaylistContentsRequest( + double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + } + + /** + * the ID of the playlist + */ + public double playlistID() { + return playlistID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the ID of the playlist + */ + public ClearPlaylistContentsRequest withPlaylistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlaylistContentsRequest other = (ClearPlaylistContentsRequest) o; + return + java.util.Objects.deepEquals(this.playlistID, other.playlistID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + playlistID); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistContentsRequest.class, + "playlistID", playlistID); + } + + public final static class Builder { + + private Double playlistID; + + private Builder() { + // force use of static builder() method + } + + /** + * the ID of the playlist + */ + public Builder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public ClearPlaylistContentsRequest build() { + return new ClearPlaylistContentsRequest( + playlistID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequestBuilder.java new file mode 100644 index 00000000..87385609 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class ClearPlaylistContentsRequestBuilder { + + private Double playlistID; + private final SDKMethodInterfaces.MethodCallClearPlaylistContents sdk; + + public ClearPlaylistContentsRequestBuilder(SDKMethodInterfaces.MethodCallClearPlaylistContents sdk) { + this.sdk = sdk; + } + + public ClearPlaylistContentsRequestBuilder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public ClearPlaylistContentsResponse call() throws Exception { + + return sdk.clearPlaylistContents( + playlistID); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponse.java new file mode 100644 index 00000000..f339444f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class ClearPlaylistContentsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public ClearPlaylistContentsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public ClearPlaylistContentsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ClearPlaylistContentsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ClearPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public ClearPlaylistContentsResponse withObject(ClearPlaylistContentsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public ClearPlaylistContentsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlaylistContentsResponse other = (ClearPlaylistContentsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistContentsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(ClearPlaylistContentsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ClearPlaylistContentsResponse build() { + return new ClearPlaylistContentsResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponseBody.java new file mode 100644 index 00000000..1c748508 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/ClearPlaylistContentsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * ClearPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class ClearPlaylistContentsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public ClearPlaylistContentsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public ClearPlaylistContentsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public ClearPlaylistContentsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlaylistContentsResponseBody other = (ClearPlaylistContentsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistContentsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public ClearPlaylistContentsResponseBody build() { + return new ClearPlaylistContentsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Context.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Context.java new file mode 100644 index 00000000..e5603c91 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Context.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Context { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + public Context( + @JsonProperty("librarySectionID") Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public final static Builder builder() { + return new Builder(); + } + + public Context withLibrarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Context withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Context other = (Context) o; + return + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + librarySectionID); + } + + @Override + public String toString() { + return Utils.toString(Context.class, + "librarySectionID", librarySectionID); + } + + public final static class Builder { + + private Optional librarySectionID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder librarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Context build() { + return new Context( + librarySectionID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Country.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Country.java new file mode 100644 index 00000000..dacc6a77 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Country.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Country { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public Country( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public Country withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Country withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Country other = (Country) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(Country.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Country build() { + return new Country( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistErrors.java new file mode 100644 index 00000000..9d55cfaa --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CreatePlaylistErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public CreatePlaylistErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreatePlaylistErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public CreatePlaylistErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public CreatePlaylistErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public CreatePlaylistErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public CreatePlaylistErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public CreatePlaylistErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaylistErrors other = (CreatePlaylistErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public CreatePlaylistErrors build() { + return new CreatePlaylistErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMediaContainer.java new file mode 100644 index 00000000..aa3a59db --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CreatePlaylistMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public CreatePlaylistMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreatePlaylistMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public CreatePlaylistMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public CreatePlaylistMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public CreatePlaylistMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaylistMediaContainer other = (CreatePlaylistMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + metadata); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistMediaContainer.class, + "size", size, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public CreatePlaylistMediaContainer build() { + return new CreatePlaylistMediaContainer( + size, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMetadata.java new file mode 100644 index 00000000..785fd024 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistMetadata.java @@ -0,0 +1,718 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CreatePlaylistMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("smart") + private Optional smart; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistType") + private Optional playlistType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("icon") + private Optional icon; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + public CreatePlaylistMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("summary") Optional summary, + @JsonProperty("smart") Optional smart, + @JsonProperty("playlistType") Optional playlistType, + @JsonProperty("icon") Optional icon, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("composite") Optional composite, + @JsonProperty("duration") Optional duration) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(icon, "icon"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(duration, "duration"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.type = type; + this.title = title; + this.summary = summary; + this.smart = smart; + this.playlistType = playlistType; + this.icon = icon; + this.viewCount = viewCount; + this.lastViewedAt = lastViewedAt; + this.leafCount = leafCount; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.composite = composite; + this.duration = duration; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional summary() { + return summary; + } + + public Optional smart() { + return smart; + } + + public Optional playlistType() { + return playlistType; + } + + public Optional icon() { + return icon; + } + + public Optional viewCount() { + return viewCount; + } + + public Optional lastViewedAt() { + return lastViewedAt; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional composite() { + return composite; + } + + public Optional duration() { + return duration; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreatePlaylistMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public CreatePlaylistMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public CreatePlaylistMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public CreatePlaylistMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public CreatePlaylistMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public CreatePlaylistMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public CreatePlaylistMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public CreatePlaylistMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public CreatePlaylistMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public CreatePlaylistMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public CreatePlaylistMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public CreatePlaylistMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public CreatePlaylistMetadata withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public CreatePlaylistMetadata withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public CreatePlaylistMetadata withPlaylistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public CreatePlaylistMetadata withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public CreatePlaylistMetadata withIcon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public CreatePlaylistMetadata withIcon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public CreatePlaylistMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public CreatePlaylistMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public CreatePlaylistMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public CreatePlaylistMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public CreatePlaylistMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public CreatePlaylistMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public CreatePlaylistMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public CreatePlaylistMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public CreatePlaylistMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public CreatePlaylistMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public CreatePlaylistMetadata withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public CreatePlaylistMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public CreatePlaylistMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public CreatePlaylistMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaylistMetadata other = (CreatePlaylistMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.smart, other.smart) && + java.util.Objects.deepEquals(this.playlistType, other.playlistType) && + java.util.Objects.deepEquals(this.icon, other.icon) && + java.util.Objects.deepEquals(this.viewCount, other.viewCount) && + java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.composite, other.composite) && + java.util.Objects.deepEquals(this.duration, other.duration); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + icon, + viewCount, + lastViewedAt, + leafCount, + addedAt, + updatedAt, + composite, + duration); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "type", type, + "title", title, + "summary", summary, + "smart", smart, + "playlistType", playlistType, + "icon", icon, + "viewCount", viewCount, + "lastViewedAt", lastViewedAt, + "leafCount", leafCount, + "addedAt", addedAt, + "updatedAt", updatedAt, + "composite", composite, + "duration", duration); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional icon = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public Builder playlistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public Builder icon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public Builder icon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public CreatePlaylistMetadata build() { + return new CreatePlaylistMetadata( + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + icon, + viewCount, + lastViewedAt, + leafCount, + addedAt, + updatedAt, + composite, + duration); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistPlaylistsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistPlaylistsResponseBody.java new file mode 100644 index 00000000..05473570 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistPlaylistsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * CreatePlaylistPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class CreatePlaylistPlaylistsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public CreatePlaylistPlaylistsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreatePlaylistPlaylistsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public CreatePlaylistPlaylistsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaylistPlaylistsResponseBody other = (CreatePlaylistPlaylistsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistPlaylistsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public CreatePlaylistPlaylistsResponseBody build() { + return new CreatePlaylistPlaylistsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequest.java new file mode 100644 index 00000000..48474b48 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequest.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CreatePlaylistRequest { + + /** + * name of the playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") + private String title; + + /** + * type of playlist to create + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private QueryParamType type; + + /** + * whether the playlist is smart or not + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=smart") + private Smart smart; + + /** + * the content URI for the playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private String uri; + + /** + * the play queue to copy to a playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueID") + private Optional playQueueID; + + public CreatePlaylistRequest( + String title, + QueryParamType type, + Smart smart, + String uri, + Optional playQueueID) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(playQueueID, "playQueueID"); + this.title = title; + this.type = type; + this.smart = smart; + this.uri = uri; + this.playQueueID = playQueueID; + } + + /** + * name of the playlist + */ + public String title() { + return title; + } + + /** + * type of playlist to create + */ + public QueryParamType type() { + return type; + } + + /** + * whether the playlist is smart or not + */ + public Smart smart() { + return smart; + } + + /** + * the content URI for the playlist + */ + public String uri() { + return uri; + } + + /** + * the play queue to copy to a playlist + */ + public Optional playQueueID() { + return playQueueID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * name of the playlist + */ + public CreatePlaylistRequest withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * type of playlist to create + */ + public CreatePlaylistRequest withType(QueryParamType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * whether the playlist is smart or not + */ + public CreatePlaylistRequest withSmart(Smart smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + /** + * the content URI for the playlist + */ + public CreatePlaylistRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * the play queue to copy to a playlist + */ + public CreatePlaylistRequest withPlayQueueID(double playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + /** + * the play queue to copy to a playlist + */ + public CreatePlaylistRequest withPlayQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaylistRequest other = (CreatePlaylistRequest) o; + return + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.smart, other.smart) && + java.util.Objects.deepEquals(this.uri, other.uri) && + java.util.Objects.deepEquals(this.playQueueID, other.playQueueID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + title, + type, + smart, + uri, + playQueueID); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistRequest.class, + "title", title, + "type", type, + "smart", smart, + "uri", uri, + "playQueueID", playQueueID); + } + + public final static class Builder { + + private String title; + + private QueryParamType type; + + private Smart smart; + + private String uri; + + private Optional playQueueID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * name of the playlist + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * type of playlist to create + */ + public Builder type(QueryParamType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * whether the playlist is smart or not + */ + public Builder smart(Smart smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + /** + * the content URI for the playlist + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * the play queue to copy to a playlist + */ + public Builder playQueueID(double playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + /** + * the play queue to copy to a playlist + */ + public Builder playQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + public CreatePlaylistRequest build() { + return new CreatePlaylistRequest( + title, + type, + smart, + uri, + playQueueID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequestBuilder.java new file mode 100644 index 00000000..5ee54171 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class CreatePlaylistRequestBuilder { + + private CreatePlaylistRequest request; + private final SDKMethodInterfaces.MethodCallCreatePlaylist sdk; + + public CreatePlaylistRequestBuilder(SDKMethodInterfaces.MethodCallCreatePlaylist sdk) { + this.sdk = sdk; + } + + public CreatePlaylistRequestBuilder request(CreatePlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreatePlaylistResponse call() throws Exception { + + return sdk.createPlaylist( + request); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponse.java new file mode 100644 index 00000000..2819e744 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class CreatePlaylistResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * returns all playlists + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public CreatePlaylistResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * returns all playlists + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CreatePlaylistResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreatePlaylistResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreatePlaylistResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * returns all playlists + */ + public CreatePlaylistResponse withTwoHundredApplicationJsonObject(CreatePlaylistResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * returns all playlists + */ + public CreatePlaylistResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public CreatePlaylistResponse withFourHundredAndOneApplicationJsonObject(CreatePlaylistPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public CreatePlaylistResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaylistResponse other = (CreatePlaylistResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * returns all playlists + */ + public Builder twoHundredApplicationJsonObject(CreatePlaylistResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * returns all playlists + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(CreatePlaylistPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public CreatePlaylistResponse build() { + return new CreatePlaylistResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponseBody.java new file mode 100644 index 00000000..19cff6fe --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/CreatePlaylistResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * CreatePlaylistResponseBody - returns all playlists + */ + +public class CreatePlaylistResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public CreatePlaylistResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreatePlaylistResponseBody withMediaContainer(CreatePlaylistMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public CreatePlaylistResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaylistResponseBody other = (CreatePlaylistResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(CreatePlaylistResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(CreatePlaylistMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public CreatePlaylistResponseBody build() { + return new CreatePlaylistResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryErrors.java new file mode 100644 index 00000000..936ce415 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class DeleteLibraryErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public DeleteLibraryErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public DeleteLibraryErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public DeleteLibraryErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public DeleteLibraryErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public DeleteLibraryErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public DeleteLibraryErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public DeleteLibraryErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLibraryErrors other = (DeleteLibraryErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibraryErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public DeleteLibraryErrors build() { + return new DeleteLibraryErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequest.java new file mode 100644 index 00000000..28b1550a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class DeleteLibraryRequest { + + /** + * the Id of the library to query + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private double sectionId; + + public DeleteLibraryRequest( + double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + } + + /** + * the Id of the library to query + */ + public double sectionId() { + return sectionId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the Id of the library to query + */ + public DeleteLibraryRequest withSectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLibraryRequest other = (DeleteLibraryRequest) o; + return + java.util.Objects.deepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + sectionId); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibraryRequest.class, + "sectionId", sectionId); + } + + public final static class Builder { + + private Double sectionId; + + private Builder() { + // force use of static builder() method + } + + /** + * the Id of the library to query + */ + public Builder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public DeleteLibraryRequest build() { + return new DeleteLibraryRequest( + sectionId); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequestBuilder.java new file mode 100644 index 00000000..ea4a4116 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class DeleteLibraryRequestBuilder { + + private Double sectionId; + private final SDKMethodInterfaces.MethodCallDeleteLibrary sdk; + + public DeleteLibraryRequestBuilder(SDKMethodInterfaces.MethodCallDeleteLibrary sdk) { + this.sdk = sdk; + } + + public DeleteLibraryRequestBuilder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public DeleteLibraryResponse call() throws Exception { + + return sdk.deleteLibrary( + sectionId); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponse.java new file mode 100644 index 00000000..002bb8bc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class DeleteLibraryResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public DeleteLibraryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public DeleteLibraryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteLibraryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteLibraryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public DeleteLibraryResponse withObject(DeleteLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public DeleteLibraryResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLibraryResponse other = (DeleteLibraryResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibraryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(DeleteLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public DeleteLibraryResponse build() { + return new DeleteLibraryResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponseBody.java new file mode 100644 index 00000000..5b865786 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeleteLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * DeleteLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class DeleteLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public DeleteLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public DeleteLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public DeleteLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLibraryResponseBody other = (DeleteLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public DeleteLibraryResponseBody build() { + return new DeleteLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistErrors.java new file mode 100644 index 00000000..7207f8cb --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class DeletePlaylistErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public DeletePlaylistErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public DeletePlaylistErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public DeletePlaylistErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public DeletePlaylistErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public DeletePlaylistErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public DeletePlaylistErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public DeletePlaylistErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlaylistErrors other = (DeletePlaylistErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public DeletePlaylistErrors build() { + return new DeletePlaylistErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequest.java new file mode 100644 index 00000000..64e4508b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class DeletePlaylistRequest { + + /** + * the ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") + private double playlistID; + + public DeletePlaylistRequest( + double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + } + + /** + * the ID of the playlist + */ + public double playlistID() { + return playlistID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the ID of the playlist + */ + public DeletePlaylistRequest withPlaylistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlaylistRequest other = (DeletePlaylistRequest) o; + return + java.util.Objects.deepEquals(this.playlistID, other.playlistID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + playlistID); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistRequest.class, + "playlistID", playlistID); + } + + public final static class Builder { + + private Double playlistID; + + private Builder() { + // force use of static builder() method + } + + /** + * the ID of the playlist + */ + public Builder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public DeletePlaylistRequest build() { + return new DeletePlaylistRequest( + playlistID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequestBuilder.java new file mode 100644 index 00000000..12e13e42 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class DeletePlaylistRequestBuilder { + + private Double playlistID; + private final SDKMethodInterfaces.MethodCallDeletePlaylist sdk; + + public DeletePlaylistRequestBuilder(SDKMethodInterfaces.MethodCallDeletePlaylist sdk) { + this.sdk = sdk; + } + + public DeletePlaylistRequestBuilder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public DeletePlaylistResponse call() throws Exception { + + return sdk.deletePlaylist( + playlistID); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponse.java new file mode 100644 index 00000000..8a34ba8c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class DeletePlaylistResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public DeletePlaylistResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public DeletePlaylistResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeletePlaylistResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeletePlaylistResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public DeletePlaylistResponse withObject(DeletePlaylistResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public DeletePlaylistResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlaylistResponse other = (DeletePlaylistResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(DeletePlaylistResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public DeletePlaylistResponse build() { + return new DeletePlaylistResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponseBody.java new file mode 100644 index 00000000..b604bcdf --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/DeletePlaylistResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * DeletePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class DeletePlaylistResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public DeletePlaylistResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public DeletePlaylistResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public DeletePlaylistResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlaylistResponseBody other = (DeletePlaylistResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public DeletePlaylistResponseBody build() { + return new DeletePlaylistResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Device.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Device.java new file mode 100644 index 00000000..eeafaa25 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Device.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Device { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platform") + private Optional platform; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("clientIdentifier") + private Optional clientIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + public Device( + @JsonProperty("id") Optional id, + @JsonProperty("name") Optional name, + @JsonProperty("platform") Optional platform, + @JsonProperty("clientIdentifier") Optional clientIdentifier, + @JsonProperty("createdAt") Optional createdAt) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(createdAt, "createdAt"); + this.id = id; + this.name = name; + this.platform = platform; + this.clientIdentifier = clientIdentifier; + this.createdAt = createdAt; + } + + public Optional id() { + return id; + } + + public Optional name() { + return name; + } + + public Optional platform() { + return platform; + } + + public Optional clientIdentifier() { + return clientIdentifier; + } + + public Optional createdAt() { + return createdAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public Device withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Device withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Device withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Device withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Device withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Device withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public Device withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + public Device withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + public Device withCreatedAt(double createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Device withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Device other = (Device) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.name, other.name) && + java.util.Objects.deepEquals(this.platform, other.platform) && + java.util.Objects.deepEquals(this.clientIdentifier, other.clientIdentifier) && + java.util.Objects.deepEquals(this.createdAt, other.createdAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + name, + platform, + clientIdentifier, + createdAt); + } + + @Override + public String toString() { + return Utils.toString(Device.class, + "id", id, + "name", name, + "platform", platform, + "clientIdentifier", clientIdentifier, + "createdAt", createdAt); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional clientIdentifier = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + public Builder createdAt(double createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Device build() { + return new Device( + id, + name, + platform, + clientIdentifier, + createdAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Director.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Director.java new file mode 100644 index 00000000..9f418323 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Director.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Director { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public Director( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public Director withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Director withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Director other = (Director) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(Director.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Director build() { + return new Director( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Directory.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Directory.java new file mode 100644 index 00000000..dbf4051b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Directory.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Directory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("count") + private Optional count; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + public Directory( + @JsonProperty("count") Optional count, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.count = count; + this.key = key; + this.title = title; + } + + public Optional count() { + return count; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public final static Builder builder() { + return new Builder(); + } + + public Directory withCount(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + public Directory withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public Directory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Directory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Directory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Directory withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Directory other = (Directory) o; + return + java.util.Objects.deepEquals(this.count, other.count) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + count, + key, + title); + } + + @Override + public String toString() { + return Utils.toString(Directory.class, + "count", count, + "key", key, + "title", title); + } + + public final static class Builder { + + private Optional count = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder count(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Directory build() { + return new Directory( + count, + key, + title); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Download.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Download.java new file mode 100644 index 00000000..1b83489d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Download.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Download - Indicate that you want to start download any updates found. + */ +public enum Download { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private Download(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailErrors.java new file mode 100644 index 00000000..eef70ab2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class EnablePaperTrailErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public EnablePaperTrailErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public EnablePaperTrailErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public EnablePaperTrailErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public EnablePaperTrailErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public EnablePaperTrailErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public EnablePaperTrailErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public EnablePaperTrailErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnablePaperTrailErrors other = (EnablePaperTrailErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(EnablePaperTrailErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public EnablePaperTrailErrors build() { + return new EnablePaperTrailErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailRequestBuilder.java new file mode 100644 index 00000000..c60e9fb0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class EnablePaperTrailRequestBuilder { + + private final SDKMethodInterfaces.MethodCallEnablePaperTrail sdk; + + public EnablePaperTrailRequestBuilder(SDKMethodInterfaces.MethodCallEnablePaperTrail sdk) { + this.sdk = sdk; + } + + public EnablePaperTrailResponse call() throws Exception { + + return sdk.enablePaperTrailDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponse.java new file mode 100644 index 00000000..c737e490 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class EnablePaperTrailResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public EnablePaperTrailResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public EnablePaperTrailResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EnablePaperTrailResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnablePaperTrailResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public EnablePaperTrailResponse withObject(EnablePaperTrailResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public EnablePaperTrailResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnablePaperTrailResponse other = (EnablePaperTrailResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(EnablePaperTrailResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(EnablePaperTrailResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public EnablePaperTrailResponse build() { + return new EnablePaperTrailResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponseBody.java new file mode 100644 index 00000000..765806d7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/EnablePaperTrailResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * EnablePaperTrailResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class EnablePaperTrailResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public EnablePaperTrailResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public EnablePaperTrailResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public EnablePaperTrailResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnablePaperTrailResponseBody other = (EnablePaperTrailResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(EnablePaperTrailResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public EnablePaperTrailResponseBody build() { + return new EnablePaperTrailResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Errors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Errors.java new file mode 100644 index 00000000..cbb46bfd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Errors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Errors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public Errors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public Errors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public Errors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public Errors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public Errors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public Errors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Errors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Errors other = (Errors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(Errors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public Errors build() { + return new Errors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Field.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Field.java new file mode 100644 index 00000000..b737d728 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Field.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Field { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subType") + private Optional subType; + + public Field( + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("subType") Optional subType) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(subType, "subType"); + this.key = key; + this.title = title; + this.type = type; + this.subType = subType; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public Optional type() { + return type; + } + + public Optional subType() { + return subType; + } + + public final static Builder builder() { + return new Builder(); + } + + public Field withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Field withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Field withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Field withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Field withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Field withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Field withSubType(String subType) { + Utils.checkNotNull(subType, "subType"); + this.subType = Optional.ofNullable(subType); + return this; + } + + public Field withSubType(Optional subType) { + Utils.checkNotNull(subType, "subType"); + this.subType = subType; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Field other = (Field) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.subType, other.subType); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + title, + type, + subType); + } + + @Override + public String toString() { + return Utils.toString(Field.class, + "key", key, + "title", title, + "type", type, + "subType", subType); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional subType = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder subType(String subType) { + Utils.checkNotNull(subType, "subType"); + this.subType = Optional.ofNullable(subType); + return this; + } + + public Builder subType(Optional subType) { + Utils.checkNotNull(subType, "subType"); + this.subType = subType; + return this; + } + + public Field build() { + return new Field( + key, + title, + type, + subType); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/FieldType.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/FieldType.java new file mode 100644 index 00000000..4150aca8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/FieldType.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class FieldType { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Operator") + private Optional> operator; + + public FieldType( + @JsonProperty("type") Optional type, + @JsonProperty("Operator") Optional> operator) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(operator, "operator"); + this.type = type; + this.operator = operator; + } + + public Optional type() { + return type; + } + + public Optional> operator() { + return operator; + } + + public final static Builder builder() { + return new Builder(); + } + + public FieldType withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public FieldType withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public FieldType withOperator(java.util.List operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = Optional.ofNullable(operator); + return this; + } + + public FieldType withOperator(Optional> operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = operator; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FieldType other = (FieldType) o; + return + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.operator, other.operator); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + type, + operator); + } + + @Override + public String toString() { + return Utils.toString(FieldType.class, + "type", type, + "operator", operator); + } + + public final static class Builder { + + private Optional type = Optional.empty(); + + private Optional> operator = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder operator(java.util.List operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = Optional.ofNullable(operator); + return this; + } + + public Builder operator(Optional> operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = operator; + return this; + } + + public FieldType build() { + return new FieldType( + type, + operator); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Filter.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Filter.java new file mode 100644 index 00000000..17075d08 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Filter.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Filter { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filterType") + private Optional filterType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + public Filter( + @JsonProperty("filter") Optional filter, + @JsonProperty("filterType") Optional filterType, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(filterType, "filterType"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.filter = filter; + this.filterType = filterType; + this.key = key; + this.title = title; + this.type = type; + } + + public Optional filter() { + return filter; + } + + public Optional filterType() { + return filterType; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public Optional type() { + return type; + } + + public final static Builder builder() { + return new Builder(); + } + + public Filter withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Filter withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Filter withFilterType(String filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = Optional.ofNullable(filterType); + return this; + } + + public Filter withFilterType(Optional filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = filterType; + return this; + } + + public Filter withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Filter withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Filter withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Filter withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Filter withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Filter withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Filter other = (Filter) o; + return + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.filterType, other.filterType) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + filter, + filterType, + key, + title, + type); + } + + @Override + public String toString() { + return Utils.toString(Filter.class, + "filter", filter, + "filterType", filterType, + "key", key, + "title", title, + "type", type); + } + + public final static class Builder { + + private Optional filter = Optional.empty(); + + private Optional filterType = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder filterType(String filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = Optional.ofNullable(filterType); + return this; + } + + public Builder filterType(Optional filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = filterType; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Filter build() { + return new Filter( + filter, + filterType, + key, + title, + type); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Force.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Force.java new file mode 100644 index 00000000..6c4b4770 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Force.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Force - Force overwriting of duplicate playlists. + * By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * The `force` argument is used to disable overwriting. + * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * + */ +public enum Force { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private Force(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Genre.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Genre.java new file mode 100644 index 00000000..03d22ac8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Genre.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Genre { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public Genre( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public Genre withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Genre withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Genre other = (Genre) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(Genre.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Genre build() { + return new Genre( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsErrors.java new file mode 100644 index 00000000..8ffe4efa --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetAvailableClientsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetAvailableClientsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetAvailableClientsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetAvailableClientsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetAvailableClientsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetAvailableClientsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetAvailableClientsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetAvailableClientsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableClientsErrors other = (GetAvailableClientsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableClientsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetAvailableClientsErrors build() { + return new GetAvailableClientsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsMediaContainer.java new file mode 100644 index 00000000..1a6db616 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetAvailableClientsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Server") + private Optional> server; + + public GetAvailableClientsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Server") Optional> server) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(server, "server"); + this.size = size; + this.server = server; + } + + public Optional size() { + return size; + } + + public Optional> server() { + return server; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetAvailableClientsMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetAvailableClientsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetAvailableClientsMediaContainer withServer(java.util.List server) { + Utils.checkNotNull(server, "server"); + this.server = Optional.ofNullable(server); + return this; + } + + public GetAvailableClientsMediaContainer withServer(Optional> server) { + Utils.checkNotNull(server, "server"); + this.server = server; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableClientsMediaContainer other = (GetAvailableClientsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.server, other.server); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + server); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableClientsMediaContainer.class, + "size", size, + "server", server); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> server = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder server(java.util.List server) { + Utils.checkNotNull(server, "server"); + this.server = Optional.ofNullable(server); + return this; + } + + public Builder server(Optional> server) { + Utils.checkNotNull(server, "server"); + this.server = server; + return this; + } + + public GetAvailableClientsMediaContainer build() { + return new GetAvailableClientsMediaContainer( + size, + server); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsRequestBuilder.java new file mode 100644 index 00000000..ac83ab03 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetAvailableClientsRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetAvailableClients sdk; + + public GetAvailableClientsRequestBuilder(SDKMethodInterfaces.MethodCallGetAvailableClients sdk) { + this.sdk = sdk; + } + + public GetAvailableClientsResponse call() throws Exception { + + return sdk.getAvailableClientsDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponse.java new file mode 100644 index 00000000..9f8a42be --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetAvailableClientsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Available Clients + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetAvailableClientsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Available Clients + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetAvailableClientsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAvailableClientsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAvailableClientsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Available Clients + */ + public GetAvailableClientsResponse withTwoHundredApplicationJsonObject(GetAvailableClientsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Available Clients + */ + public GetAvailableClientsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetAvailableClientsResponse withFourHundredAndOneApplicationJsonObject(GetAvailableClientsServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetAvailableClientsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableClientsResponse other = (GetAvailableClientsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableClientsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Available Clients + */ + public Builder twoHundredApplicationJsonObject(GetAvailableClientsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Available Clients + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetAvailableClientsServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetAvailableClientsResponse build() { + return new GetAvailableClientsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponseBody.java new file mode 100644 index 00000000..f1d9dc97 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetAvailableClientsResponseBody - Available Clients + */ + +public class GetAvailableClientsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetAvailableClientsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetAvailableClientsResponseBody withMediaContainer(GetAvailableClientsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetAvailableClientsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableClientsResponseBody other = (GetAvailableClientsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableClientsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetAvailableClientsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetAvailableClientsResponseBody build() { + return new GetAvailableClientsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsServerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsServerResponseBody.java new file mode 100644 index 00000000..06d5341a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetAvailableClientsServerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetAvailableClientsServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetAvailableClientsServerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetAvailableClientsServerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetAvailableClientsServerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetAvailableClientsServerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableClientsServerResponseBody other = (GetAvailableClientsServerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableClientsServerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetAvailableClientsServerResponseBody build() { + return new GetAvailableClientsServerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksButlerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksButlerResponseBody.java new file mode 100644 index 00000000..6ad86a3d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksButlerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetButlerTasksButlerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetButlerTasksButlerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetButlerTasksButlerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetButlerTasksButlerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetButlerTasksButlerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetButlerTasksButlerResponseBody other = (GetButlerTasksButlerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetButlerTasksButlerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetButlerTasksButlerResponseBody build() { + return new GetButlerTasksButlerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksErrors.java new file mode 100644 index 00000000..eb1557b7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetButlerTasksErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetButlerTasksErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetButlerTasksErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetButlerTasksErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetButlerTasksErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetButlerTasksErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetButlerTasksErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetButlerTasksErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetButlerTasksErrors other = (GetButlerTasksErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetButlerTasksErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetButlerTasksErrors build() { + return new GetButlerTasksErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksRequestBuilder.java new file mode 100644 index 00000000..21e21bb5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetButlerTasksRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetButlerTasks sdk; + + public GetButlerTasksRequestBuilder(SDKMethodInterfaces.MethodCallGetButlerTasks sdk) { + this.sdk = sdk; + } + + public GetButlerTasksResponse call() throws Exception { + + return sdk.getButlerTasksDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponse.java new file mode 100644 index 00000000..14f4f3cf --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetButlerTasksResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * All butler tasks + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetButlerTasksResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * All butler tasks + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetButlerTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetButlerTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetButlerTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * All butler tasks + */ + public GetButlerTasksResponse withTwoHundredApplicationJsonObject(GetButlerTasksResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * All butler tasks + */ + public GetButlerTasksResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetButlerTasksResponse withFourHundredAndOneApplicationJsonObject(GetButlerTasksButlerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetButlerTasksResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetButlerTasksResponse other = (GetButlerTasksResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetButlerTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * All butler tasks + */ + public Builder twoHundredApplicationJsonObject(GetButlerTasksResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * All butler tasks + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetButlerTasksButlerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetButlerTasksResponse build() { + return new GetButlerTasksResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponseBody.java new file mode 100644 index 00000000..2340f712 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetButlerTasksResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetButlerTasksResponseBody - All butler tasks + */ + +public class GetButlerTasksResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ButlerTasks") + private Optional butlerTasks; + + public GetButlerTasksResponseBody( + @JsonProperty("ButlerTasks") Optional butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = butlerTasks; + } + + public Optional butlerTasks() { + return butlerTasks; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetButlerTasksResponseBody withButlerTasks(ButlerTasks butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = Optional.ofNullable(butlerTasks); + return this; + } + + public GetButlerTasksResponseBody withButlerTasks(Optional butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = butlerTasks; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetButlerTasksResponseBody other = (GetButlerTasksResponseBody) o; + return + java.util.Objects.deepEquals(this.butlerTasks, other.butlerTasks); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + butlerTasks); + } + + @Override + public String toString() { + return Utils.toString(GetButlerTasksResponseBody.class, + "butlerTasks", butlerTasks); + } + + public final static class Builder { + + private Optional butlerTasks = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder butlerTasks(ButlerTasks butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = Optional.ofNullable(butlerTasks); + return this; + } + + public Builder butlerTasks(Optional butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = butlerTasks; + return this; + } + + public GetButlerTasksResponseBody build() { + return new GetButlerTasksResponseBody( + butlerTasks); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesErrors.java new file mode 100644 index 00000000..0a064993 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetDevicesErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetDevicesErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetDevicesErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetDevicesErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetDevicesErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetDevicesErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetDevicesErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetDevicesErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesErrors other = (GetDevicesErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetDevicesErrors build() { + return new GetDevicesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesMediaContainer.java new file mode 100644 index 00000000..aa00b98b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesMediaContainer.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetDevicesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + public GetDevicesMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("Device") Optional> device) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(device, "device"); + this.size = size; + this.identifier = identifier; + this.device = device; + } + + public Optional size() { + return size; + } + + public Optional identifier() { + return identifier; + } + + public Optional> device() { + return device; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetDevicesMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetDevicesMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetDevicesMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetDevicesMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetDevicesMediaContainer withDevice(java.util.List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public GetDevicesMediaContainer withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesMediaContainer other = (GetDevicesMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.device, other.device); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + identifier, + device); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesMediaContainer.class, + "size", size, + "identifier", identifier, + "device", device); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional> device = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder device(java.util.List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public GetDevicesMediaContainer build() { + return new GetDevicesMediaContainer( + size, + identifier, + device); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesRequestBuilder.java new file mode 100644 index 00000000..6f1c322f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetDevicesRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetDevices sdk; + + public GetDevicesRequestBuilder(SDKMethodInterfaces.MethodCallGetDevices sdk) { + this.sdk = sdk; + } + + public GetDevicesResponse call() throws Exception { + + return sdk.getDevicesDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponse.java new file mode 100644 index 00000000..02f3ae90 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetDevicesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Devices + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetDevicesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Devices + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetDevicesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDevicesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDevicesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Devices + */ + public GetDevicesResponse withTwoHundredApplicationJsonObject(GetDevicesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Devices + */ + public GetDevicesResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetDevicesResponse withFourHundredAndOneApplicationJsonObject(GetDevicesServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetDevicesResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesResponse other = (GetDevicesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Devices + */ + public Builder twoHundredApplicationJsonObject(GetDevicesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Devices + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetDevicesServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetDevicesResponse build() { + return new GetDevicesResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponseBody.java new file mode 100644 index 00000000..f8e4d315 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetDevicesResponseBody - Devices + */ + +public class GetDevicesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetDevicesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetDevicesResponseBody withMediaContainer(GetDevicesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetDevicesResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesResponseBody other = (GetDevicesResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetDevicesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetDevicesResponseBody build() { + return new GetDevicesResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesServerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesServerResponseBody.java new file mode 100644 index 00000000..4bc837da --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetDevicesServerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetDevicesServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetDevicesServerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetDevicesServerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetDevicesServerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetDevicesServerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesServerResponseBody other = (GetDevicesServerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesServerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetDevicesServerResponseBody build() { + return new GetDevicesServerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashErrors.java new file mode 100644 index 00000000..5c1c7284 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetFileHashErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetFileHashErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetFileHashErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetFileHashErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetFileHashErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetFileHashErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetFileHashErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetFileHashErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFileHashErrors other = (GetFileHashErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetFileHashErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetFileHashErrors build() { + return new GetFileHashErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequest.java new file mode 100644 index 00000000..9c8fb58c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequest.java @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetFileHashRequest { + + /** + * This is the path to the local file, must be prefixed by `file://` + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private String url; + + /** + * Item type + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + public GetFileHashRequest( + String url, + Optional type) { + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(type, "type"); + this.url = url; + this.type = type; + } + + /** + * This is the path to the local file, must be prefixed by `file://` + */ + public String url() { + return url; + } + + /** + * Item type + */ + public Optional type() { + return type; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * This is the path to the local file, must be prefixed by `file://` + */ + public GetFileHashRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * Item type + */ + public GetFileHashRequest withType(double type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Item type + */ + public GetFileHashRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFileHashRequest other = (GetFileHashRequest) o; + return + java.util.Objects.deepEquals(this.url, other.url) && + java.util.Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + url, + type); + } + + @Override + public String toString() { + return Utils.toString(GetFileHashRequest.class, + "url", url, + "type", type); + } + + public final static class Builder { + + private String url; + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * This is the path to the local file, must be prefixed by `file://` + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * Item type + */ + public Builder type(double type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Item type + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetFileHashRequest build() { + return new GetFileHashRequest( + url, + type); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequestBuilder.java new file mode 100644 index 00000000..77bec0a9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashRequestBuilder.java @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetFileHashRequestBuilder { + + private String url; + private Optional type = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetFileHash sdk; + + public GetFileHashRequestBuilder(SDKMethodInterfaces.MethodCallGetFileHash sdk) { + this.sdk = sdk; + } + + public GetFileHashRequestBuilder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public GetFileHashRequestBuilder type(double type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.of(type); + return this; + } + + public GetFileHashRequestBuilder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetFileHashResponse call() throws Exception { + + return sdk.getFileHash( + url, + type); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponse.java new file mode 100644 index 00000000..76b3b7a9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetFileHashResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public GetFileHashResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetFileHashResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetFileHashResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetFileHashResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetFileHashResponse withObject(GetFileHashResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetFileHashResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFileHashResponse other = (GetFileHashResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetFileHashResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(GetFileHashResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetFileHashResponse build() { + return new GetFileHashResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponseBody.java new file mode 100644 index 00000000..aced6f85 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetFileHashResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetFileHashResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetFileHashResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetFileHashResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetFileHashResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetFileHashResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFileHashResponseBody other = (GetFileHashResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetFileHashResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetFileHashResponseBody build() { + return new GetFileHashResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsErrors.java new file mode 100644 index 00000000..0028f920 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetGlobalHubsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetGlobalHubsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetGlobalHubsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetGlobalHubsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetGlobalHubsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetGlobalHubsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetGlobalHubsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetGlobalHubsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGlobalHubsErrors other = (GetGlobalHubsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetGlobalHubsErrors build() { + return new GetGlobalHubsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsHubsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsHubsResponseBody.java new file mode 100644 index 00000000..a8b4d7a7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsHubsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetGlobalHubsHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetGlobalHubsHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetGlobalHubsHubsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetGlobalHubsHubsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetGlobalHubsHubsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGlobalHubsHubsResponseBody other = (GetGlobalHubsHubsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsHubsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetGlobalHubsHubsResponseBody build() { + return new GetGlobalHubsHubsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMediaContainer.java new file mode 100644 index 00000000..4517b693 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMediaContainer.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetGlobalHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + public GetGlobalHubsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(hub, "hub"); + this.size = size; + this.allowSync = allowSync; + this.identifier = identifier; + this.hub = hub; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional identifier() { + return identifier; + } + + public Optional> hub() { + return hub; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetGlobalHubsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetGlobalHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetGlobalHubsMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetGlobalHubsMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetGlobalHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetGlobalHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetGlobalHubsMediaContainer withHub(java.util.List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public GetGlobalHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGlobalHubsMediaContainer other = (GetGlobalHubsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + identifier, + hub); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsMediaContainer.class, + "size", size, + "allowSync", allowSync, + "identifier", identifier, + "hub", hub); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder hub(java.util.List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetGlobalHubsMediaContainer build() { + return new GetGlobalHubsMediaContainer( + size, + allowSync, + identifier, + hub); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMetadata.java new file mode 100644 index 00000000..6eaeb04f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsMetadata.java @@ -0,0 +1,759 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetGlobalHubsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("smart") + private Optional smart; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistType") + private Optional playlistType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("icon") + private Optional icon; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + public GetGlobalHubsMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("summary") Optional summary, + @JsonProperty("smart") Optional smart, + @JsonProperty("playlistType") Optional playlistType, + @JsonProperty("composite") Optional composite, + @JsonProperty("icon") Optional icon, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("duration") Optional duration, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(icon, "icon"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.type = type; + this.title = title; + this.titleSort = titleSort; + this.summary = summary; + this.smart = smart; + this.playlistType = playlistType; + this.composite = composite; + this.icon = icon; + this.viewCount = viewCount; + this.lastViewedAt = lastViewedAt; + this.duration = duration; + this.leafCount = leafCount; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional titleSort() { + return titleSort; + } + + public Optional summary() { + return summary; + } + + public Optional smart() { + return smart; + } + + public Optional playlistType() { + return playlistType; + } + + public Optional composite() { + return composite; + } + + public Optional icon() { + return icon; + } + + public Optional viewCount() { + return viewCount; + } + + public Optional lastViewedAt() { + return lastViewedAt; + } + + public Optional duration() { + return duration; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetGlobalHubsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetGlobalHubsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetGlobalHubsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetGlobalHubsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetGlobalHubsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetGlobalHubsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetGlobalHubsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetGlobalHubsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetGlobalHubsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetGlobalHubsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetGlobalHubsMetadata withTitleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public GetGlobalHubsMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public GetGlobalHubsMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetGlobalHubsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetGlobalHubsMetadata withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public GetGlobalHubsMetadata withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public GetGlobalHubsMetadata withPlaylistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public GetGlobalHubsMetadata withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public GetGlobalHubsMetadata withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public GetGlobalHubsMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public GetGlobalHubsMetadata withIcon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public GetGlobalHubsMetadata withIcon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public GetGlobalHubsMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public GetGlobalHubsMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public GetGlobalHubsMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public GetGlobalHubsMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public GetGlobalHubsMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetGlobalHubsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetGlobalHubsMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetGlobalHubsMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetGlobalHubsMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetGlobalHubsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetGlobalHubsMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetGlobalHubsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGlobalHubsMetadata other = (GetGlobalHubsMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.titleSort, other.titleSort) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.smart, other.smart) && + java.util.Objects.deepEquals(this.playlistType, other.playlistType) && + java.util.Objects.deepEquals(this.composite, other.composite) && + java.util.Objects.deepEquals(this.icon, other.icon) && + java.util.Objects.deepEquals(this.viewCount, other.viewCount) && + java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + type, + title, + titleSort, + summary, + smart, + playlistType, + composite, + icon, + viewCount, + lastViewedAt, + duration, + leafCount, + addedAt, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "type", type, + "title", title, + "titleSort", titleSort, + "summary", summary, + "smart", smart, + "playlistType", playlistType, + "composite", composite, + "icon", icon, + "viewCount", viewCount, + "lastViewedAt", lastViewedAt, + "duration", duration, + "leafCount", leafCount, + "addedAt", addedAt, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional icon = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder titleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public Builder playlistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Builder icon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public Builder icon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetGlobalHubsMetadata build() { + return new GetGlobalHubsMetadata( + ratingKey, + key, + guid, + type, + title, + titleSort, + summary, + smart, + playlistType, + composite, + icon, + viewCount, + lastViewedAt, + duration, + leafCount, + addedAt, + updatedAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequest.java new file mode 100644 index 00000000..4aef8574 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequest.java @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetGlobalHubsRequest { + + /** + * The number of items to return with each hub. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") + private Optional onlyTransient; + + public GetGlobalHubsRequest( + Optional count, + Optional onlyTransient) { + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.count = count; + this.onlyTransient = onlyTransient; + } + + /** + * The number of items to return with each hub. + */ + public Optional count() { + return count; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public Optional onlyTransient() { + return onlyTransient; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The number of items to return with each hub. + */ + public GetGlobalHubsRequest withCount(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * The number of items to return with each hub. + */ + public GetGlobalHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public GetGlobalHubsRequest withOnlyTransient(OnlyTransient onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public GetGlobalHubsRequest withOnlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGlobalHubsRequest other = (GetGlobalHubsRequest) o; + return + java.util.Objects.deepEquals(this.count, other.count) && + java.util.Objects.deepEquals(this.onlyTransient, other.onlyTransient); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + count, + onlyTransient); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsRequest.class, + "count", count, + "onlyTransient", onlyTransient); + } + + public final static class Builder { + + private Optional count = Optional.empty(); + + private Optional onlyTransient = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The number of items to return with each hub. + */ + public Builder count(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * The number of items to return with each hub. + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public Builder onlyTransient(OnlyTransient onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public Builder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetGlobalHubsRequest build() { + return new GetGlobalHubsRequest( + count, + onlyTransient); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequestBuilder.java new file mode 100644 index 00000000..f79e45df --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetGlobalHubsRequestBuilder { + + private Optional count = Optional.empty(); + private Optional onlyTransient = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetGlobalHubs sdk; + + public GetGlobalHubsRequestBuilder(SDKMethodInterfaces.MethodCallGetGlobalHubs sdk) { + this.sdk = sdk; + } + + public GetGlobalHubsRequestBuilder count(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.of(count); + return this; + } + + public GetGlobalHubsRequestBuilder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public GetGlobalHubsRequestBuilder onlyTransient(OnlyTransient onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.of(onlyTransient); + return this; + } + + public GetGlobalHubsRequestBuilder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetGlobalHubsResponse call() throws Exception { + + return sdk.getGlobalHubs( + count, + onlyTransient); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponse.java new file mode 100644 index 00000000..6bd21704 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetGlobalHubsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * returns global hubs + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetGlobalHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * returns global hubs + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetGlobalHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetGlobalHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetGlobalHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * returns global hubs + */ + public GetGlobalHubsResponse withTwoHundredApplicationJsonObject(GetGlobalHubsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * returns global hubs + */ + public GetGlobalHubsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetGlobalHubsResponse withFourHundredAndOneApplicationJsonObject(GetGlobalHubsHubsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetGlobalHubsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGlobalHubsResponse other = (GetGlobalHubsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * returns global hubs + */ + public Builder twoHundredApplicationJsonObject(GetGlobalHubsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * returns global hubs + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetGlobalHubsHubsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetGlobalHubsResponse build() { + return new GetGlobalHubsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponseBody.java new file mode 100644 index 00000000..9d7d6cf4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetGlobalHubsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetGlobalHubsResponseBody - returns global hubs + */ + +public class GetGlobalHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetGlobalHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetGlobalHubsResponseBody withMediaContainer(GetGlobalHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetGlobalHubsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGlobalHubsResponseBody other = (GetGlobalHubsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetGlobalHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetGlobalHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetGlobalHubsResponseBody build() { + return new GetGlobalHubsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesDirectory.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesDirectory.java new file mode 100644 index 00000000..ba41c659 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesDirectory.java @@ -0,0 +1,923 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibrariesDirectory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filters") + private Optional filters; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("refreshing") + private Optional refreshing; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("agent") + private Optional agent; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scanner") + private Optional scanner; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scannedAt") + private Optional scannedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directory") + private Optional directory; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentChangedAt") + private Optional contentChangedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hidden") + private Optional hidden; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Location") + private Optional> location; + + public GetLibrariesDirectory( + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("art") Optional art, + @JsonProperty("composite") Optional composite, + @JsonProperty("filters") Optional filters, + @JsonProperty("refreshing") Optional refreshing, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("key") Optional key, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("agent") Optional agent, + @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("content") Optional content, + @JsonProperty("directory") Optional directory, + @JsonProperty("contentChangedAt") Optional contentChangedAt, + @JsonProperty("hidden") Optional hidden, + @JsonProperty("Location") Optional> location) { + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(filters, "filters"); + Utils.checkNotNull(refreshing, "refreshing"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(agent, "agent"); + Utils.checkNotNull(scanner, "scanner"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(uuid, "uuid"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(scannedAt, "scannedAt"); + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + Utils.checkNotNull(hidden, "hidden"); + Utils.checkNotNull(location, "location"); + this.allowSync = allowSync; + this.art = art; + this.composite = composite; + this.filters = filters; + this.refreshing = refreshing; + this.thumb = thumb; + this.key = key; + this.type = type; + this.title = title; + this.agent = agent; + this.scanner = scanner; + this.language = language; + this.uuid = uuid; + this.updatedAt = updatedAt; + this.createdAt = createdAt; + this.scannedAt = scannedAt; + this.content = content; + this.directory = directory; + this.contentChangedAt = contentChangedAt; + this.hidden = hidden; + this.location = location; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional art() { + return art; + } + + public Optional composite() { + return composite; + } + + public Optional filters() { + return filters; + } + + public Optional refreshing() { + return refreshing; + } + + public Optional thumb() { + return thumb; + } + + public Optional key() { + return key; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional agent() { + return agent; + } + + public Optional scanner() { + return scanner; + } + + public Optional language() { + return language; + } + + public Optional uuid() { + return uuid; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional createdAt() { + return createdAt; + } + + public Optional scannedAt() { + return scannedAt; + } + + public Optional content() { + return content; + } + + public Optional directory() { + return directory; + } + + public Optional contentChangedAt() { + return contentChangedAt; + } + + public Optional hidden() { + return hidden; + } + + public Optional> location() { + return location; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibrariesDirectory withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetLibrariesDirectory withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetLibrariesDirectory withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetLibrariesDirectory withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetLibrariesDirectory withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public GetLibrariesDirectory withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public GetLibrariesDirectory withFilters(boolean filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + public GetLibrariesDirectory withFilters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + public GetLibrariesDirectory withRefreshing(boolean refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = Optional.ofNullable(refreshing); + return this; + } + + public GetLibrariesDirectory withRefreshing(Optional refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = refreshing; + return this; + } + + public GetLibrariesDirectory withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetLibrariesDirectory withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetLibrariesDirectory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibrariesDirectory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibrariesDirectory withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibrariesDirectory withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibrariesDirectory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibrariesDirectory withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibrariesDirectory withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + public GetLibrariesDirectory withAgent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + public GetLibrariesDirectory withScanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + public GetLibrariesDirectory withScanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + return this; + } + + public GetLibrariesDirectory withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public GetLibrariesDirectory withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public GetLibrariesDirectory withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public GetLibrariesDirectory withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public GetLibrariesDirectory withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetLibrariesDirectory withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetLibrariesDirectory withCreatedAt(int createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public GetLibrariesDirectory withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public GetLibrariesDirectory withScannedAt(int scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = Optional.ofNullable(scannedAt); + return this; + } + + public GetLibrariesDirectory withScannedAt(Optional scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = scannedAt; + return this; + } + + public GetLibrariesDirectory withContent(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public GetLibrariesDirectory withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public GetLibrariesDirectory withDirectory(boolean directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public GetLibrariesDirectory withDirectory(Optional directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetLibrariesDirectory withContentChangedAt(int contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = Optional.ofNullable(contentChangedAt); + return this; + } + + public GetLibrariesDirectory withContentChangedAt(Optional contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = contentChangedAt; + return this; + } + + public GetLibrariesDirectory withHidden(int hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + public GetLibrariesDirectory withHidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + return this; + } + + public GetLibrariesDirectory withLocation(java.util.List location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public GetLibrariesDirectory withLocation(Optional> location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibrariesDirectory other = (GetLibrariesDirectory) o; + return + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.composite, other.composite) && + java.util.Objects.deepEquals(this.filters, other.filters) && + java.util.Objects.deepEquals(this.refreshing, other.refreshing) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.agent, other.agent) && + java.util.Objects.deepEquals(this.scanner, other.scanner) && + java.util.Objects.deepEquals(this.language, other.language) && + java.util.Objects.deepEquals(this.uuid, other.uuid) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.createdAt, other.createdAt) && + java.util.Objects.deepEquals(this.scannedAt, other.scannedAt) && + java.util.Objects.deepEquals(this.content, other.content) && + java.util.Objects.deepEquals(this.directory, other.directory) && + java.util.Objects.deepEquals(this.contentChangedAt, other.contentChangedAt) && + java.util.Objects.deepEquals(this.hidden, other.hidden) && + java.util.Objects.deepEquals(this.location, other.location); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + allowSync, + art, + composite, + filters, + refreshing, + thumb, + key, + type, + title, + agent, + scanner, + language, + uuid, + updatedAt, + createdAt, + scannedAt, + content, + directory, + contentChangedAt, + hidden, + location); + } + + @Override + public String toString() { + return Utils.toString(GetLibrariesDirectory.class, + "allowSync", allowSync, + "art", art, + "composite", composite, + "filters", filters, + "refreshing", refreshing, + "thumb", thumb, + "key", key, + "type", type, + "title", title, + "agent", agent, + "scanner", scanner, + "language", language, + "uuid", uuid, + "updatedAt", updatedAt, + "createdAt", createdAt, + "scannedAt", scannedAt, + "content", content, + "directory", directory, + "contentChangedAt", contentChangedAt, + "hidden", hidden, + "location", location); + } + + public final static class Builder { + + private Optional allowSync = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional filters = Optional.empty(); + + private Optional refreshing = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional agent = Optional.empty(); + + private Optional scanner = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional scannedAt = Optional.empty(); + + private Optional content = Optional.empty(); + + private Optional directory = Optional.empty(); + + private Optional contentChangedAt = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional> location = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Builder filters(boolean filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + public Builder filters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + public Builder refreshing(boolean refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = Optional.ofNullable(refreshing); + return this; + } + + public Builder refreshing(Optional refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = refreshing; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + public Builder agent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + public Builder scanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + public Builder scanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + return this; + } + + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public Builder language(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder createdAt(int createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Builder scannedAt(int scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = Optional.ofNullable(scannedAt); + return this; + } + + public Builder scannedAt(Optional scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = scannedAt; + return this; + } + + public Builder content(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Builder directory(boolean directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public Builder contentChangedAt(int contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = Optional.ofNullable(contentChangedAt); + return this; + } + + public Builder contentChangedAt(Optional contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = contentChangedAt; + return this; + } + + public Builder hidden(int hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + public Builder hidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + return this; + } + + public Builder location(java.util.List location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional> location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public GetLibrariesDirectory build() { + return new GetLibrariesDirectory( + allowSync, + art, + composite, + filters, + refreshing, + thumb, + key, + type, + title, + agent, + scanner, + language, + uuid, + updatedAt, + createdAt, + scannedAt, + content, + directory, + contentChangedAt, + hidden, + location); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesErrors.java new file mode 100644 index 00000000..31bc281b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibrariesErrors { + + @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; + + public GetLibrariesErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibrariesErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetLibrariesErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetLibrariesErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetLibrariesErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetLibrariesErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetLibrariesErrors 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; + } + GetLibrariesErrors other = (GetLibrariesErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetLibrariesErrors.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(double 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(double 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 GetLibrariesErrors build() { + return new GetLibrariesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLibraryResponseBody.java new file mode 100644 index 00000000..e466a157 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetLibrariesLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetLibrariesLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetLibrariesLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibrariesLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetLibrariesLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibrariesLibraryResponseBody other = (GetLibrariesLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetLibrariesLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetLibrariesLibraryResponseBody build() { + return new GetLibrariesLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLocation.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLocation.java new file mode 100644 index 00000000..8e9422ef --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesLocation.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibrariesLocation { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("path") + private Optional path; + + public GetLibrariesLocation( + @JsonProperty("id") Optional id, + @JsonProperty("path") Optional path) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(path, "path"); + this.id = id; + this.path = path; + } + + public Optional id() { + return id; + } + + public Optional path() { + return path; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibrariesLocation withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetLibrariesLocation withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetLibrariesLocation withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + public GetLibrariesLocation withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibrariesLocation other = (GetLibrariesLocation) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.path, other.path); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + path); + } + + @Override + public String toString() { + return Utils.toString(GetLibrariesLocation.class, + "id", id, + "path", path); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional path = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + public GetLibrariesLocation build() { + return new GetLibrariesLocation( + id, + path); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesMediaContainer.java new file mode 100644 index 00000000..557a8696 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesMediaContainer.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibrariesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title1") + private Optional title1; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + public GetLibrariesMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("title1") Optional title1, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(title1, "title1"); + Utils.checkNotNull(directory, "directory"); + this.size = size; + this.allowSync = allowSync; + this.title1 = title1; + this.directory = directory; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional title1() { + return title1; + } + + public Optional> directory() { + return directory; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibrariesMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetLibrariesMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibrariesMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetLibrariesMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetLibrariesMediaContainer withTitle1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public GetLibrariesMediaContainer withTitle1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public GetLibrariesMediaContainer withDirectory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public GetLibrariesMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibrariesMediaContainer other = (GetLibrariesMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.title1, other.title1) && + java.util.Objects.deepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + title1, + directory); + } + + @Override + public String toString() { + return Utils.toString(GetLibrariesMediaContainer.class, + "size", size, + "allowSync", allowSync, + "title1", title1, + "directory", directory); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional title1 = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder title1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public Builder title1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public Builder directory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetLibrariesMediaContainer build() { + return new GetLibrariesMediaContainer( + size, + allowSync, + title1, + directory); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesRequestBuilder.java new file mode 100644 index 00000000..f5e4b18d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetLibrariesRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetLibraries sdk; + + public GetLibrariesRequestBuilder(SDKMethodInterfaces.MethodCallGetLibraries sdk) { + this.sdk = sdk; + } + + public GetLibrariesResponse call() throws Exception { + + return sdk.getLibrariesDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponse.java new file mode 100644 index 00000000..068654d7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibrariesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The libraries available on the Server + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetLibrariesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The libraries available on the Server + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetLibrariesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLibrariesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLibrariesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The libraries available on the Server + */ + public GetLibrariesResponse withTwoHundredApplicationJsonObject(GetLibrariesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The libraries available on the Server + */ + public GetLibrariesResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetLibrariesResponse withFourHundredAndOneApplicationJsonObject(GetLibrariesLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetLibrariesResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibrariesResponse other = (GetLibrariesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetLibrariesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The libraries available on the Server + */ + public Builder twoHundredApplicationJsonObject(GetLibrariesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The libraries available on the Server + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetLibrariesLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetLibrariesResponse build() { + return new GetLibrariesResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponseBody.java new file mode 100644 index 00000000..6e582a1e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibrariesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetLibrariesResponseBody - The libraries available on the Server + */ + +public class GetLibrariesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetLibrariesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibrariesResponseBody withMediaContainer(GetLibrariesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetLibrariesResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibrariesResponseBody other = (GetLibrariesResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetLibrariesResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetLibrariesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetLibrariesResponseBody build() { + return new GetLibrariesResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryDirectory.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryDirectory.java new file mode 100644 index 00000000..282d4916 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryDirectory.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryDirectory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondary") + private Optional secondary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("search") + private Optional search; + + public GetLibraryDirectory( + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title, + @JsonProperty("secondary") Optional secondary, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("search") Optional search) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(secondary, "secondary"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(search, "search"); + this.key = key; + this.title = title; + this.secondary = secondary; + this.prompt = prompt; + this.search = search; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public Optional secondary() { + return secondary; + } + + public Optional prompt() { + return prompt; + } + + public Optional search() { + return search; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryDirectory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryDirectory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryDirectory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryDirectory withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryDirectory withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + public GetLibraryDirectory withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + public GetLibraryDirectory withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + public GetLibraryDirectory withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + public GetLibraryDirectory withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + public GetLibraryDirectory withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryDirectory other = (GetLibraryDirectory) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.secondary, other.secondary) && + java.util.Objects.deepEquals(this.prompt, other.prompt) && + java.util.Objects.deepEquals(this.search, other.search); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + title, + secondary, + prompt, + search); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryDirectory.class, + "key", key, + "title", title, + "secondary", secondary, + "prompt", prompt, + "search", search); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional secondary = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional search = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + public GetLibraryDirectory build() { + return new GetLibraryDirectory( + key, + title, + secondary, + prompt, + search); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryErrors.java new file mode 100644 index 00000000..21abdc07 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryErrors { + + @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; + + public GetLibraryErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetLibraryErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetLibraryErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetLibraryErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetLibraryErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetLibraryErrors 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; + } + GetLibraryErrors other = (GetLibraryErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryErrors.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(double 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(double 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 GetLibraryErrors build() { + return new GetLibraryErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsCountry.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsCountry.java new file mode 100644 index 00000000..f2719eaa --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsCountry.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsCountry { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryHubsCountry( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsCountry withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryHubsCountry withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsCountry other = (GetLibraryHubsCountry) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsCountry.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryHubsCountry build() { + return new GetLibraryHubsCountry( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsDirector.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsDirector.java new file mode 100644 index 00000000..87a58dd1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsDirector.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsDirector { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryHubsDirector( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsDirector withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryHubsDirector withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsDirector other = (GetLibraryHubsDirector) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsDirector.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryHubsDirector build() { + return new GetLibraryHubsDirector( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsErrors.java new file mode 100644 index 00000000..539d4843 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetLibraryHubsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetLibraryHubsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetLibraryHubsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetLibraryHubsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetLibraryHubsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetLibraryHubsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsErrors other = (GetLibraryHubsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetLibraryHubsErrors build() { + return new GetLibraryHubsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsGenre.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsGenre.java new file mode 100644 index 00000000..9d3952b0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsGenre.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsGenre { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryHubsGenre( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsGenre withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryHubsGenre withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsGenre other = (GetLibraryHubsGenre) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsGenre.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryHubsGenre build() { + return new GetLibraryHubsGenre( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHub.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHub.java new file mode 100644 index 00000000..d2e97f53 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHub.java @@ -0,0 +1,554 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsHub { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubIdentifier") + private Optional hubIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("more") + private Optional more; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("style") + private Optional style; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubKey") + private Optional hubKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promoted") + private Optional promoted; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("random") + private Optional random; + + public GetLibraryHubsHub( + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("hubIdentifier") Optional hubIdentifier, + @JsonProperty("context") Optional context, + @JsonProperty("size") Optional size, + @JsonProperty("more") Optional more, + @JsonProperty("style") Optional style, + @JsonProperty("hubKey") Optional hubKey, + @JsonProperty("Metadata") Optional> metadata, + @JsonProperty("promoted") Optional promoted, + @JsonProperty("random") Optional random) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(more, "more"); + Utils.checkNotNull(style, "style"); + Utils.checkNotNull(hubKey, "hubKey"); + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(promoted, "promoted"); + Utils.checkNotNull(random, "random"); + this.key = key; + this.title = title; + this.type = type; + this.hubIdentifier = hubIdentifier; + this.context = context; + this.size = size; + this.more = more; + this.style = style; + this.hubKey = hubKey; + this.metadata = metadata; + this.promoted = promoted; + this.random = random; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public Optional type() { + return type; + } + + public Optional hubIdentifier() { + return hubIdentifier; + } + + public Optional context() { + return context; + } + + public Optional size() { + return size; + } + + public Optional more() { + return more; + } + + public Optional style() { + return style; + } + + public Optional hubKey() { + return hubKey; + } + + public Optional> metadata() { + return metadata; + } + + public Optional promoted() { + return promoted; + } + + public Optional random() { + return random; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsHub withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryHubsHub withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryHubsHub withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryHubsHub withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryHubsHub withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryHubsHub withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryHubsHub withHubIdentifier(String hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = Optional.ofNullable(hubIdentifier); + return this; + } + + public GetLibraryHubsHub withHubIdentifier(Optional hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = hubIdentifier; + return this; + } + + public GetLibraryHubsHub withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public GetLibraryHubsHub withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public GetLibraryHubsHub withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetLibraryHubsHub withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibraryHubsHub withMore(boolean more) { + Utils.checkNotNull(more, "more"); + this.more = Optional.ofNullable(more); + return this; + } + + public GetLibraryHubsHub withMore(Optional more) { + Utils.checkNotNull(more, "more"); + this.more = more; + return this; + } + + public GetLibraryHubsHub withStyle(String style) { + Utils.checkNotNull(style, "style"); + this.style = Optional.ofNullable(style); + return this; + } + + public GetLibraryHubsHub withStyle(Optional style) { + Utils.checkNotNull(style, "style"); + this.style = style; + return this; + } + + public GetLibraryHubsHub withHubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + public GetLibraryHubsHub withHubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + public GetLibraryHubsHub withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetLibraryHubsHub withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetLibraryHubsHub withPromoted(boolean promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = Optional.ofNullable(promoted); + return this; + } + + public GetLibraryHubsHub withPromoted(Optional promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = promoted; + return this; + } + + public GetLibraryHubsHub withRandom(boolean random) { + Utils.checkNotNull(random, "random"); + this.random = Optional.ofNullable(random); + return this; + } + + public GetLibraryHubsHub withRandom(Optional random) { + Utils.checkNotNull(random, "random"); + this.random = random; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsHub other = (GetLibraryHubsHub) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.hubIdentifier, other.hubIdentifier) && + java.util.Objects.deepEquals(this.context, other.context) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.more, other.more) && + java.util.Objects.deepEquals(this.style, other.style) && + java.util.Objects.deepEquals(this.hubKey, other.hubKey) && + java.util.Objects.deepEquals(this.metadata, other.metadata) && + java.util.Objects.deepEquals(this.promoted, other.promoted) && + java.util.Objects.deepEquals(this.random, other.random); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + title, + type, + hubIdentifier, + context, + size, + more, + style, + hubKey, + metadata, + promoted, + random); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsHub.class, + "key", key, + "title", title, + "type", type, + "hubIdentifier", hubIdentifier, + "context", context, + "size", size, + "more", more, + "style", style, + "hubKey", hubKey, + "metadata", metadata, + "promoted", promoted, + "random", random); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional hubIdentifier = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional more = Optional.empty(); + + private Optional style = Optional.empty(); + + private Optional hubKey = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional promoted = Optional.empty(); + + private Optional random = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder hubIdentifier(String hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = Optional.ofNullable(hubIdentifier); + return this; + } + + public Builder hubIdentifier(Optional hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = hubIdentifier; + return this; + } + + public Builder context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder more(boolean more) { + Utils.checkNotNull(more, "more"); + this.more = Optional.ofNullable(more); + return this; + } + + public Builder more(Optional more) { + Utils.checkNotNull(more, "more"); + this.more = more; + return this; + } + + public Builder style(String style) { + Utils.checkNotNull(style, "style"); + this.style = Optional.ofNullable(style); + return this; + } + + public Builder style(Optional style) { + Utils.checkNotNull(style, "style"); + this.style = style; + return this; + } + + public Builder hubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + public Builder hubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public Builder promoted(boolean promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = Optional.ofNullable(promoted); + return this; + } + + public Builder promoted(Optional promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = promoted; + return this; + } + + public Builder random(boolean random) { + Utils.checkNotNull(random, "random"); + this.random = Optional.ofNullable(random); + return this; + } + + public Builder random(Optional random) { + Utils.checkNotNull(random, "random"); + this.random = random; + return this; + } + + public GetLibraryHubsHub build() { + return new GetLibraryHubsHub( + key, + title, + type, + hubIdentifier, + context, + size, + more, + style, + hubKey, + metadata, + promoted, + random); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHubsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHubsResponseBody.java new file mode 100644 index 00000000..61d6e425 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsHubsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetLibraryHubsHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetLibraryHubsHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetLibraryHubsHubsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsHubsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetLibraryHubsHubsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsHubsResponseBody other = (GetLibraryHubsHubsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsHubsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetLibraryHubsHubsResponseBody build() { + return new GetLibraryHubsHubsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMedia.java new file mode 100644 index 00000000..0fec632e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMedia.java @@ -0,0 +1,759 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public GetLibraryHubsMedia( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.optimizedForStreaming = optimizedForStreaming; + this.audioProfile = audioProfile; + this.has64bitOffsets = has64bitOffsets; + this.videoProfile = videoProfile; + this.part = part; + } + + public Optional id() { + return id; + } + + public Optional duration() { + return duration; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional width() { + return width; + } + + public Optional height() { + return height; + } + + public Optional aspectRatio() { + return aspectRatio; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional videoResolution() { + return videoResolution; + } + + public Optional container() { + return container; + } + + public Optional videoFrameRate() { + return videoFrameRate; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsMedia withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetLibraryHubsMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetLibraryHubsMedia withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetLibraryHubsMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetLibraryHubsMedia withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetLibraryHubsMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetLibraryHubsMedia withWidth(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetLibraryHubsMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetLibraryHubsMedia withHeight(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetLibraryHubsMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetLibraryHubsMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public GetLibraryHubsMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public GetLibraryHubsMedia withAudioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetLibraryHubsMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetLibraryHubsMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetLibraryHubsMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetLibraryHubsMedia withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public GetLibraryHubsMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public GetLibraryHubsMedia withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public GetLibraryHubsMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public GetLibraryHubsMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetLibraryHubsMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetLibraryHubsMedia withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public GetLibraryHubsMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public GetLibraryHubsMedia withOptimizedForStreaming(int optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetLibraryHubsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetLibraryHubsMedia withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetLibraryHubsMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetLibraryHubsMedia withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetLibraryHubsMedia withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetLibraryHubsMedia withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetLibraryHubsMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetLibraryHubsMedia withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetLibraryHubsMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsMedia other = (GetLibraryHubsMedia) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.videoResolution, other.videoResolution) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + audioProfile, + has64bitOffsets, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsMedia.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "optimizedForStreaming", optimizedForStreaming, + "audioProfile", audioProfile, + "has64bitOffsets", has64bitOffsets, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder optimizedForStreaming(int optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public GetLibraryHubsMedia build() { + return new GetLibraryHubsMedia( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + audioProfile, + has64bitOffsets, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMediaContainer.java new file mode 100644 index 00000000..6f41111b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMediaContainer.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + public GetLibraryHubsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(hub, "hub"); + this.size = size; + this.allowSync = allowSync; + this.identifier = identifier; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.hub = hub; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional identifier() { + return identifier; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + public Optional> hub() { + return hub; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetLibraryHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibraryHubsMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetLibraryHubsMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetLibraryHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetLibraryHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetLibraryHubsMediaContainer withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetLibraryHubsMediaContainer withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetLibraryHubsMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetLibraryHubsMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetLibraryHubsMediaContainer withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public GetLibraryHubsMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public GetLibraryHubsMediaContainer withHub(java.util.List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public GetLibraryHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsMediaContainer other = (GetLibraryHubsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + java.util.Objects.deepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + hub); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsMediaContainer.class, + "size", size, + "allowSync", allowSync, + "identifier", identifier, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "hub", hub); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder hub(java.util.List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetLibraryHubsMediaContainer build() { + return new GetLibraryHubsMediaContainer( + size, + allowSync, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + hub); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMetadata.java new file mode 100644 index 00000000..6465b78e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsMetadata.java @@ -0,0 +1,1457 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionKey") + private Optional librarySectionKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipCount") + private Optional skipCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + public GetLibraryHubsMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("studio") Optional studio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("rating") Optional rating, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("year") Optional year, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("Media") Optional> media, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("Role") Optional> role, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("skipCount") Optional skipCount, + @JsonProperty("chapterSource") Optional chapterSource) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(skipCount, "skipCount"); + Utils.checkNotNull(chapterSource, "chapterSource"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.studio = studio; + this.type = type; + this.title = title; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionID = librarySectionID; + this.librarySectionKey = librarySectionKey; + this.contentRating = contentRating; + this.summary = summary; + this.rating = rating; + this.audienceRating = audienceRating; + this.viewCount = viewCount; + this.lastViewedAt = lastViewedAt; + this.year = year; + this.tagline = tagline; + this.thumb = thumb; + this.art = art; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.audienceRatingImage = audienceRatingImage; + this.primaryExtraKey = primaryExtraKey; + this.ratingImage = ratingImage; + this.media = media; + this.genre = genre; + this.country = country; + this.director = director; + this.role = role; + this.writer = writer; + this.skipCount = skipCount; + this.chapterSource = chapterSource; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional studio() { + return studio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionKey() { + return librarySectionKey; + } + + public Optional contentRating() { + return contentRating; + } + + public Optional summary() { + return summary; + } + + public Optional rating() { + return rating; + } + + public Optional audienceRating() { + return audienceRating; + } + + public Optional viewCount() { + return viewCount; + } + + public Optional lastViewedAt() { + return lastViewedAt; + } + + public Optional year() { + return year; + } + + public Optional tagline() { + return tagline; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional duration() { + return duration; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional audienceRatingImage() { + return audienceRatingImage; + } + + public Optional primaryExtraKey() { + return primaryExtraKey; + } + + public Optional ratingImage() { + return ratingImage; + } + + public Optional> media() { + return media; + } + + public Optional> genre() { + return genre; + } + + public Optional> country() { + return country; + } + + public Optional> director() { + return director; + } + + public Optional> role() { + return role; + } + + public Optional> writer() { + return writer; + } + + public Optional skipCount() { + return skipCount; + } + + public Optional chapterSource() { + return chapterSource; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetLibraryHubsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetLibraryHubsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryHubsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryHubsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetLibraryHubsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetLibraryHubsMetadata withStudio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public GetLibraryHubsMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public GetLibraryHubsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryHubsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryHubsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryHubsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryHubsMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetLibraryHubsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetLibraryHubsMetadata withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetLibraryHubsMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetLibraryHubsMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public GetLibraryHubsMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public GetLibraryHubsMetadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public GetLibraryHubsMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetLibraryHubsMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetLibraryHubsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetLibraryHubsMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public GetLibraryHubsMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public GetLibraryHubsMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public GetLibraryHubsMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public GetLibraryHubsMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public GetLibraryHubsMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public GetLibraryHubsMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public GetLibraryHubsMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public GetLibraryHubsMetadata withYear(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public GetLibraryHubsMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public GetLibraryHubsMetadata withTagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public GetLibraryHubsMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public GetLibraryHubsMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetLibraryHubsMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetLibraryHubsMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetLibraryHubsMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetLibraryHubsMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetLibraryHubsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetLibraryHubsMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetLibraryHubsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetLibraryHubsMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetLibraryHubsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetLibraryHubsMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetLibraryHubsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetLibraryHubsMetadata withAudienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public GetLibraryHubsMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public GetLibraryHubsMetadata withPrimaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public GetLibraryHubsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public GetLibraryHubsMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public GetLibraryHubsMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public GetLibraryHubsMetadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetLibraryHubsMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetLibraryHubsMetadata withGenre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public GetLibraryHubsMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public GetLibraryHubsMetadata withCountry(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public GetLibraryHubsMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public GetLibraryHubsMetadata withDirector(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public GetLibraryHubsMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public GetLibraryHubsMetadata withRole(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public GetLibraryHubsMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public GetLibraryHubsMetadata withWriter(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public GetLibraryHubsMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public GetLibraryHubsMetadata withSkipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + public GetLibraryHubsMetadata withSkipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + public GetLibraryHubsMetadata withChapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public GetLibraryHubsMetadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsMetadata other = (GetLibraryHubsMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.studio, other.studio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + java.util.Objects.deepEquals(this.contentRating, other.contentRating) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.rating, other.rating) && + java.util.Objects.deepEquals(this.audienceRating, other.audienceRating) && + java.util.Objects.deepEquals(this.viewCount, other.viewCount) && + java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + java.util.Objects.deepEquals(this.year, other.year) && + java.util.Objects.deepEquals(this.tagline, other.tagline) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && + java.util.Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && + java.util.Objects.deepEquals(this.ratingImage, other.ratingImage) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.genre, other.genre) && + java.util.Objects.deepEquals(this.country, other.country) && + java.util.Objects.deepEquals(this.director, other.director) && + java.util.Objects.deepEquals(this.role, other.role) && + java.util.Objects.deepEquals(this.writer, other.writer) && + java.util.Objects.deepEquals(this.skipCount, other.skipCount) && + java.util.Objects.deepEquals(this.chapterSource, other.chapterSource); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + studio, + type, + title, + librarySectionTitle, + librarySectionID, + librarySectionKey, + contentRating, + summary, + rating, + audienceRating, + viewCount, + lastViewedAt, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + primaryExtraKey, + ratingImage, + media, + genre, + country, + director, + role, + writer, + skipCount, + chapterSource); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "studio", studio, + "type", type, + "title", title, + "librarySectionTitle", librarySectionTitle, + "librarySectionID", librarySectionID, + "librarySectionKey", librarySectionKey, + "contentRating", contentRating, + "summary", summary, + "rating", rating, + "audienceRating", audienceRating, + "viewCount", viewCount, + "lastViewedAt", lastViewedAt, + "year", year, + "tagline", tagline, + "thumb", thumb, + "art", art, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "audienceRatingImage", audienceRatingImage, + "primaryExtraKey", primaryExtraKey, + "ratingImage", ratingImage, + "media", media, + "genre", genre, + "country", country, + "director", director, + "role", role, + "writer", writer, + "skipCount", skipCount, + "chapterSource", chapterSource); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional skipCount = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder studio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public Builder librarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public Builder year(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder tagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder audienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Builder primaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder genre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Builder genre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Builder country(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder director(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Builder role(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public Builder writer(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Builder writer(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Builder skipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + public Builder skipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + public Builder chapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public GetLibraryHubsMetadata build() { + return new GetLibraryHubsMetadata( + ratingKey, + key, + guid, + studio, + type, + title, + librarySectionTitle, + librarySectionID, + librarySectionKey, + contentRating, + summary, + rating, + audienceRating, + viewCount, + lastViewedAt, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + primaryExtraKey, + ratingImage, + media, + genre, + country, + director, + role, + writer, + skipCount, + chapterSource); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsPart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsPart.java new file mode 100644 index 00000000..923b9423 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsPart.java @@ -0,0 +1,472 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + public GetLibraryHubsPart( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("container") Optional container, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("videoProfile") Optional videoProfile) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(videoProfile, "videoProfile"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.audioProfile = audioProfile; + this.container = container; + this.has64bitOffsets = has64bitOffsets; + this.optimizedForStreaming = optimizedForStreaming; + this.videoProfile = videoProfile; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional size() { + return size; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional container() { + return container; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional videoProfile() { + return videoProfile; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsPart withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetLibraryHubsPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetLibraryHubsPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryHubsPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryHubsPart withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetLibraryHubsPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetLibraryHubsPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetLibraryHubsPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetLibraryHubsPart withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetLibraryHubsPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibraryHubsPart withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetLibraryHubsPart withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetLibraryHubsPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetLibraryHubsPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetLibraryHubsPart withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetLibraryHubsPart withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetLibraryHubsPart withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetLibraryHubsPart withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetLibraryHubsPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetLibraryHubsPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsPart other = (GetLibraryHubsPart) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + duration, + file, + size, + audioProfile, + container, + has64bitOffsets, + optimizedForStreaming, + videoProfile); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsPart.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "audioProfile", audioProfile, + "container", container, + "has64bitOffsets", has64bitOffsets, + "optimizedForStreaming", optimizedForStreaming, + "videoProfile", videoProfile); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder optimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetLibraryHubsPart build() { + return new GetLibraryHubsPart( + id, + key, + duration, + file, + size, + audioProfile, + container, + has64bitOffsets, + optimizedForStreaming, + videoProfile); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequest.java new file mode 100644 index 00000000..3a0a2a0b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequest.java @@ -0,0 +1,216 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsRequest { + + /** + * the Id of the library to query + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private double sectionId; + + /** + * The number of items to return with each hub. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") + private Optional onlyTransient; + + public GetLibraryHubsRequest( + double sectionId, + Optional count, + Optional onlyTransient) { + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.sectionId = sectionId; + this.count = count; + this.onlyTransient = onlyTransient; + } + + /** + * the Id of the library to query + */ + public double sectionId() { + return sectionId; + } + + /** + * The number of items to return with each hub. + */ + public Optional count() { + return count; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public Optional onlyTransient() { + return onlyTransient; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the Id of the library to query + */ + public GetLibraryHubsRequest withSectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The number of items to return with each hub. + */ + public GetLibraryHubsRequest withCount(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * The number of items to return with each hub. + */ + public GetLibraryHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public GetLibraryHubsRequest withOnlyTransient(QueryParamOnlyTransient onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public GetLibraryHubsRequest withOnlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsRequest other = (GetLibraryHubsRequest) o; + return + java.util.Objects.deepEquals(this.sectionId, other.sectionId) && + java.util.Objects.deepEquals(this.count, other.count) && + java.util.Objects.deepEquals(this.onlyTransient, other.onlyTransient); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + sectionId, + count, + onlyTransient); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsRequest.class, + "sectionId", sectionId, + "count", count, + "onlyTransient", onlyTransient); + } + + public final static class Builder { + + private Double sectionId; + + private Optional count = Optional.empty(); + + private Optional onlyTransient = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * the Id of the library to query + */ + public Builder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The number of items to return with each hub. + */ + public Builder count(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * The number of items to return with each hub. + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public Builder onlyTransient(QueryParamOnlyTransient onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + public Builder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetLibraryHubsRequest build() { + return new GetLibraryHubsRequest( + sectionId, + count, + onlyTransient); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequestBuilder.java new file mode 100644 index 00000000..e9c97f5d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRequestBuilder.java @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetLibraryHubsRequestBuilder { + + private Double sectionId; + private Optional count = Optional.empty(); + private Optional onlyTransient = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetLibraryHubs sdk; + + public GetLibraryHubsRequestBuilder(SDKMethodInterfaces.MethodCallGetLibraryHubs sdk) { + this.sdk = sdk; + } + + public GetLibraryHubsRequestBuilder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetLibraryHubsRequestBuilder count(double count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.of(count); + return this; + } + + public GetLibraryHubsRequestBuilder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public GetLibraryHubsRequestBuilder onlyTransient(QueryParamOnlyTransient onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.of(onlyTransient); + return this; + } + + public GetLibraryHubsRequestBuilder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetLibraryHubsResponse call() throws Exception { + + return sdk.getLibraryHubs( + sectionId, + count, + onlyTransient); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponse.java new file mode 100644 index 00000000..991559e9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The hubs specific to the library + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetLibraryHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The hubs specific to the library + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetLibraryHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLibraryHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLibraryHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The hubs specific to the library + */ + public GetLibraryHubsResponse withTwoHundredApplicationJsonObject(GetLibraryHubsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The hubs specific to the library + */ + public GetLibraryHubsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetLibraryHubsResponse withFourHundredAndOneApplicationJsonObject(GetLibraryHubsHubsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetLibraryHubsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsResponse other = (GetLibraryHubsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The hubs specific to the library + */ + public Builder twoHundredApplicationJsonObject(GetLibraryHubsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The hubs specific to the library + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetLibraryHubsHubsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetLibraryHubsResponse build() { + return new GetLibraryHubsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponseBody.java new file mode 100644 index 00000000..a92803bb --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetLibraryHubsResponseBody - The hubs specific to the library + */ + +public class GetLibraryHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetLibraryHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsResponseBody withMediaContainer(GetLibraryHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetLibraryHubsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsResponseBody other = (GetLibraryHubsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetLibraryHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetLibraryHubsResponseBody build() { + return new GetLibraryHubsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRole.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRole.java new file mode 100644 index 00000000..1b421e98 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsRole.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsRole { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryHubsRole( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsRole withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryHubsRole withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsRole other = (GetLibraryHubsRole) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsRole.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryHubsRole build() { + return new GetLibraryHubsRole( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsWriter.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsWriter.java new file mode 100644 index 00000000..6ac5b76b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryHubsWriter.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryHubsWriter { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryHubsWriter( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryHubsWriter withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryHubsWriter withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryHubsWriter other = (GetLibraryHubsWriter) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryHubsWriter.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryHubsWriter build() { + return new GetLibraryHubsWriter( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsCountry.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsCountry.java new file mode 100644 index 00000000..b77a83a8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsCountry.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsCountry { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryItemsCountry( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsCountry withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryItemsCountry withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsCountry other = (GetLibraryItemsCountry) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsCountry.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsCountry build() { + return new GetLibraryItemsCountry( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsDirector.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsDirector.java new file mode 100644 index 00000000..cef998a6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsDirector.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsDirector { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryItemsDirector( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsDirector withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryItemsDirector withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsDirector other = (GetLibraryItemsDirector) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsDirector.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsDirector build() { + return new GetLibraryItemsDirector( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsGenre.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsGenre.java new file mode 100644 index 00000000..416f77ae --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsGenre.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsGenre { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryItemsGenre( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsGenre withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryItemsGenre withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsGenre other = (GetLibraryItemsGenre) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsGenre.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsGenre build() { + return new GetLibraryItemsGenre( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMedia.java new file mode 100644 index 00000000..bc04ef33 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMedia.java @@ -0,0 +1,636 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public GetLibraryItemsMedia( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.videoProfile = videoProfile; + this.part = part; + } + + public Optional id() { + return id; + } + + public Optional duration() { + return duration; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional width() { + return width; + } + + public Optional height() { + return height; + } + + public Optional aspectRatio() { + return aspectRatio; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional videoResolution() { + return videoResolution; + } + + public Optional container() { + return container; + } + + public Optional videoFrameRate() { + return videoFrameRate; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsMedia withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetLibraryItemsMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetLibraryItemsMedia withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetLibraryItemsMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetLibraryItemsMedia withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetLibraryItemsMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetLibraryItemsMedia withWidth(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetLibraryItemsMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetLibraryItemsMedia withHeight(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetLibraryItemsMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetLibraryItemsMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public GetLibraryItemsMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public GetLibraryItemsMedia withAudioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetLibraryItemsMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetLibraryItemsMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetLibraryItemsMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetLibraryItemsMedia withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public GetLibraryItemsMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public GetLibraryItemsMedia withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public GetLibraryItemsMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public GetLibraryItemsMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetLibraryItemsMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetLibraryItemsMedia withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public GetLibraryItemsMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public GetLibraryItemsMedia withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetLibraryItemsMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetLibraryItemsMedia withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetLibraryItemsMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsMedia other = (GetLibraryItemsMedia) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.videoResolution, other.videoResolution) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsMedia.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public GetLibraryItemsMedia build() { + return new GetLibraryItemsMedia( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMediaContainer.java new file mode 100644 index 00000000..24bf8a63 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMediaContainer.java @@ -0,0 +1,718 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title1") + private Optional title1; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title2") + private Optional title2; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewGroup") + private Optional viewGroup; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewMode") + private Optional viewMode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mixedParents") + private Optional mixedParents; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetLibraryItemsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("art") Optional art, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title1") Optional title1, + @JsonProperty("title2") Optional title2, + @JsonProperty("viewGroup") Optional viewGroup, + @JsonProperty("viewMode") Optional viewMode, + @JsonProperty("mixedParents") Optional mixedParents, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title1, "title1"); + Utils.checkNotNull(title2, "title2"); + Utils.checkNotNull(viewGroup, "viewGroup"); + Utils.checkNotNull(viewMode, "viewMode"); + Utils.checkNotNull(mixedParents, "mixedParents"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.allowSync = allowSync; + this.art = art; + this.identifier = identifier; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.thumb = thumb; + this.title1 = title1; + this.title2 = title2; + this.viewGroup = viewGroup; + this.viewMode = viewMode; + this.mixedParents = mixedParents; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional art() { + return art; + } + + public Optional identifier() { + return identifier; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional thumb() { + return thumb; + } + + public Optional title1() { + return title1; + } + + public Optional title2() { + return title2; + } + + public Optional viewGroup() { + return viewGroup; + } + + public Optional viewMode() { + return viewMode; + } + + public Optional mixedParents() { + return mixedParents; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetLibraryItemsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibraryItemsMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetLibraryItemsMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetLibraryItemsMediaContainer withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetLibraryItemsMediaContainer withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetLibraryItemsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetLibraryItemsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetLibraryItemsMediaContainer withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetLibraryItemsMediaContainer withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetLibraryItemsMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetLibraryItemsMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetLibraryItemsMediaContainer withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public GetLibraryItemsMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public GetLibraryItemsMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetLibraryItemsMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetLibraryItemsMediaContainer withMediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetLibraryItemsMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetLibraryItemsMediaContainer withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetLibraryItemsMediaContainer withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetLibraryItemsMediaContainer withTitle1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public GetLibraryItemsMediaContainer withTitle1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public GetLibraryItemsMediaContainer withTitle2(String title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = Optional.ofNullable(title2); + return this; + } + + public GetLibraryItemsMediaContainer withTitle2(Optional title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = title2; + return this; + } + + public GetLibraryItemsMediaContainer withViewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public GetLibraryItemsMediaContainer withViewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public GetLibraryItemsMediaContainer withViewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public GetLibraryItemsMediaContainer withViewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public GetLibraryItemsMediaContainer withMixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public GetLibraryItemsMediaContainer withMixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + public GetLibraryItemsMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetLibraryItemsMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsMediaContainer other = (GetLibraryItemsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.title1, other.title1) && + java.util.Objects.deepEquals(this.title2, other.title2) && + java.util.Objects.deepEquals(this.viewGroup, other.viewGroup) && + java.util.Objects.deepEquals(this.viewMode, other.viewMode) && + java.util.Objects.deepEquals(this.mixedParents, other.mixedParents) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + art, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, + thumb, + title1, + title2, + viewGroup, + viewMode, + mixedParents, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsMediaContainer.class, + "size", size, + "allowSync", allowSync, + "art", art, + "identifier", identifier, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "thumb", thumb, + "title1", title1, + "title2", title2, + "viewGroup", viewGroup, + "viewMode", viewMode, + "mixedParents", mixedParents, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title1 = Optional.empty(); + + private Optional title2 = Optional.empty(); + + private Optional viewGroup = Optional.empty(); + + private Optional viewMode = Optional.empty(); + + private Optional mixedParents = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder title1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public Builder title1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public Builder title2(String title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = Optional.ofNullable(title2); + return this; + } + + public Builder title2(Optional title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = title2; + return this; + } + + public Builder viewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public Builder viewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public Builder viewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public Builder viewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public Builder mixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public Builder mixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetLibraryItemsMediaContainer build() { + return new GetLibraryItemsMediaContainer( + size, + allowSync, + art, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, + thumb, + title1, + title2, + viewGroup, + viewMode, + mixedParents, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMetadata.java new file mode 100644 index 00000000..56ce0657 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsMetadata.java @@ -0,0 +1,2400 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentGuid") + private Optional grandparentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipCount") + private Optional skipCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("childCount") + private Optional childCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPremiumExtras") + private Optional hasPremiumExtras; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPremiumPrimaryExtra") + private Optional hasPremiumPrimaryExtra; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentGuid") + private Optional parentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentStudio") + private Optional parentStudio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentYear") + private Optional parentYear; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTheme") + private Optional parentTheme; + + public GetLibraryItemsMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("studio") Optional studio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("rating") Optional rating, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("year") Optional year, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentGuid") Optional grandparentGuid, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("Media") Optional> media, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("Role") Optional> role, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("skipCount") Optional skipCount, + @JsonProperty("index") Optional index, + @JsonProperty("theme") Optional theme, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("childCount") Optional childCount, + @JsonProperty("hasPremiumExtras") Optional hasPremiumExtras, + @JsonProperty("hasPremiumPrimaryExtra") Optional hasPremiumPrimaryExtra, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentGuid") Optional parentGuid, + @JsonProperty("parentStudio") Optional parentStudio, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentYear") Optional parentYear, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTheme") Optional parentTheme) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(skipCount, "skipCount"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(childCount, "childCount"); + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentGuid, "parentGuid"); + Utils.checkNotNull(parentStudio, "parentStudio"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentYear, "parentYear"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTheme, "parentTheme"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.studio = studio; + this.type = type; + this.title = title; + this.contentRating = contentRating; + this.summary = summary; + this.rating = rating; + this.audienceRating = audienceRating; + this.year = year; + this.tagline = tagline; + this.thumb = thumb; + this.art = art; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.audienceRatingImage = audienceRatingImage; + this.chapterSource = chapterSource; + this.primaryExtraKey = primaryExtraKey; + this.ratingImage = ratingImage; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentGuid = grandparentGuid; + this.grandparentKey = grandparentKey; + this.grandparentTitle = grandparentTitle; + this.grandparentThumb = grandparentThumb; + this.grandparentArt = grandparentArt; + this.grandparentTheme = grandparentTheme; + this.media = media; + this.genre = genre; + this.country = country; + this.director = director; + this.writer = writer; + this.role = role; + this.titleSort = titleSort; + this.viewCount = viewCount; + this.lastViewedAt = lastViewedAt; + this.originalTitle = originalTitle; + this.viewOffset = viewOffset; + this.skipCount = skipCount; + this.index = index; + this.theme = theme; + this.leafCount = leafCount; + this.viewedLeafCount = viewedLeafCount; + this.childCount = childCount; + this.hasPremiumExtras = hasPremiumExtras; + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + this.parentRatingKey = parentRatingKey; + this.parentGuid = parentGuid; + this.parentStudio = parentStudio; + this.parentKey = parentKey; + this.parentTitle = parentTitle; + this.parentIndex = parentIndex; + this.parentYear = parentYear; + this.parentThumb = parentThumb; + this.parentTheme = parentTheme; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional studio() { + return studio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional contentRating() { + return contentRating; + } + + public Optional summary() { + return summary; + } + + public Optional rating() { + return rating; + } + + public Optional audienceRating() { + return audienceRating; + } + + public Optional year() { + return year; + } + + public Optional tagline() { + return tagline; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional duration() { + return duration; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional audienceRatingImage() { + return audienceRatingImage; + } + + public Optional chapterSource() { + return chapterSource; + } + + public Optional primaryExtraKey() { + return primaryExtraKey; + } + + public Optional ratingImage() { + return ratingImage; + } + + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + public Optional grandparentGuid() { + return grandparentGuid; + } + + public Optional grandparentKey() { + return grandparentKey; + } + + public Optional grandparentTitle() { + return grandparentTitle; + } + + public Optional grandparentThumb() { + return grandparentThumb; + } + + public Optional grandparentArt() { + return grandparentArt; + } + + public Optional grandparentTheme() { + return grandparentTheme; + } + + public Optional> media() { + return media; + } + + public Optional> genre() { + return genre; + } + + public Optional> country() { + return country; + } + + public Optional> director() { + return director; + } + + public Optional> writer() { + return writer; + } + + public Optional> role() { + return role; + } + + public Optional titleSort() { + return titleSort; + } + + public Optional viewCount() { + return viewCount; + } + + public Optional lastViewedAt() { + return lastViewedAt; + } + + public Optional originalTitle() { + return originalTitle; + } + + public Optional viewOffset() { + return viewOffset; + } + + public Optional skipCount() { + return skipCount; + } + + public Optional index() { + return index; + } + + public Optional theme() { + return theme; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + public Optional childCount() { + return childCount; + } + + public Optional hasPremiumExtras() { + return hasPremiumExtras; + } + + public Optional hasPremiumPrimaryExtra() { + return hasPremiumPrimaryExtra; + } + + public Optional parentRatingKey() { + return parentRatingKey; + } + + public Optional parentGuid() { + return parentGuid; + } + + public Optional parentStudio() { + return parentStudio; + } + + public Optional parentKey() { + return parentKey; + } + + public Optional parentTitle() { + return parentTitle; + } + + public Optional parentIndex() { + return parentIndex; + } + + public Optional parentYear() { + return parentYear; + } + + public Optional parentThumb() { + return parentThumb; + } + + public Optional parentTheme() { + return parentTheme; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetLibraryItemsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetLibraryItemsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryItemsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryItemsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetLibraryItemsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetLibraryItemsMetadata withStudio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public GetLibraryItemsMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public GetLibraryItemsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryItemsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryItemsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryItemsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryItemsMetadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public GetLibraryItemsMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetLibraryItemsMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetLibraryItemsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetLibraryItemsMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public GetLibraryItemsMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public GetLibraryItemsMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public GetLibraryItemsMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public GetLibraryItemsMetadata withYear(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public GetLibraryItemsMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public GetLibraryItemsMetadata withTagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public GetLibraryItemsMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public GetLibraryItemsMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetLibraryItemsMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetLibraryItemsMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetLibraryItemsMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetLibraryItemsMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetLibraryItemsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetLibraryItemsMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetLibraryItemsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetLibraryItemsMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetLibraryItemsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetLibraryItemsMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetLibraryItemsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetLibraryItemsMetadata withAudienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public GetLibraryItemsMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public GetLibraryItemsMetadata withChapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public GetLibraryItemsMetadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public GetLibraryItemsMetadata withPrimaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public GetLibraryItemsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public GetLibraryItemsMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public GetLibraryItemsMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public GetLibraryItemsMetadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public GetLibraryItemsMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public GetLibraryItemsMetadata withGrandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + public GetLibraryItemsMetadata withGrandparentGuid(Optional grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = grandparentGuid; + return this; + } + + public GetLibraryItemsMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public GetLibraryItemsMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public GetLibraryItemsMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public GetLibraryItemsMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public GetLibraryItemsMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public GetLibraryItemsMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public GetLibraryItemsMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public GetLibraryItemsMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public GetLibraryItemsMetadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + public GetLibraryItemsMetadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + public GetLibraryItemsMetadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetLibraryItemsMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetLibraryItemsMetadata withGenre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public GetLibraryItemsMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public GetLibraryItemsMetadata withCountry(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public GetLibraryItemsMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public GetLibraryItemsMetadata withDirector(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public GetLibraryItemsMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public GetLibraryItemsMetadata withWriter(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public GetLibraryItemsMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public GetLibraryItemsMetadata withRole(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public GetLibraryItemsMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public GetLibraryItemsMetadata withTitleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public GetLibraryItemsMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public GetLibraryItemsMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public GetLibraryItemsMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public GetLibraryItemsMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public GetLibraryItemsMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public GetLibraryItemsMetadata withOriginalTitle(String originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + public GetLibraryItemsMetadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + public GetLibraryItemsMetadata withViewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + public GetLibraryItemsMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public GetLibraryItemsMetadata withSkipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + public GetLibraryItemsMetadata withSkipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + public GetLibraryItemsMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetLibraryItemsMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetLibraryItemsMetadata withTheme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + public GetLibraryItemsMetadata withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + public GetLibraryItemsMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetLibraryItemsMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetLibraryItemsMetadata withViewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + public GetLibraryItemsMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + public GetLibraryItemsMetadata withChildCount(int childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = Optional.ofNullable(childCount); + return this; + } + + public GetLibraryItemsMetadata withChildCount(Optional childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = childCount; + return this; + } + + public GetLibraryItemsMetadata withHasPremiumExtras(String hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); + return this; + } + + public GetLibraryItemsMetadata withHasPremiumExtras(Optional hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = hasPremiumExtras; + return this; + } + + public GetLibraryItemsMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); + return this; + } + + public GetLibraryItemsMetadata withHasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + return this; + } + + public GetLibraryItemsMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public GetLibraryItemsMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public GetLibraryItemsMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public GetLibraryItemsMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public GetLibraryItemsMetadata withParentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public GetLibraryItemsMetadata withParentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public GetLibraryItemsMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public GetLibraryItemsMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public GetLibraryItemsMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public GetLibraryItemsMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public GetLibraryItemsMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public GetLibraryItemsMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public GetLibraryItemsMetadata withParentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public GetLibraryItemsMetadata withParentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public GetLibraryItemsMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public GetLibraryItemsMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public GetLibraryItemsMetadata withParentTheme(String parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = Optional.ofNullable(parentTheme); + return this; + } + + public GetLibraryItemsMetadata withParentTheme(Optional parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = parentTheme; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsMetadata other = (GetLibraryItemsMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.studio, other.studio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.contentRating, other.contentRating) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.rating, other.rating) && + java.util.Objects.deepEquals(this.audienceRating, other.audienceRating) && + java.util.Objects.deepEquals(this.year, other.year) && + java.util.Objects.deepEquals(this.tagline, other.tagline) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && + java.util.Objects.deepEquals(this.chapterSource, other.chapterSource) && + java.util.Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && + java.util.Objects.deepEquals(this.ratingImage, other.ratingImage) && + java.util.Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + java.util.Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) && + java.util.Objects.deepEquals(this.grandparentKey, other.grandparentKey) && + java.util.Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) && + java.util.Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) && + java.util.Objects.deepEquals(this.grandparentArt, other.grandparentArt) && + java.util.Objects.deepEquals(this.grandparentTheme, other.grandparentTheme) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.genre, other.genre) && + java.util.Objects.deepEquals(this.country, other.country) && + java.util.Objects.deepEquals(this.director, other.director) && + java.util.Objects.deepEquals(this.writer, other.writer) && + java.util.Objects.deepEquals(this.role, other.role) && + java.util.Objects.deepEquals(this.titleSort, other.titleSort) && + java.util.Objects.deepEquals(this.viewCount, other.viewCount) && + java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + java.util.Objects.deepEquals(this.originalTitle, other.originalTitle) && + java.util.Objects.deepEquals(this.viewOffset, other.viewOffset) && + java.util.Objects.deepEquals(this.skipCount, other.skipCount) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.theme, other.theme) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) && + java.util.Objects.deepEquals(this.childCount, other.childCount) && + java.util.Objects.deepEquals(this.hasPremiumExtras, other.hasPremiumExtras) && + java.util.Objects.deepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) && + java.util.Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && + java.util.Objects.deepEquals(this.parentGuid, other.parentGuid) && + java.util.Objects.deepEquals(this.parentStudio, other.parentStudio) && + java.util.Objects.deepEquals(this.parentKey, other.parentKey) && + java.util.Objects.deepEquals(this.parentTitle, other.parentTitle) && + java.util.Objects.deepEquals(this.parentIndex, other.parentIndex) && + java.util.Objects.deepEquals(this.parentYear, other.parentYear) && + java.util.Objects.deepEquals(this.parentThumb, other.parentThumb) && + java.util.Objects.deepEquals(this.parentTheme, other.parentTheme); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + grandparentRatingKey, + grandparentGuid, + grandparentKey, + grandparentTitle, + grandparentThumb, + grandparentArt, + grandparentTheme, + media, + genre, + country, + director, + writer, + role, + titleSort, + viewCount, + lastViewedAt, + originalTitle, + viewOffset, + skipCount, + index, + theme, + leafCount, + viewedLeafCount, + childCount, + hasPremiumExtras, + hasPremiumPrimaryExtra, + parentRatingKey, + parentGuid, + parentStudio, + parentKey, + parentTitle, + parentIndex, + parentYear, + parentThumb, + parentTheme); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "studio", studio, + "type", type, + "title", title, + "contentRating", contentRating, + "summary", summary, + "rating", rating, + "audienceRating", audienceRating, + "year", year, + "tagline", tagline, + "thumb", thumb, + "art", art, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "audienceRatingImage", audienceRatingImage, + "chapterSource", chapterSource, + "primaryExtraKey", primaryExtraKey, + "ratingImage", ratingImage, + "grandparentRatingKey", grandparentRatingKey, + "grandparentGuid", grandparentGuid, + "grandparentKey", grandparentKey, + "grandparentTitle", grandparentTitle, + "grandparentThumb", grandparentThumb, + "grandparentArt", grandparentArt, + "grandparentTheme", grandparentTheme, + "media", media, + "genre", genre, + "country", country, + "director", director, + "writer", writer, + "role", role, + "titleSort", titleSort, + "viewCount", viewCount, + "lastViewedAt", lastViewedAt, + "originalTitle", originalTitle, + "viewOffset", viewOffset, + "skipCount", skipCount, + "index", index, + "theme", theme, + "leafCount", leafCount, + "viewedLeafCount", viewedLeafCount, + "childCount", childCount, + "hasPremiumExtras", hasPremiumExtras, + "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra, + "parentRatingKey", parentRatingKey, + "parentGuid", parentGuid, + "parentStudio", parentStudio, + "parentKey", parentKey, + "parentTitle", parentTitle, + "parentIndex", parentIndex, + "parentYear", parentYear, + "parentThumb", parentThumb, + "parentTheme", parentTheme); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentGuid = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional skipCount = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional childCount = Optional.empty(); + + private Optional hasPremiumExtras = Optional.empty(); + + private Optional hasPremiumPrimaryExtra = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentGuid = Optional.empty(); + + private Optional parentStudio = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentYear = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTheme = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder studio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public Builder year(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder tagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder audienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Builder chapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public Builder primaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public Builder grandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + public Builder grandparentGuid(Optional grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = grandparentGuid; + return this; + } + + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder genre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Builder genre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Builder country(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder director(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Builder writer(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Builder writer(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Builder role(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public Builder titleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public Builder originalTitle(String originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + public Builder viewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public Builder skipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + public Builder skipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder theme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder viewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + public Builder childCount(int childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = Optional.ofNullable(childCount); + return this; + } + + public Builder childCount(Optional childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = childCount; + return this; + } + + public Builder hasPremiumExtras(String hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); + return this; + } + + public Builder hasPremiumExtras(Optional hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = hasPremiumExtras; + return this; + } + + public Builder hasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); + return this; + } + + public Builder hasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + return this; + } + + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public Builder parentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public Builder parentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public Builder parentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public Builder parentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public Builder parentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public Builder parentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public Builder parentTheme(String parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = Optional.ofNullable(parentTheme); + return this; + } + + public Builder parentTheme(Optional parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = parentTheme; + return this; + } + + public GetLibraryItemsMetadata build() { + return new GetLibraryItemsMetadata( + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + grandparentRatingKey, + grandparentGuid, + grandparentKey, + grandparentTitle, + grandparentThumb, + grandparentArt, + grandparentTheme, + media, + genre, + country, + director, + writer, + role, + titleSort, + viewCount, + lastViewedAt, + originalTitle, + viewOffset, + skipCount, + index, + theme, + leafCount, + viewedLeafCount, + childCount, + hasPremiumExtras, + hasPremiumPrimaryExtra, + parentRatingKey, + parentGuid, + parentStudio, + parentKey, + parentTitle, + parentIndex, + parentYear, + parentThumb, + parentTheme); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsPart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsPart.java new file mode 100644 index 00000000..8658a8f6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsPart.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + public GetLibraryItemsPart( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("container") Optional container, + @JsonProperty("videoProfile") Optional videoProfile) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoProfile, "videoProfile"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.container = container; + this.videoProfile = videoProfile; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional size() { + return size; + } + + public Optional container() { + return container; + } + + public Optional videoProfile() { + return videoProfile; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsPart withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetLibraryItemsPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetLibraryItemsPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryItemsPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryItemsPart withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetLibraryItemsPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetLibraryItemsPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetLibraryItemsPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetLibraryItemsPart withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetLibraryItemsPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibraryItemsPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetLibraryItemsPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetLibraryItemsPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetLibraryItemsPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsPart other = (GetLibraryItemsPart) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + duration, + file, + size, + container, + videoProfile); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsPart.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "container", container, + "videoProfile", videoProfile); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetLibraryItemsPart build() { + return new GetLibraryItemsPart( + id, + key, + duration, + file, + size, + container, + videoProfile); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequest.java new file mode 100644 index 00000000..bfa73377 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequest.java @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsRequest { + + /** + * the Id of the library to query + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * A key representing a specific tag within the section. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tag") + private Tag tag; + + public GetLibraryItemsRequest( + long sectionId, + Tag tag) { + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(tag, "tag"); + this.sectionId = sectionId; + this.tag = tag; + } + + /** + * the Id of the library to query + */ + public long sectionId() { + return sectionId; + } + + /** + * A key representing a specific tag within the section. + */ + public Tag tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the Id of the library to query + */ + public GetLibraryItemsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * A key representing a specific tag within the section. + */ + public GetLibraryItemsRequest withTag(Tag tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsRequest other = (GetLibraryItemsRequest) o; + return + java.util.Objects.deepEquals(this.sectionId, other.sectionId) && + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + sectionId, + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsRequest.class, + "sectionId", sectionId, + "tag", tag); + } + + public final static class Builder { + + private Long sectionId; + + private Tag tag; + + private Builder() { + // force use of static builder() method + } + + /** + * the Id of the library to query + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * A key representing a specific tag within the section. + */ + public Builder tag(Tag tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsRequest build() { + return new GetLibraryItemsRequest( + sectionId, + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequestBuilder.java new file mode 100644 index 00000000..143cc536 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetLibraryItemsRequestBuilder { + + private Long sectionId; + private Tag tag; + private final SDKMethodInterfaces.MethodCallGetLibraryItems sdk; + + public GetLibraryItemsRequestBuilder(SDKMethodInterfaces.MethodCallGetLibraryItems sdk) { + this.sdk = sdk; + } + + public GetLibraryItemsRequestBuilder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetLibraryItemsRequestBuilder tag(Tag tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsResponse call() throws Exception { + + return sdk.getLibraryItems( + sectionId, + tag); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponse.java new file mode 100644 index 00000000..af40b888 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The contents of the library by section and tag + */ + private Optional object; + + public GetLibraryItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The contents of the library by section and tag + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetLibraryItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLibraryItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLibraryItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The contents of the library by section and tag + */ + public GetLibraryItemsResponse withObject(GetLibraryItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The contents of the library by section and tag + */ + public GetLibraryItemsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsResponse other = (GetLibraryItemsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The contents of the library by section and tag + */ + public Builder object(GetLibraryItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The contents of the library by section and tag + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetLibraryItemsResponse build() { + return new GetLibraryItemsResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponseBody.java new file mode 100644 index 00000000..933d37de --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetLibraryItemsResponseBody - The contents of the library by section and tag + */ + +public class GetLibraryItemsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetLibraryItemsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsResponseBody withMediaContainer(GetLibraryItemsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetLibraryItemsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsResponseBody other = (GetLibraryItemsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetLibraryItemsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetLibraryItemsResponseBody build() { + return new GetLibraryItemsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRole.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRole.java new file mode 100644 index 00000000..48380412 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsRole.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsRole { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryItemsRole( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsRole withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryItemsRole withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsRole other = (GetLibraryItemsRole) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsRole.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsRole build() { + return new GetLibraryItemsRole( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsWriter.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsWriter.java new file mode 100644 index 00000000..3891d548 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryItemsWriter.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryItemsWriter { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetLibraryItemsWriter( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsWriter withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetLibraryItemsWriter withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsWriter other = (GetLibraryItemsWriter) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsWriter.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetLibraryItemsWriter build() { + return new GetLibraryItemsWriter( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryLibraryResponseBody.java new file mode 100644 index 00000000..87105d81 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetLibraryLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetLibraryLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetLibraryLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetLibraryLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryLibraryResponseBody other = (GetLibraryLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetLibraryLibraryResponseBody build() { + return new GetLibraryLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryMediaContainer.java new file mode 100644 index 00000000..60b4dede --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryMediaContainer.java @@ -0,0 +1,677 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title1") + private Optional title1; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewGroup") + private Optional viewGroup; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewMode") + private Optional viewMode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Type") + private Optional> type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("FieldType") + private Optional> fieldType; + + public GetLibraryMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("art") Optional art, + @JsonProperty("content") Optional content, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title1") Optional title1, + @JsonProperty("viewGroup") Optional viewGroup, + @JsonProperty("viewMode") Optional viewMode, + @JsonProperty("Directory") Optional> directory, + @JsonProperty("Type") Optional> type, + @JsonProperty("FieldType") Optional> fieldType) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title1, "title1"); + Utils.checkNotNull(viewGroup, "viewGroup"); + Utils.checkNotNull(viewMode, "viewMode"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(fieldType, "fieldType"); + this.size = size; + this.allowSync = allowSync; + this.art = art; + this.content = content; + this.identifier = identifier; + this.librarySectionID = librarySectionID; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.thumb = thumb; + this.title1 = title1; + this.viewGroup = viewGroup; + this.viewMode = viewMode; + this.directory = directory; + this.type = type; + this.fieldType = fieldType; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional art() { + return art; + } + + public Optional content() { + return content; + } + + public Optional identifier() { + return identifier; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional thumb() { + return thumb; + } + + public Optional title1() { + return title1; + } + + public Optional viewGroup() { + return viewGroup; + } + + public Optional viewMode() { + return viewMode; + } + + public Optional> directory() { + return directory; + } + + public Optional> type() { + return type; + } + + public Optional> fieldType() { + return fieldType; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetLibraryMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibraryMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetLibraryMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetLibraryMediaContainer withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetLibraryMediaContainer withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetLibraryMediaContainer withContent(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public GetLibraryMediaContainer withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public GetLibraryMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetLibraryMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetLibraryMediaContainer withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetLibraryMediaContainer withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetLibraryMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetLibraryMediaContainer withMediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetLibraryMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetLibraryMediaContainer withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetLibraryMediaContainer withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetLibraryMediaContainer withTitle1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public GetLibraryMediaContainer withTitle1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public GetLibraryMediaContainer withViewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public GetLibraryMediaContainer withViewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public GetLibraryMediaContainer withViewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public GetLibraryMediaContainer withViewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public GetLibraryMediaContainer withDirectory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public GetLibraryMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetLibraryMediaContainer withType(java.util.List type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryMediaContainer withType(Optional> type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryMediaContainer withFieldType(java.util.List fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = Optional.ofNullable(fieldType); + return this; + } + + public GetLibraryMediaContainer withFieldType(Optional> fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = fieldType; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryMediaContainer other = (GetLibraryMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.content, other.content) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.title1, other.title1) && + java.util.Objects.deepEquals(this.viewGroup, other.viewGroup) && + java.util.Objects.deepEquals(this.viewMode, other.viewMode) && + java.util.Objects.deepEquals(this.directory, other.directory) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.fieldType, other.fieldType); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + art, + content, + identifier, + librarySectionID, + mediaTagPrefix, + mediaTagVersion, + thumb, + title1, + viewGroup, + viewMode, + directory, + type, + fieldType); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryMediaContainer.class, + "size", size, + "allowSync", allowSync, + "art", art, + "content", content, + "identifier", identifier, + "librarySectionID", librarySectionID, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "thumb", thumb, + "title1", title1, + "viewGroup", viewGroup, + "viewMode", viewMode, + "directory", directory, + "type", type, + "fieldType", fieldType); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional content = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title1 = Optional.empty(); + + private Optional viewGroup = Optional.empty(); + + private Optional viewMode = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Optional> type = Optional.empty(); + + private Optional> fieldType = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder content(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder title1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public Builder title1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public Builder viewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public Builder viewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public Builder viewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public Builder viewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public Builder directory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public Builder type(java.util.List type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional> type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder fieldType(java.util.List fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = Optional.ofNullable(fieldType); + return this; + } + + public Builder fieldType(Optional> fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = fieldType; + return this; + } + + public GetLibraryMediaContainer build() { + return new GetLibraryMediaContainer( + size, + allowSync, + art, + content, + identifier, + librarySectionID, + mediaTagPrefix, + mediaTagVersion, + thumb, + title1, + viewGroup, + viewMode, + directory, + type, + fieldType); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequest.java new file mode 100644 index 00000000..ad2bbc4a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequest.java @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryRequest { + + /** + * the Id of the library to query + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private double sectionId; + + /** + * Whether or not to include details for a section (types, filters, and sorts). + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeDetails") + private Optional includeDetails; + + public GetLibraryRequest( + double sectionId, + Optional includeDetails) { + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(includeDetails, "includeDetails"); + this.sectionId = sectionId; + this.includeDetails = includeDetails; + } + + /** + * the Id of the library to query + */ + public double sectionId() { + return sectionId; + } + + /** + * Whether or not to include details for a section (types, filters, and sorts). + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ + public Optional includeDetails() { + return includeDetails; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the Id of the library to query + */ + public GetLibraryRequest withSectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Whether or not to include details for a section (types, filters, and sorts). + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ + public GetLibraryRequest withIncludeDetails(IncludeDetails includeDetails) { + Utils.checkNotNull(includeDetails, "includeDetails"); + this.includeDetails = Optional.ofNullable(includeDetails); + return this; + } + + /** + * Whether or not to include details for a section (types, filters, and sorts). + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ + public GetLibraryRequest withIncludeDetails(Optional includeDetails) { + Utils.checkNotNull(includeDetails, "includeDetails"); + this.includeDetails = includeDetails; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryRequest other = (GetLibraryRequest) o; + return + java.util.Objects.deepEquals(this.sectionId, other.sectionId) && + java.util.Objects.deepEquals(this.includeDetails, other.includeDetails); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + sectionId, + includeDetails); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryRequest.class, + "sectionId", sectionId, + "includeDetails", includeDetails); + } + + public final static class Builder { + + private Double sectionId; + + private Optional includeDetails; + + private Builder() { + // force use of static builder() method + } + + /** + * the Id of the library to query + */ + public Builder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Whether or not to include details for a section (types, filters, and sorts). + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ + public Builder includeDetails(IncludeDetails includeDetails) { + Utils.checkNotNull(includeDetails, "includeDetails"); + this.includeDetails = Optional.ofNullable(includeDetails); + return this; + } + + /** + * Whether or not to include details for a section (types, filters, and sorts). + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ + public Builder includeDetails(Optional includeDetails) { + Utils.checkNotNull(includeDetails, "includeDetails"); + this.includeDetails = includeDetails; + return this; + } + + public GetLibraryRequest build() { + if (includeDetails == null) { + includeDetails = _SINGLETON_VALUE_IncludeDetails.value(); + } + return new GetLibraryRequest( + sectionId, + includeDetails); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_IncludeDetails = + new LazySingletonValue<>( + "includeDetails", + "0", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequestBuilder.java new file mode 100644 index 00000000..e67444a4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryRequestBuilder.java @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetLibraryRequestBuilder { + + private Double sectionId; + private Optional includeDetails = Utils.readDefaultOrConstValue( + "includeDetails", + "0", + new TypeReference>() {}); + private final SDKMethodInterfaces.MethodCallGetLibrary sdk; + + public GetLibraryRequestBuilder(SDKMethodInterfaces.MethodCallGetLibrary sdk) { + this.sdk = sdk; + } + + public GetLibraryRequestBuilder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetLibraryRequestBuilder includeDetails(IncludeDetails includeDetails) { + Utils.checkNotNull(includeDetails, "includeDetails"); + this.includeDetails = Optional.of(includeDetails); + return this; + } + + public GetLibraryRequestBuilder includeDetails(Optional includeDetails) { + Utils.checkNotNull(includeDetails, "includeDetails"); + this.includeDetails = includeDetails; + return this; + } + + public GetLibraryResponse call() throws Exception { + if (includeDetails == null) { + includeDetails = _SINGLETON_VALUE_IncludeDetails.value(); + } + + return sdk.getLibrary( + sectionId, + includeDetails); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_IncludeDetails = + new LazySingletonValue<>( + "includeDetails", + "0", + new TypeReference>() {}); +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponse.java new file mode 100644 index 00000000..00633097 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The details of the library + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetLibraryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The details of the library + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetLibraryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLibraryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLibraryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The details of the library + */ + public GetLibraryResponse withTwoHundredApplicationJsonObject(GetLibraryResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The details of the library + */ + public GetLibraryResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetLibraryResponse withFourHundredAndOneApplicationJsonObject(GetLibraryLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetLibraryResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryResponse other = (GetLibraryResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The details of the library + */ + public Builder twoHundredApplicationJsonObject(GetLibraryResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The details of the library + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetLibraryLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetLibraryResponse build() { + return new GetLibraryResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponseBody.java new file mode 100644 index 00000000..5fa09c4c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetLibraryResponseBody - The details of the library + */ + +public class GetLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetLibraryResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryResponseBody withMediaContainer(GetLibraryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetLibraryResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryResponseBody other = (GetLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetLibraryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetLibraryResponseBody build() { + return new GetLibraryResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryType.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryType.java new file mode 100644 index 00000000..26bb80cc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetLibraryType.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetLibraryType { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("active") + private Optional active; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Field") + private Optional> field; + + public GetLibraryType( + @JsonProperty("key") Optional key, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("active") Optional active, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("Field") Optional> field) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(active, "active"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(field, "field"); + this.key = key; + this.type = type; + this.title = title; + this.active = active; + this.filter = filter; + this.sort = sort; + this.field = field; + } + + public Optional key() { + return key; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional active() { + return active; + } + + public Optional> filter() { + return filter; + } + + public Optional> sort() { + return sort; + } + + public Optional> field() { + return field; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryType withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryType withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryType withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryType withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryType withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryType withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryType withActive(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = Optional.ofNullable(active); + return this; + } + + public GetLibraryType withActive(Optional active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + public GetLibraryType withFilter(java.util.List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetLibraryType withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetLibraryType withSort(java.util.List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + public GetLibraryType withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + public GetLibraryType withField(java.util.List field) { + Utils.checkNotNull(field, "field"); + this.field = Optional.ofNullable(field); + return this; + } + + public GetLibraryType withField(Optional> field) { + Utils.checkNotNull(field, "field"); + this.field = field; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryType other = (GetLibraryType) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.active, other.active) && + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.sort, other.sort) && + java.util.Objects.deepEquals(this.field, other.field); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + type, + title, + active, + filter, + sort, + field); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryType.class, + "key", key, + "type", type, + "title", title, + "active", active, + "filter", filter, + "sort", sort, + "field", field); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional active = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional> field = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder active(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = Optional.ofNullable(active); + return this; + } + + public Builder active(Optional active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + public Builder filter(java.util.List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder sort(java.util.List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + public Builder field(java.util.List field) { + Utils.checkNotNull(field, "field"); + this.field = Optional.ofNullable(field); + return this; + } + + public Builder field(Optional> field) { + Utils.checkNotNull(field, "field"); + this.field = field; + return this; + } + + public GetLibraryType build() { + return new GetLibraryType( + key, + type, + title, + active, + filter, + sort, + field); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenDirectory.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenDirectory.java new file mode 100644 index 00000000..9b00cbe8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenDirectory.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataChildrenDirectory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + public GetMetadataChildrenDirectory( + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.leafCount = leafCount; + this.thumb = thumb; + this.viewedLeafCount = viewedLeafCount; + this.key = key; + this.title = title; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional thumb() { + return thumb; + } + + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataChildrenDirectory withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetMetadataChildrenDirectory withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetMetadataChildrenDirectory withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetMetadataChildrenDirectory withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMetadataChildrenDirectory withViewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + public GetMetadataChildrenDirectory withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + public GetMetadataChildrenDirectory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetMetadataChildrenDirectory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetMetadataChildrenDirectory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetMetadataChildrenDirectory withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenDirectory other = (GetMetadataChildrenDirectory) o; + return + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + leafCount, + thumb, + viewedLeafCount, + key, + title); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenDirectory.class, + "leafCount", leafCount, + "thumb", thumb, + "viewedLeafCount", viewedLeafCount, + "key", key, + "title", title); + } + + public final static class Builder { + + private Optional leafCount = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder viewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetMetadataChildrenDirectory build() { + return new GetMetadataChildrenDirectory( + leafCount, + thumb, + viewedLeafCount, + key, + title); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenErrors.java new file mode 100644 index 00000000..cf78682a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataChildrenErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetMetadataChildrenErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataChildrenErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetMetadataChildrenErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetMetadataChildrenErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetMetadataChildrenErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetMetadataChildrenErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetMetadataChildrenErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenErrors other = (GetMetadataChildrenErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetMetadataChildrenErrors build() { + return new GetMetadataChildrenErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenLibraryResponseBody.java new file mode 100644 index 00000000..420cde9e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetMetadataChildrenLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetMetadataChildrenLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetMetadataChildrenLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataChildrenLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetMetadataChildrenLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenLibraryResponseBody other = (GetMetadataChildrenLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetMetadataChildrenLibraryResponseBody build() { + return new GetMetadataChildrenLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMediaContainer.java new file mode 100644 index 00000000..69a0a82c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMediaContainer.java @@ -0,0 +1,1005 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataChildrenMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("nocache") + private Optional nocache; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentYear") + private Optional parentYear; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title1") + private Optional title1; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title2") + private Optional title2; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewGroup") + private Optional viewGroup; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewMode") + private Optional viewMode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetMetadataChildrenMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("art") Optional art, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("key") Optional key, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("nocache") Optional nocache, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("parentYear") Optional parentYear, + @JsonProperty("summary") Optional summary, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title1") Optional title1, + @JsonProperty("title2") Optional title2, + @JsonProperty("viewGroup") Optional viewGroup, + @JsonProperty("viewMode") Optional viewMode, + @JsonProperty("Directory") Optional> directory, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(nocache, "nocache"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(parentYear, "parentYear"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title1, "title1"); + Utils.checkNotNull(title2, "title2"); + Utils.checkNotNull(viewGroup, "viewGroup"); + Utils.checkNotNull(viewMode, "viewMode"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.allowSync = allowSync; + this.art = art; + this.identifier = identifier; + this.key = key; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.nocache = nocache; + this.parentIndex = parentIndex; + this.parentTitle = parentTitle; + this.parentYear = parentYear; + this.summary = summary; + this.theme = theme; + this.thumb = thumb; + this.title1 = title1; + this.title2 = title2; + this.viewGroup = viewGroup; + this.viewMode = viewMode; + this.directory = directory; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional art() { + return art; + } + + public Optional identifier() { + return identifier; + } + + public Optional key() { + return key; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional nocache() { + return nocache; + } + + public Optional parentIndex() { + return parentIndex; + } + + public Optional parentTitle() { + return parentTitle; + } + + public Optional parentYear() { + return parentYear; + } + + public Optional summary() { + return summary; + } + + public Optional theme() { + return theme; + } + + public Optional thumb() { + return thumb; + } + + public Optional title1() { + return title1; + } + + public Optional title2() { + return title2; + } + + public Optional viewGroup() { + return viewGroup; + } + + public Optional viewMode() { + return viewMode; + } + + public Optional> directory() { + return directory; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataChildrenMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetMetadataChildrenMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetMetadataChildrenMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetMetadataChildrenMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetMetadataChildrenMediaContainer withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetMetadataChildrenMediaContainer withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetMetadataChildrenMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetMetadataChildrenMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetMetadataChildrenMediaContainer withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetMetadataChildrenMediaContainer withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetMetadataChildrenMediaContainer withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetMetadataChildrenMediaContainer withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetMetadataChildrenMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetMetadataChildrenMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetMetadataChildrenMediaContainer withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public GetMetadataChildrenMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public GetMetadataChildrenMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetMetadataChildrenMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetMetadataChildrenMediaContainer withMediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetMetadataChildrenMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetMetadataChildrenMediaContainer withNocache(boolean nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = Optional.ofNullable(nocache); + return this; + } + + public GetMetadataChildrenMediaContainer withNocache(Optional nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = nocache; + return this; + } + + public GetMetadataChildrenMediaContainer withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public GetMetadataChildrenMediaContainer withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public GetMetadataChildrenMediaContainer withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public GetMetadataChildrenMediaContainer withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public GetMetadataChildrenMediaContainer withParentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public GetMetadataChildrenMediaContainer withParentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public GetMetadataChildrenMediaContainer withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetMetadataChildrenMediaContainer withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetMetadataChildrenMediaContainer withTheme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + public GetMetadataChildrenMediaContainer withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + public GetMetadataChildrenMediaContainer withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetMetadataChildrenMediaContainer withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMetadataChildrenMediaContainer withTitle1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public GetMetadataChildrenMediaContainer withTitle1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public GetMetadataChildrenMediaContainer withTitle2(String title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = Optional.ofNullable(title2); + return this; + } + + public GetMetadataChildrenMediaContainer withTitle2(Optional title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = title2; + return this; + } + + public GetMetadataChildrenMediaContainer withViewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public GetMetadataChildrenMediaContainer withViewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public GetMetadataChildrenMediaContainer withViewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public GetMetadataChildrenMediaContainer withViewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public GetMetadataChildrenMediaContainer withDirectory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public GetMetadataChildrenMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetMetadataChildrenMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetMetadataChildrenMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenMediaContainer other = (GetMetadataChildrenMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.nocache, other.nocache) && + java.util.Objects.deepEquals(this.parentIndex, other.parentIndex) && + java.util.Objects.deepEquals(this.parentTitle, other.parentTitle) && + java.util.Objects.deepEquals(this.parentYear, other.parentYear) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.theme, other.theme) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.title1, other.title1) && + java.util.Objects.deepEquals(this.title2, other.title2) && + java.util.Objects.deepEquals(this.viewGroup, other.viewGroup) && + java.util.Objects.deepEquals(this.viewMode, other.viewMode) && + java.util.Objects.deepEquals(this.directory, other.directory) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + art, + identifier, + key, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, + nocache, + parentIndex, + parentTitle, + parentYear, + summary, + theme, + thumb, + title1, + title2, + viewGroup, + viewMode, + directory, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenMediaContainer.class, + "size", size, + "allowSync", allowSync, + "art", art, + "identifier", identifier, + "key", key, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "nocache", nocache, + "parentIndex", parentIndex, + "parentTitle", parentTitle, + "parentYear", parentYear, + "summary", summary, + "theme", theme, + "thumb", thumb, + "title1", title1, + "title2", title2, + "viewGroup", viewGroup, + "viewMode", viewMode, + "directory", directory, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional nocache = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional parentYear = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title1 = Optional.empty(); + + private Optional title2 = Optional.empty(); + + private Optional viewGroup = Optional.empty(); + + private Optional viewMode = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder nocache(boolean nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = Optional.ofNullable(nocache); + return this; + } + + public Builder nocache(Optional nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = nocache; + return this; + } + + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public Builder parentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public Builder parentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder theme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder title1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public Builder title1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public Builder title2(String title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = Optional.ofNullable(title2); + return this; + } + + public Builder title2(Optional title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = title2; + return this; + } + + public Builder viewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public Builder viewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public Builder viewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public Builder viewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public Builder directory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetMetadataChildrenMediaContainer build() { + return new GetMetadataChildrenMediaContainer( + size, + allowSync, + art, + identifier, + key, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, + nocache, + parentIndex, + parentTitle, + parentYear, + summary, + theme, + thumb, + title1, + title2, + viewGroup, + viewMode, + directory, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMetadata.java new file mode 100644 index 00000000..509e2823 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenMetadata.java @@ -0,0 +1,1169 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataChildrenMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentGuid") + private Optional parentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentStudio") + private Optional parentStudio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentYear") + private Optional parentYear; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTheme") + private Optional parentTheme; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipCount") + private Optional skipCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastRatedAt") + private Optional lastRatedAt; + + public GetMetadataChildrenMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("guid") Optional guid, + @JsonProperty("parentGuid") Optional parentGuid, + @JsonProperty("parentStudio") Optional parentStudio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("summary") Optional summary, + @JsonProperty("index") Optional index, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("parentYear") Optional parentYear, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTheme") Optional parentTheme, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("skipCount") Optional skipCount, + @JsonProperty("lastRatedAt") Optional lastRatedAt) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(parentGuid, "parentGuid"); + Utils.checkNotNull(parentStudio, "parentStudio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(parentYear, "parentYear"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTheme, "parentTheme"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(skipCount, "skipCount"); + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.ratingKey = ratingKey; + this.key = key; + this.parentRatingKey = parentRatingKey; + this.guid = guid; + this.parentGuid = parentGuid; + this.parentStudio = parentStudio; + this.type = type; + this.title = title; + this.parentKey = parentKey; + this.parentTitle = parentTitle; + this.summary = summary; + this.index = index; + this.parentIndex = parentIndex; + this.viewCount = viewCount; + this.lastViewedAt = lastViewedAt; + this.parentYear = parentYear; + this.thumb = thumb; + this.art = art; + this.parentThumb = parentThumb; + this.parentTheme = parentTheme; + this.leafCount = leafCount; + this.viewedLeafCount = viewedLeafCount; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.skipCount = skipCount; + this.lastRatedAt = lastRatedAt; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional parentRatingKey() { + return parentRatingKey; + } + + public Optional guid() { + return guid; + } + + public Optional parentGuid() { + return parentGuid; + } + + public Optional parentStudio() { + return parentStudio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional parentKey() { + return parentKey; + } + + public Optional parentTitle() { + return parentTitle; + } + + public Optional summary() { + return summary; + } + + public Optional index() { + return index; + } + + public Optional parentIndex() { + return parentIndex; + } + + public Optional viewCount() { + return viewCount; + } + + public Optional lastViewedAt() { + return lastViewedAt; + } + + public Optional parentYear() { + return parentYear; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional parentThumb() { + return parentThumb; + } + + public Optional parentTheme() { + return parentTheme; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional userRating() { + return userRating; + } + + public Optional skipCount() { + return skipCount; + } + + public Optional lastRatedAt() { + return lastRatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataChildrenMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetMetadataChildrenMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMetadataChildrenMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetMetadataChildrenMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetMetadataChildrenMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public GetMetadataChildrenMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public GetMetadataChildrenMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetMetadataChildrenMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetMetadataChildrenMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public GetMetadataChildrenMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public GetMetadataChildrenMetadata withParentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public GetMetadataChildrenMetadata withParentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public GetMetadataChildrenMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetMetadataChildrenMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetMetadataChildrenMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetMetadataChildrenMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetMetadataChildrenMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public GetMetadataChildrenMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public GetMetadataChildrenMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public GetMetadataChildrenMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public GetMetadataChildrenMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetMetadataChildrenMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetMetadataChildrenMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetMetadataChildrenMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetMetadataChildrenMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public GetMetadataChildrenMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public GetMetadataChildrenMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public GetMetadataChildrenMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public GetMetadataChildrenMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public GetMetadataChildrenMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public GetMetadataChildrenMetadata withParentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public GetMetadataChildrenMetadata withParentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public GetMetadataChildrenMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetMetadataChildrenMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMetadataChildrenMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetMetadataChildrenMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetMetadataChildrenMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public GetMetadataChildrenMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public GetMetadataChildrenMetadata withParentTheme(String parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = Optional.ofNullable(parentTheme); + return this; + } + + public GetMetadataChildrenMetadata withParentTheme(Optional parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = parentTheme; + return this; + } + + public GetMetadataChildrenMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetMetadataChildrenMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetMetadataChildrenMetadata withViewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + public GetMetadataChildrenMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + public GetMetadataChildrenMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetMetadataChildrenMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetMetadataChildrenMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetMetadataChildrenMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetMetadataChildrenMetadata withUserRating(int userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + public GetMetadataChildrenMetadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + public GetMetadataChildrenMetadata withSkipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + public GetMetadataChildrenMetadata withSkipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + public GetMetadataChildrenMetadata withLastRatedAt(int lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = Optional.ofNullable(lastRatedAt); + return this; + } + + public GetMetadataChildrenMetadata withLastRatedAt(Optional lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = lastRatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenMetadata other = (GetMetadataChildrenMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.parentGuid, other.parentGuid) && + java.util.Objects.deepEquals(this.parentStudio, other.parentStudio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.parentKey, other.parentKey) && + java.util.Objects.deepEquals(this.parentTitle, other.parentTitle) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.parentIndex, other.parentIndex) && + java.util.Objects.deepEquals(this.viewCount, other.viewCount) && + java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + java.util.Objects.deepEquals(this.parentYear, other.parentYear) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.parentThumb, other.parentThumb) && + java.util.Objects.deepEquals(this.parentTheme, other.parentTheme) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.userRating, other.userRating) && + java.util.Objects.deepEquals(this.skipCount, other.skipCount) && + java.util.Objects.deepEquals(this.lastRatedAt, other.lastRatedAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + parentRatingKey, + guid, + parentGuid, + parentStudio, + type, + title, + parentKey, + parentTitle, + summary, + index, + parentIndex, + viewCount, + lastViewedAt, + parentYear, + thumb, + art, + parentThumb, + parentTheme, + leafCount, + viewedLeafCount, + addedAt, + updatedAt, + userRating, + skipCount, + lastRatedAt); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenMetadata.class, + "ratingKey", ratingKey, + "key", key, + "parentRatingKey", parentRatingKey, + "guid", guid, + "parentGuid", parentGuid, + "parentStudio", parentStudio, + "type", type, + "title", title, + "parentKey", parentKey, + "parentTitle", parentTitle, + "summary", summary, + "index", index, + "parentIndex", parentIndex, + "viewCount", viewCount, + "lastViewedAt", lastViewedAt, + "parentYear", parentYear, + "thumb", thumb, + "art", art, + "parentThumb", parentThumb, + "parentTheme", parentTheme, + "leafCount", leafCount, + "viewedLeafCount", viewedLeafCount, + "addedAt", addedAt, + "updatedAt", updatedAt, + "userRating", userRating, + "skipCount", skipCount, + "lastRatedAt", lastRatedAt); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional parentGuid = Optional.empty(); + + private Optional parentStudio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional parentYear = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTheme = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional skipCount = Optional.empty(); + + private Optional lastRatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder parentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public Builder parentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public Builder parentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public Builder parentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public Builder parentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public Builder parentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public Builder parentTheme(String parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = Optional.ofNullable(parentTheme); + return this; + } + + public Builder parentTheme(Optional parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = parentTheme; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder viewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder userRating(int userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + public Builder skipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + public Builder skipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + public Builder lastRatedAt(int lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = Optional.ofNullable(lastRatedAt); + return this; + } + + public Builder lastRatedAt(Optional lastRatedAt) { + Utils.checkNotNull(lastRatedAt, "lastRatedAt"); + this.lastRatedAt = lastRatedAt; + return this; + } + + public GetMetadataChildrenMetadata build() { + return new GetMetadataChildrenMetadata( + ratingKey, + key, + parentRatingKey, + guid, + parentGuid, + parentStudio, + type, + title, + parentKey, + parentTitle, + summary, + index, + parentIndex, + viewCount, + lastViewedAt, + parentYear, + thumb, + art, + parentThumb, + parentTheme, + leafCount, + viewedLeafCount, + addedAt, + updatedAt, + userRating, + skipCount, + lastRatedAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequest.java new file mode 100644 index 00000000..0da41161 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataChildrenRequest { + + /** + * the id of the library item to return the children of. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") + private double ratingKey; + + public GetMetadataChildrenRequest( + double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + } + + /** + * the id of the library item to return the children of. + */ + public double ratingKey() { + return ratingKey; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the id of the library item to return the children of. + */ + public GetMetadataChildrenRequest withRatingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenRequest other = (GetMetadataChildrenRequest) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenRequest.class, + "ratingKey", ratingKey); + } + + public final static class Builder { + + private Double ratingKey; + + private Builder() { + // force use of static builder() method + } + + /** + * the id of the library item to return the children of. + */ + public Builder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMetadataChildrenRequest build() { + return new GetMetadataChildrenRequest( + ratingKey); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequestBuilder.java new file mode 100644 index 00000000..aa49def8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetMetadataChildrenRequestBuilder { + + private Double ratingKey; + private final SDKMethodInterfaces.MethodCallGetMetadataChildren sdk; + + public GetMetadataChildrenRequestBuilder(SDKMethodInterfaces.MethodCallGetMetadataChildren sdk) { + this.sdk = sdk; + } + + public GetMetadataChildrenRequestBuilder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMetadataChildrenResponse call() throws Exception { + + return sdk.getMetadataChildren( + ratingKey); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponse.java new file mode 100644 index 00000000..f2e84293 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataChildrenResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The children of the library item. + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetMetadataChildrenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The children of the library item. + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetMetadataChildrenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMetadataChildrenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetadataChildrenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The children of the library item. + */ + public GetMetadataChildrenResponse withTwoHundredApplicationJsonObject(GetMetadataChildrenResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The children of the library item. + */ + public GetMetadataChildrenResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetMetadataChildrenResponse withFourHundredAndOneApplicationJsonObject(GetMetadataChildrenLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetMetadataChildrenResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenResponse other = (GetMetadataChildrenResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The children of the library item. + */ + public Builder twoHundredApplicationJsonObject(GetMetadataChildrenResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The children of the library item. + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetMetadataChildrenLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetMetadataChildrenResponse build() { + return new GetMetadataChildrenResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponseBody.java new file mode 100644 index 00000000..39ffe0e7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataChildrenResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetMetadataChildrenResponseBody - The children of the library item. + */ + +public class GetMetadataChildrenResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetMetadataChildrenResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataChildrenResponseBody withMediaContainer(GetMetadataChildrenMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetMetadataChildrenResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataChildrenResponseBody other = (GetMetadataChildrenResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataChildrenResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetMetadataChildrenMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetMetadataChildrenResponseBody build() { + return new GetMetadataChildrenResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataCountry.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataCountry.java new file mode 100644 index 00000000..5eedc72e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataCountry.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataCountry { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetMetadataCountry( + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + this.id = id; + this.filter = filter; + this.tag = tag; + } + + public Optional id() { + return id; + } + + public Optional filter() { + return filter; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataCountry withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetadataCountry withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetadataCountry withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetMetadataCountry withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetMetadataCountry withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetMetadataCountry withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataCountry other = (GetMetadataCountry) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + filter, + tag); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataCountry.class, + "id", id, + "filter", filter, + "tag", tag); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetMetadataCountry build() { + return new GetMetadataCountry( + id, + filter, + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataDirector.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataDirector.java new file mode 100644 index 00000000..0745893e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataDirector.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataDirector { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + public GetMetadataDirector( + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; + this.filter = filter; + this.tag = tag; + this.tagKey = tagKey; + this.thumb = thumb; + } + + public Optional id() { + return id; + } + + public Optional filter() { + return filter; + } + + public Optional tag() { + return tag; + } + + public Optional tagKey() { + return tagKey; + } + + public Optional thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataDirector withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetadataDirector withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetadataDirector withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetMetadataDirector withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetMetadataDirector withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetMetadataDirector withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetMetadataDirector withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public GetMetadataDirector withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public GetMetadataDirector withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetMetadataDirector withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataDirector other = (GetMetadataDirector) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.tag, other.tag) && + java.util.Objects.deepEquals(this.tagKey, other.tagKey) && + java.util.Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + filter, + tag, + tagKey, + thumb); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataDirector.class, + "id", id, + "filter", filter, + "tag", tag, + "tagKey", tagKey, + "thumb", thumb); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Builder tagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public Builder tagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMetadataDirector build() { + return new GetMetadataDirector( + id, + filter, + tag, + tagKey, + thumb); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataErrors.java new file mode 100644 index 00000000..b8b5071b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataErrors { + + @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; + + public GetMetadataErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetMetadataErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetMetadataErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetMetadataErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetMetadataErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetMetadataErrors 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; + } + GetMetadataErrors other = (GetMetadataErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataErrors.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(double 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(double 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 GetMetadataErrors build() { + return new GetMetadataErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataGenre.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataGenre.java new file mode 100644 index 00000000..afbc7c05 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataGenre.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataGenre { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetMetadataGenre( + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + this.id = id; + this.filter = filter; + this.tag = tag; + } + + public Optional id() { + return id; + } + + public Optional filter() { + return filter; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataGenre withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetadataGenre withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetadataGenre withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetMetadataGenre withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetMetadataGenre withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetMetadataGenre withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataGenre other = (GetMetadataGenre) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + filter, + tag); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataGenre.class, + "id", id, + "filter", filter, + "tag", tag); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetMetadataGenre build() { + return new GetMetadataGenre( + id, + filter, + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataLibraryResponseBody.java new file mode 100644 index 00000000..4b6147e4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetMetadataLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetMetadataLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetMetadataLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetMetadataLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataLibraryResponseBody other = (GetMetadataLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetMetadataLibraryResponseBody build() { + return new GetMetadataLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMedia.java new file mode 100644 index 00000000..2c4a48f6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMedia.java @@ -0,0 +1,759 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public GetMetadataMedia( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.optimizedForStreaming = optimizedForStreaming; + this.audioProfile = audioProfile; + this.has64bitOffsets = has64bitOffsets; + this.videoProfile = videoProfile; + this.part = part; + } + + public Optional id() { + return id; + } + + public Optional duration() { + return duration; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional width() { + return width; + } + + public Optional height() { + return height; + } + + public Optional aspectRatio() { + return aspectRatio; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional videoResolution() { + return videoResolution; + } + + public Optional container() { + return container; + } + + public Optional videoFrameRate() { + return videoFrameRate; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataMedia withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetadataMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetadataMedia withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetMetadataMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetMetadataMedia withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetMetadataMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetMetadataMedia withWidth(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetMetadataMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetMetadataMedia withHeight(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetMetadataMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetMetadataMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public GetMetadataMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public GetMetadataMedia withAudioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetMetadataMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetMetadataMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetMetadataMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetMetadataMedia withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public GetMetadataMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public GetMetadataMedia withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public GetMetadataMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public GetMetadataMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetMetadataMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetMetadataMedia withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public GetMetadataMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public GetMetadataMedia withOptimizedForStreaming(int optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetMetadataMedia withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetMetadataMedia withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetMetadataMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetMetadataMedia withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetMetadataMedia withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetMetadataMedia withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetMetadataMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetMetadataMedia withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetMetadataMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataMedia other = (GetMetadataMedia) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.videoResolution, other.videoResolution) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + audioProfile, + has64bitOffsets, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataMedia.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "optimizedForStreaming", optimizedForStreaming, + "audioProfile", audioProfile, + "has64bitOffsets", has64bitOffsets, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder optimizedForStreaming(int optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public GetMetadataMedia build() { + return new GetMetadataMedia( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + audioProfile, + has64bitOffsets, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMediaContainer.java new file mode 100644 index 00000000..2be5e9ec --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMediaContainer.java @@ -0,0 +1,431 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetMetadataMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.allowSync = allowSync; + this.identifier = identifier; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional identifier() { + return identifier; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetMetadataMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetMetadataMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetMetadataMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetMetadataMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetMetadataMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetMetadataMediaContainer withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetMetadataMediaContainer withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetMetadataMediaContainer withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetMetadataMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetMetadataMediaContainer withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public GetMetadataMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public GetMetadataMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetMetadataMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetMetadataMediaContainer withMediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetMetadataMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetMetadataMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetMetadataMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataMediaContainer other = (GetMetadataMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataMediaContainer.class, + "size", size, + "allowSync", allowSync, + "identifier", identifier, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetMetadataMediaContainer build() { + return new GetMetadataMediaContainer( + size, + allowSync, + identifier, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + mediaTagPrefix, + mediaTagVersion, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMetadata.java new file mode 100644 index 00000000..5620c38b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataMetadata.java @@ -0,0 +1,1416 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionKey") + private Optional librarySectionKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPremiumPrimaryExtra") + private Optional hasPremiumPrimaryExtra; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guids; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratings; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Producer") + private Optional> producer; + + public GetMetadataMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("studio") Optional studio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("rating") Optional rating, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("year") Optional year, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("hasPremiumPrimaryExtra") Optional hasPremiumPrimaryExtra, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("Media") Optional> media, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("Country") Optional> country, + @JsonProperty("guids") Optional> guids, + @JsonProperty("ratings") Optional> ratings, + @JsonProperty("Director") Optional> director, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("Role") Optional> role, + @JsonProperty("Producer") Optional> producer) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(guids, "guids"); + Utils.checkNotNull(ratings, "ratings"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(producer, "producer"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.studio = studio; + this.type = type; + this.title = title; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionID = librarySectionID; + this.librarySectionKey = librarySectionKey; + this.contentRating = contentRating; + this.summary = summary; + this.rating = rating; + this.audienceRating = audienceRating; + this.year = year; + this.tagline = tagline; + this.thumb = thumb; + this.art = art; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.audienceRatingImage = audienceRatingImage; + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + this.ratingImage = ratingImage; + this.media = media; + this.genre = genre; + this.country = country; + this.guids = guids; + this.ratings = ratings; + this.director = director; + this.writer = writer; + this.role = role; + this.producer = producer; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional studio() { + return studio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionKey() { + return librarySectionKey; + } + + public Optional contentRating() { + return contentRating; + } + + public Optional summary() { + return summary; + } + + public Optional rating() { + return rating; + } + + public Optional audienceRating() { + return audienceRating; + } + + public Optional year() { + return year; + } + + public Optional tagline() { + return tagline; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional duration() { + return duration; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional audienceRatingImage() { + return audienceRatingImage; + } + + public Optional hasPremiumPrimaryExtra() { + return hasPremiumPrimaryExtra; + } + + public Optional ratingImage() { + return ratingImage; + } + + public Optional> media() { + return media; + } + + public Optional> genre() { + return genre; + } + + public Optional> country() { + return country; + } + + public Optional> guids() { + return guids; + } + + public Optional> ratings() { + return ratings; + } + + public Optional> director() { + return director; + } + + public Optional> writer() { + return writer; + } + + public Optional> role() { + return role; + } + + public Optional> producer() { + return producer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetMetadataMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMetadataMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetMetadataMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetMetadataMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetMetadataMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetMetadataMetadata withStudio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public GetMetadataMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public GetMetadataMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetMetadataMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetMetadataMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetMetadataMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetMetadataMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetMetadataMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetMetadataMetadata withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetMetadataMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetMetadataMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public GetMetadataMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public GetMetadataMetadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public GetMetadataMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetMetadataMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetMetadataMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetMetadataMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public GetMetadataMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public GetMetadataMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public GetMetadataMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public GetMetadataMetadata withYear(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public GetMetadataMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public GetMetadataMetadata withTagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public GetMetadataMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public GetMetadataMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetMetadataMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMetadataMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetMetadataMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetMetadataMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetMetadataMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetMetadataMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetMetadataMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetMetadataMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetMetadataMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetMetadataMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetMetadataMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetMetadataMetadata withAudienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public GetMetadataMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public GetMetadataMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); + return this; + } + + public GetMetadataMetadata withHasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + return this; + } + + public GetMetadataMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public GetMetadataMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public GetMetadataMetadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetMetadataMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetMetadataMetadata withGenre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public GetMetadataMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public GetMetadataMetadata withCountry(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public GetMetadataMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public GetMetadataMetadata withGuids(java.util.List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public GetMetadataMetadata withGuids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + public GetMetadataMetadata withRatings(java.util.List ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = Optional.ofNullable(ratings); + return this; + } + + public GetMetadataMetadata withRatings(Optional> ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = ratings; + return this; + } + + public GetMetadataMetadata withDirector(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public GetMetadataMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public GetMetadataMetadata withWriter(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public GetMetadataMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public GetMetadataMetadata withRole(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public GetMetadataMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public GetMetadataMetadata withProducer(java.util.List producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = Optional.ofNullable(producer); + return this; + } + + public GetMetadataMetadata withProducer(Optional> producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = producer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataMetadata other = (GetMetadataMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.studio, other.studio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + java.util.Objects.deepEquals(this.contentRating, other.contentRating) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.rating, other.rating) && + java.util.Objects.deepEquals(this.audienceRating, other.audienceRating) && + java.util.Objects.deepEquals(this.year, other.year) && + java.util.Objects.deepEquals(this.tagline, other.tagline) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && + java.util.Objects.deepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) && + java.util.Objects.deepEquals(this.ratingImage, other.ratingImage) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.genre, other.genre) && + java.util.Objects.deepEquals(this.country, other.country) && + java.util.Objects.deepEquals(this.guids, other.guids) && + java.util.Objects.deepEquals(this.ratings, other.ratings) && + java.util.Objects.deepEquals(this.director, other.director) && + java.util.Objects.deepEquals(this.writer, other.writer) && + java.util.Objects.deepEquals(this.role, other.role) && + java.util.Objects.deepEquals(this.producer, other.producer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + studio, + type, + title, + librarySectionTitle, + librarySectionID, + librarySectionKey, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + hasPremiumPrimaryExtra, + ratingImage, + media, + genre, + country, + guids, + ratings, + director, + writer, + role, + producer); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "studio", studio, + "type", type, + "title", title, + "librarySectionTitle", librarySectionTitle, + "librarySectionID", librarySectionID, + "librarySectionKey", librarySectionKey, + "contentRating", contentRating, + "summary", summary, + "rating", rating, + "audienceRating", audienceRating, + "year", year, + "tagline", tagline, + "thumb", thumb, + "art", art, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "audienceRatingImage", audienceRatingImage, + "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra, + "ratingImage", ratingImage, + "media", media, + "genre", genre, + "country", country, + "guids", guids, + "ratings", ratings, + "director", director, + "writer", writer, + "role", role, + "producer", producer); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional hasPremiumPrimaryExtra = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> guids = Optional.empty(); + + private Optional> ratings = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional> producer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder studio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public Builder librarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public Builder year(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder tagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder audienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Builder hasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); + return this; + } + + public Builder hasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + return this; + } + + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder genre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Builder genre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Builder country(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder guids(java.util.List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public Builder guids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + public Builder ratings(java.util.List ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = Optional.ofNullable(ratings); + return this; + } + + public Builder ratings(Optional> ratings) { + Utils.checkNotNull(ratings, "ratings"); + this.ratings = ratings; + return this; + } + + public Builder director(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Builder writer(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Builder writer(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Builder role(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public Builder producer(java.util.List producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = Optional.ofNullable(producer); + return this; + } + + public Builder producer(Optional> producer) { + Utils.checkNotNull(producer, "producer"); + this.producer = producer; + return this; + } + + public GetMetadataMetadata build() { + return new GetMetadataMetadata( + ratingKey, + key, + guid, + studio, + type, + title, + librarySectionTitle, + librarySectionID, + librarySectionKey, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + hasPremiumPrimaryExtra, + ratingImage, + media, + genre, + country, + guids, + ratings, + director, + writer, + role, + producer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataPart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataPart.java new file mode 100644 index 00000000..79193e08 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataPart.java @@ -0,0 +1,513 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Stream") + private Optional> stream; + + public GetMetadataPart( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("container") Optional container, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Stream") Optional> stream) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(stream, "stream"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.audioProfile = audioProfile; + this.container = container; + this.has64bitOffsets = has64bitOffsets; + this.optimizedForStreaming = optimizedForStreaming; + this.videoProfile = videoProfile; + this.stream = stream; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional size() { + return size; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional container() { + return container; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> stream() { + return stream; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataPart withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetadataPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetadataPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetMetadataPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetMetadataPart withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetMetadataPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetMetadataPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetMetadataPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetMetadataPart withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetMetadataPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetMetadataPart withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetMetadataPart withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetMetadataPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetMetadataPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetMetadataPart withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetMetadataPart withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetMetadataPart withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetMetadataPart withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetMetadataPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetMetadataPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetMetadataPart withStream(java.util.List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + public GetMetadataPart withStream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataPart other = (GetMetadataPart) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.stream, other.stream); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + duration, + file, + size, + audioProfile, + container, + has64bitOffsets, + optimizedForStreaming, + videoProfile, + stream); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataPart.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "audioProfile", audioProfile, + "container", container, + "has64bitOffsets", has64bitOffsets, + "optimizedForStreaming", optimizedForStreaming, + "videoProfile", videoProfile, + "stream", stream); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> stream = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder optimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder stream(java.util.List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + public Builder stream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; + return this; + } + + public GetMetadataPart build() { + return new GetMetadataPart( + id, + key, + duration, + file, + size, + audioProfile, + container, + has64bitOffsets, + optimizedForStreaming, + videoProfile, + stream); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequest.java new file mode 100644 index 00000000..ac88010d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataRequest { + + /** + * the id of the library item to return the children of. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") + private double ratingKey; + + public GetMetadataRequest( + double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + } + + /** + * the id of the library item to return the children of. + */ + public double ratingKey() { + return ratingKey; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the id of the library item to return the children of. + */ + public GetMetadataRequest withRatingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataRequest other = (GetMetadataRequest) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataRequest.class, + "ratingKey", ratingKey); + } + + public final static class Builder { + + private Double ratingKey; + + private Builder() { + // force use of static builder() method + } + + /** + * the id of the library item to return the children of. + */ + public Builder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMetadataRequest build() { + return new GetMetadataRequest( + ratingKey); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequestBuilder.java new file mode 100644 index 00000000..6d4a67a5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetMetadataRequestBuilder { + + private Double ratingKey; + private final SDKMethodInterfaces.MethodCallGetMetadata sdk; + + public GetMetadataRequestBuilder(SDKMethodInterfaces.MethodCallGetMetadata sdk) { + this.sdk = sdk; + } + + public GetMetadataRequestBuilder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetMetadataResponse call() throws Exception { + + return sdk.getMetadata( + ratingKey); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponse.java new file mode 100644 index 00000000..bc74c6db --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The metadata of the library item. + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The metadata of the library item. + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The metadata of the library item. + */ + public GetMetadataResponse withTwoHundredApplicationJsonObject(GetMetadataResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The metadata of the library item. + */ + public GetMetadataResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetMetadataResponse withFourHundredAndOneApplicationJsonObject(GetMetadataLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetMetadataResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataResponse other = (GetMetadataResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The metadata of the library item. + */ + public Builder twoHundredApplicationJsonObject(GetMetadataResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The metadata of the library item. + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetMetadataLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetMetadataResponse build() { + return new GetMetadataResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponseBody.java new file mode 100644 index 00000000..2a86484b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetMetadataResponseBody - The metadata of the library item. + */ + +public class GetMetadataResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetMetadataResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataResponseBody withMediaContainer(GetMetadataMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetMetadataResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataResponseBody other = (GetMetadataResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetMetadataMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetMetadataResponseBody build() { + return new GetMetadataResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRole.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRole.java new file mode 100644 index 00000000..0e3850c1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataRole.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataRole { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("role") + private Optional role; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + public GetMetadataRole( + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("role") Optional role, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; + this.filter = filter; + this.tag = tag; + this.tagKey = tagKey; + this.role = role; + this.thumb = thumb; + } + + public Optional id() { + return id; + } + + public Optional filter() { + return filter; + } + + public Optional tag() { + return tag; + } + + public Optional tagKey() { + return tagKey; + } + + public Optional role() { + return role; + } + + public Optional thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataRole withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetadataRole withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetadataRole withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetMetadataRole withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetMetadataRole withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetMetadataRole withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetMetadataRole withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public GetMetadataRole withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public GetMetadataRole withRole(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public GetMetadataRole withRole(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public GetMetadataRole withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetMetadataRole withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataRole other = (GetMetadataRole) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.tag, other.tag) && + java.util.Objects.deepEquals(this.tagKey, other.tagKey) && + java.util.Objects.deepEquals(this.role, other.role) && + java.util.Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + filter, + tag, + tagKey, + role, + thumb); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataRole.class, + "id", id, + "filter", filter, + "tag", tag, + "tagKey", tagKey, + "role", role, + "thumb", thumb); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional role = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Builder tagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public Builder tagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public Builder role(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMetadataRole build() { + return new GetMetadataRole( + id, + filter, + tag, + tagKey, + role, + thumb); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataWriter.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataWriter.java new file mode 100644 index 00000000..42c2e6bc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMetadataWriter.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMetadataWriter { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + public GetMetadataWriter( + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; + this.filter = filter; + this.tag = tag; + this.tagKey = tagKey; + this.thumb = thumb; + } + + public Optional id() { + return id; + } + + public Optional filter() { + return filter; + } + + public Optional tag() { + return tag; + } + + public Optional tagKey() { + return tagKey; + } + + public Optional thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetadataWriter withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetadataWriter withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetadataWriter withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetMetadataWriter withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetMetadataWriter withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetMetadataWriter withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetMetadataWriter withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public GetMetadataWriter withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public GetMetadataWriter withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetMetadataWriter withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataWriter other = (GetMetadataWriter) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.tag, other.tag) && + java.util.Objects.deepEquals(this.tagKey, other.tagKey) && + java.util.Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + filter, + tag, + tagKey, + thumb); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataWriter.class, + "id", id, + "filter", filter, + "tag", tag, + "tagKey", tagKey, + "thumb", thumb); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Builder tagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public Builder tagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetMetadataWriter build() { + return new GetMetadataWriter( + id, + filter, + tag, + tagKey, + thumb); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountErrors.java new file mode 100644 index 00000000..189d257c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMyPlexAccountErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetMyPlexAccountErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMyPlexAccountErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetMyPlexAccountErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetMyPlexAccountErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetMyPlexAccountErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetMyPlexAccountErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetMyPlexAccountErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMyPlexAccountErrors other = (GetMyPlexAccountErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetMyPlexAccountErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetMyPlexAccountErrors build() { + return new GetMyPlexAccountErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountRequestBuilder.java new file mode 100644 index 00000000..75f83775 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetMyPlexAccountRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetMyPlexAccount sdk; + + public GetMyPlexAccountRequestBuilder(SDKMethodInterfaces.MethodCallGetMyPlexAccount sdk) { + this.sdk = sdk; + } + + public GetMyPlexAccountResponse call() throws Exception { + + return sdk.getMyPlexAccountDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponse.java new file mode 100644 index 00000000..6ffd304c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetMyPlexAccountResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * MyPlex Account + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetMyPlexAccountResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * MyPlex Account + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetMyPlexAccountResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMyPlexAccountResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMyPlexAccountResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * MyPlex Account + */ + public GetMyPlexAccountResponse withTwoHundredApplicationJsonObject(GetMyPlexAccountResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * MyPlex Account + */ + public GetMyPlexAccountResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetMyPlexAccountResponse withFourHundredAndOneApplicationJsonObject(GetMyPlexAccountServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetMyPlexAccountResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMyPlexAccountResponse other = (GetMyPlexAccountResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetMyPlexAccountResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * MyPlex Account + */ + public Builder twoHundredApplicationJsonObject(GetMyPlexAccountResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * MyPlex Account + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetMyPlexAccountServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetMyPlexAccountResponse build() { + return new GetMyPlexAccountResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponseBody.java new file mode 100644 index 00000000..0f65bd70 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetMyPlexAccountResponseBody - MyPlex Account + */ + +public class GetMyPlexAccountResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MyPlex") + private Optional myPlex; + + public GetMyPlexAccountResponseBody( + @JsonProperty("MyPlex") Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + } + + public Optional myPlex() { + return myPlex; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMyPlexAccountResponseBody withMyPlex(MyPlex myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + public GetMyPlexAccountResponseBody withMyPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMyPlexAccountResponseBody other = (GetMyPlexAccountResponseBody) o; + return + java.util.Objects.deepEquals(this.myPlex, other.myPlex); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + myPlex); + } + + @Override + public String toString() { + return Utils.toString(GetMyPlexAccountResponseBody.class, + "myPlex", myPlex); + } + + public final static class Builder { + + private Optional myPlex = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder myPlex(MyPlex myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + public Builder myPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + public GetMyPlexAccountResponseBody build() { + return new GetMyPlexAccountResponseBody( + myPlex); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountServerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountServerResponseBody.java new file mode 100644 index 00000000..7f3dd589 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetMyPlexAccountServerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetMyPlexAccountServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetMyPlexAccountServerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetMyPlexAccountServerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMyPlexAccountServerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetMyPlexAccountServerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMyPlexAccountServerResponseBody other = (GetMyPlexAccountServerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetMyPlexAccountServerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetMyPlexAccountServerResponseBody build() { + return new GetMyPlexAccountServerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckErrors.java new file mode 100644 index 00000000..e36927a2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckErrors { + + @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; + + public GetOnDeckErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetOnDeckErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetOnDeckErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetOnDeckErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetOnDeckErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetOnDeckErrors 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; + } + GetOnDeckErrors other = (GetOnDeckErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckErrors.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(double 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(double 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 GetOnDeckErrors build() { + return new GetOnDeckErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckGuids.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckGuids.java new file mode 100644 index 00000000..10770b8d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckGuids.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckGuids { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + public GetOnDeckGuids( + @JsonProperty("id") Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + } + + public Optional id() { + return id; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckGuids withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetOnDeckGuids withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckGuids other = (GetOnDeckGuids) o; + return + java.util.Objects.deepEquals(this.id, other.id); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckGuids.class, + "id", id); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetOnDeckGuids build() { + return new GetOnDeckGuids( + id); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckLibraryResponseBody.java new file mode 100644 index 00000000..45013305 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetOnDeckLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetOnDeckLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetOnDeckLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetOnDeckLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckLibraryResponseBody other = (GetOnDeckLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetOnDeckLibraryResponseBody build() { + return new GetOnDeckLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMedia.java new file mode 100644 index 00000000..6f8bbe02 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMedia.java @@ -0,0 +1,677 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public GetOnDeckMedia( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.audioProfile = audioProfile; + this.videoProfile = videoProfile; + this.part = part; + } + + public Optional id() { + return id; + } + + public Optional duration() { + return duration; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional width() { + return width; + } + + public Optional height() { + return height; + } + + public Optional aspectRatio() { + return aspectRatio; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional videoResolution() { + return videoResolution; + } + + public Optional container() { + return container; + } + + public Optional videoFrameRate() { + return videoFrameRate; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckMedia withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetOnDeckMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetOnDeckMedia withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetOnDeckMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetOnDeckMedia withBitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetOnDeckMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetOnDeckMedia withWidth(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetOnDeckMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetOnDeckMedia withHeight(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetOnDeckMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetOnDeckMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public GetOnDeckMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public GetOnDeckMedia withAudioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetOnDeckMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetOnDeckMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetOnDeckMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetOnDeckMedia withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public GetOnDeckMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public GetOnDeckMedia withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public GetOnDeckMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public GetOnDeckMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetOnDeckMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetOnDeckMedia withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public GetOnDeckMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public GetOnDeckMedia withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetOnDeckMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetOnDeckMedia withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetOnDeckMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetOnDeckMedia withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetOnDeckMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckMedia other = (GetOnDeckMedia) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.videoResolution, other.videoResolution) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + audioProfile, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckMedia.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "audioProfile", audioProfile, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder bitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public GetOnDeckMedia build() { + return new GetOnDeckMedia( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + audioProfile, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMediaContainer.java new file mode 100644 index 00000000..648f9935 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMediaContainer.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mixedParents") + private Optional mixedParents; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetOnDeckMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("mixedParents") Optional mixedParents, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(mixedParents, "mixedParents"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.allowSync = allowSync; + this.identifier = identifier; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.mixedParents = mixedParents; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional identifier() { + return identifier; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional mixedParents() { + return mixedParents; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetOnDeckMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetOnDeckMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetOnDeckMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetOnDeckMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetOnDeckMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetOnDeckMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetOnDeckMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetOnDeckMediaContainer withMediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetOnDeckMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetOnDeckMediaContainer withMixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public GetOnDeckMediaContainer withMixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + public GetOnDeckMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetOnDeckMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckMediaContainer other = (GetOnDeckMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.mixedParents, other.mixedParents) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + identifier, + mediaTagPrefix, + mediaTagVersion, + mixedParents, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckMediaContainer.class, + "size", size, + "allowSync", allowSync, + "identifier", identifier, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "mixedParents", mixedParents, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional mixedParents = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder mixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public Builder mixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetOnDeckMediaContainer build() { + return new GetOnDeckMediaContainer( + size, + allowSync, + identifier, + mediaTagPrefix, + mediaTagVersion, + mixedParents, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMetadata.java new file mode 100644 index 00000000..cc3ea234 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckMetadata.java @@ -0,0 +1,1541 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentGuid") + private Optional parentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentGuid") + private Optional grandparentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionKey") + private Optional librarySectionKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guids; + + public GetOnDeckMetadata( + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("guid") Optional guid, + @JsonProperty("parentGuid") Optional parentGuid, + @JsonProperty("grandparentGuid") Optional grandparentGuid, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("index") Optional index, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("year") Optional year, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("Media") Optional> media, + @JsonProperty("guids") Optional> guids) { + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(parentGuid, "parentGuid"); + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(guids, "guids"); + this.allowSync = allowSync; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.ratingKey = ratingKey; + this.key = key; + this.parentRatingKey = parentRatingKey; + this.grandparentRatingKey = grandparentRatingKey; + this.guid = guid; + this.parentGuid = parentGuid; + this.grandparentGuid = grandparentGuid; + this.type = type; + this.title = title; + this.grandparentKey = grandparentKey; + this.parentKey = parentKey; + this.librarySectionKey = librarySectionKey; + this.grandparentTitle = grandparentTitle; + this.parentTitle = parentTitle; + this.contentRating = contentRating; + this.summary = summary; + this.index = index; + this.parentIndex = parentIndex; + this.lastViewedAt = lastViewedAt; + this.year = year; + this.thumb = thumb; + this.art = art; + this.parentThumb = parentThumb; + this.grandparentThumb = grandparentThumb; + this.grandparentArt = grandparentArt; + this.grandparentTheme = grandparentTheme; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.media = media; + this.guids = guids; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional parentRatingKey() { + return parentRatingKey; + } + + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + public Optional guid() { + return guid; + } + + public Optional parentGuid() { + return parentGuid; + } + + public Optional grandparentGuid() { + return grandparentGuid; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional grandparentKey() { + return grandparentKey; + } + + public Optional parentKey() { + return parentKey; + } + + public Optional librarySectionKey() { + return librarySectionKey; + } + + public Optional grandparentTitle() { + return grandparentTitle; + } + + public Optional parentTitle() { + return parentTitle; + } + + public Optional contentRating() { + return contentRating; + } + + public Optional summary() { + return summary; + } + + public Optional index() { + return index; + } + + public Optional parentIndex() { + return parentIndex; + } + + public Optional lastViewedAt() { + return lastViewedAt; + } + + public Optional year() { + return year; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional parentThumb() { + return parentThumb; + } + + public Optional grandparentThumb() { + return grandparentThumb; + } + + public Optional grandparentArt() { + return grandparentArt; + } + + public Optional grandparentTheme() { + return grandparentTheme; + } + + public Optional duration() { + return duration; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional> media() { + return media; + } + + public Optional> guids() { + return guids; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckMetadata withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetOnDeckMetadata withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetOnDeckMetadata withLibrarySectionID(double librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetOnDeckMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetOnDeckMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetOnDeckMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetOnDeckMetadata withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public GetOnDeckMetadata withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public GetOnDeckMetadata withRatingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetOnDeckMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetOnDeckMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetOnDeckMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetOnDeckMetadata withParentRatingKey(double parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public GetOnDeckMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public GetOnDeckMetadata withGrandparentRatingKey(double grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public GetOnDeckMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public GetOnDeckMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetOnDeckMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetOnDeckMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public GetOnDeckMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public GetOnDeckMetadata withGrandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + public GetOnDeckMetadata withGrandparentGuid(Optional grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = grandparentGuid; + return this; + } + + public GetOnDeckMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetOnDeckMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetOnDeckMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetOnDeckMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetOnDeckMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public GetOnDeckMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public GetOnDeckMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public GetOnDeckMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public GetOnDeckMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public GetOnDeckMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public GetOnDeckMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public GetOnDeckMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public GetOnDeckMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public GetOnDeckMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public GetOnDeckMetadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public GetOnDeckMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetOnDeckMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetOnDeckMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetOnDeckMetadata withIndex(double index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetOnDeckMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetOnDeckMetadata withParentIndex(double parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public GetOnDeckMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public GetOnDeckMetadata withLastViewedAt(double lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public GetOnDeckMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public GetOnDeckMetadata withYear(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public GetOnDeckMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public GetOnDeckMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetOnDeckMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetOnDeckMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetOnDeckMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetOnDeckMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public GetOnDeckMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public GetOnDeckMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public GetOnDeckMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public GetOnDeckMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public GetOnDeckMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public GetOnDeckMetadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + public GetOnDeckMetadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + public GetOnDeckMetadata withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetOnDeckMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetOnDeckMetadata withOriginallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetOnDeckMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetOnDeckMetadata withAddedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetOnDeckMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetOnDeckMetadata withUpdatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetOnDeckMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetOnDeckMetadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetOnDeckMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetOnDeckMetadata withGuids(java.util.List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public GetOnDeckMetadata withGuids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckMetadata other = (GetOnDeckMetadata) o; + return + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && + java.util.Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.parentGuid, other.parentGuid) && + java.util.Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.grandparentKey, other.grandparentKey) && + java.util.Objects.deepEquals(this.parentKey, other.parentKey) && + java.util.Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + java.util.Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) && + java.util.Objects.deepEquals(this.parentTitle, other.parentTitle) && + java.util.Objects.deepEquals(this.contentRating, other.contentRating) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.parentIndex, other.parentIndex) && + java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + java.util.Objects.deepEquals(this.year, other.year) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.parentThumb, other.parentThumb) && + java.util.Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) && + java.util.Objects.deepEquals(this.grandparentArt, other.grandparentArt) && + java.util.Objects.deepEquals(this.grandparentTheme, other.grandparentTheme) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.guids, other.guids); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + ratingKey, + key, + parentRatingKey, + grandparentRatingKey, + guid, + parentGuid, + grandparentGuid, + type, + title, + grandparentKey, + parentKey, + librarySectionKey, + grandparentTitle, + parentTitle, + contentRating, + summary, + index, + parentIndex, + lastViewedAt, + year, + thumb, + art, + parentThumb, + grandparentThumb, + grandparentArt, + grandparentTheme, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + media, + guids); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckMetadata.class, + "allowSync", allowSync, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "ratingKey", ratingKey, + "key", key, + "parentRatingKey", parentRatingKey, + "grandparentRatingKey", grandparentRatingKey, + "guid", guid, + "parentGuid", parentGuid, + "grandparentGuid", grandparentGuid, + "type", type, + "title", title, + "grandparentKey", grandparentKey, + "parentKey", parentKey, + "librarySectionKey", librarySectionKey, + "grandparentTitle", grandparentTitle, + "parentTitle", parentTitle, + "contentRating", contentRating, + "summary", summary, + "index", index, + "parentIndex", parentIndex, + "lastViewedAt", lastViewedAt, + "year", year, + "thumb", thumb, + "art", art, + "parentThumb", parentThumb, + "grandparentThumb", grandparentThumb, + "grandparentArt", grandparentArt, + "grandparentTheme", grandparentTheme, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "media", media, + "guids", guids); + } + + public final static class Builder { + + private Optional allowSync = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional parentGuid = Optional.empty(); + + private Optional grandparentGuid = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> guids = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder librarySectionID(double librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder parentRatingKey(double parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public Builder grandparentRatingKey(double grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder parentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public Builder parentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public Builder grandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + public Builder grandparentGuid(Optional grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = grandparentGuid; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public Builder librarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder index(double index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder parentIndex(double parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public Builder lastViewedAt(double lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public Builder year(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder originallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder guids(java.util.List guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = Optional.ofNullable(guids); + return this; + } + + public Builder guids(Optional> guids) { + Utils.checkNotNull(guids, "guids"); + this.guids = guids; + return this; + } + + public GetOnDeckMetadata build() { + return new GetOnDeckMetadata( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + ratingKey, + key, + parentRatingKey, + grandparentRatingKey, + guid, + parentGuid, + grandparentGuid, + type, + title, + grandparentKey, + parentKey, + librarySectionKey, + grandparentTitle, + parentTitle, + contentRating, + summary, + index, + parentIndex, + lastViewedAt, + year, + thumb, + art, + parentThumb, + grandparentThumb, + grandparentArt, + grandparentTheme, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + media, + guids); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckPart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckPart.java new file mode 100644 index 00000000..9ad1467f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckPart.java @@ -0,0 +1,431 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Stream") + private Optional> stream; + + public GetOnDeckPart( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("container") Optional container, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Stream") Optional> stream) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(stream, "stream"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.audioProfile = audioProfile; + this.container = container; + this.videoProfile = videoProfile; + this.stream = stream; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional size() { + return size; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional container() { + return container; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> stream() { + return stream; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckPart withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetOnDeckPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetOnDeckPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetOnDeckPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetOnDeckPart withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetOnDeckPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetOnDeckPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetOnDeckPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetOnDeckPart withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetOnDeckPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetOnDeckPart withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetOnDeckPart withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetOnDeckPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetOnDeckPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetOnDeckPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetOnDeckPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetOnDeckPart withStream(java.util.List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + public GetOnDeckPart withStream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckPart other = (GetOnDeckPart) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.stream, other.stream); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + duration, + file, + size, + audioProfile, + container, + videoProfile, + stream); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckPart.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "audioProfile", audioProfile, + "container", container, + "videoProfile", videoProfile, + "stream", stream); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> stream = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder stream(java.util.List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + public Builder stream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; + return this; + } + + public GetOnDeckPart build() { + return new GetOnDeckPart( + id, + key, + duration, + file, + size, + audioProfile, + container, + videoProfile, + stream); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckRequestBuilder.java new file mode 100644 index 00000000..fb478a11 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetOnDeckRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetOnDeck sdk; + + public GetOnDeckRequestBuilder(SDKMethodInterfaces.MethodCallGetOnDeck sdk) { + this.sdk = sdk; + } + + public GetOnDeckResponse call() throws Exception { + + return sdk.getOnDeckDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponse.java new file mode 100644 index 00000000..e1bb5da6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The on Deck content + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetOnDeckResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The on Deck content + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetOnDeckResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetOnDeckResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetOnDeckResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The on Deck content + */ + public GetOnDeckResponse withTwoHundredApplicationJsonObject(GetOnDeckResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The on Deck content + */ + public GetOnDeckResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetOnDeckResponse withFourHundredAndOneApplicationJsonObject(GetOnDeckLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetOnDeckResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckResponse other = (GetOnDeckResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The on Deck content + */ + public Builder twoHundredApplicationJsonObject(GetOnDeckResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The on Deck content + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetOnDeckLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetOnDeckResponse build() { + return new GetOnDeckResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponseBody.java new file mode 100644 index 00000000..bb4e438c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetOnDeckResponseBody - The on Deck content + */ + +public class GetOnDeckResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetOnDeckResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckResponseBody withMediaContainer(GetOnDeckMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetOnDeckResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckResponseBody other = (GetOnDeckResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetOnDeckMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetOnDeckResponseBody build() { + return new GetOnDeckResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckStream.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckStream.java new file mode 100644 index 00000000..b76b363a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetOnDeckStream.java @@ -0,0 +1,1005 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetOnDeckStream { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamType") + private Optional streamType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codec") + private Optional codec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageTag") + private Optional languageTag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageCode") + private Optional languageCode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitDepth") + private Optional bitDepth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaLocation") + private Optional chromaLocation; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaSubsampling") + private Optional chromaSubsampling; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codedHeight") + private Optional codedHeight; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codedWidth") + private Optional codedWidth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorRange") + private Optional colorRange; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("frameRate") + private Optional frameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("level") + private Optional level; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("profile") + private Optional profile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("refFrames") + private Optional refFrames; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayTitle") + private Optional displayTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("extendedDisplayTitle") + private Optional extendedDisplayTitle; + + public GetOnDeckStream( + @JsonProperty("id") Optional id, + @JsonProperty("streamType") Optional streamType, + @JsonProperty("default") Optional default_, + @JsonProperty("codec") Optional codec, + @JsonProperty("index") Optional index, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("language") Optional language, + @JsonProperty("languageTag") Optional languageTag, + @JsonProperty("languageCode") Optional languageCode, + @JsonProperty("bitDepth") Optional bitDepth, + @JsonProperty("chromaLocation") Optional chromaLocation, + @JsonProperty("chromaSubsampling") Optional chromaSubsampling, + @JsonProperty("codedHeight") Optional codedHeight, + @JsonProperty("codedWidth") Optional codedWidth, + @JsonProperty("colorRange") Optional colorRange, + @JsonProperty("frameRate") Optional frameRate, + @JsonProperty("height") Optional height, + @JsonProperty("level") Optional level, + @JsonProperty("profile") Optional profile, + @JsonProperty("refFrames") Optional refFrames, + @JsonProperty("width") Optional width, + @JsonProperty("displayTitle") Optional displayTitle, + @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(streamType, "streamType"); + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(codec, "codec"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(languageTag, "languageTag"); + Utils.checkNotNull(languageCode, "languageCode"); + Utils.checkNotNull(bitDepth, "bitDepth"); + Utils.checkNotNull(chromaLocation, "chromaLocation"); + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + Utils.checkNotNull(codedHeight, "codedHeight"); + Utils.checkNotNull(codedWidth, "codedWidth"); + Utils.checkNotNull(colorRange, "colorRange"); + Utils.checkNotNull(frameRate, "frameRate"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(profile, "profile"); + Utils.checkNotNull(refFrames, "refFrames"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(displayTitle, "displayTitle"); + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.id = id; + this.streamType = streamType; + this.default_ = default_; + this.codec = codec; + this.index = index; + this.bitrate = bitrate; + this.language = language; + this.languageTag = languageTag; + this.languageCode = languageCode; + this.bitDepth = bitDepth; + this.chromaLocation = chromaLocation; + this.chromaSubsampling = chromaSubsampling; + this.codedHeight = codedHeight; + this.codedWidth = codedWidth; + this.colorRange = colorRange; + this.frameRate = frameRate; + this.height = height; + this.level = level; + this.profile = profile; + this.refFrames = refFrames; + this.width = width; + this.displayTitle = displayTitle; + this.extendedDisplayTitle = extendedDisplayTitle; + } + + public Optional id() { + return id; + } + + public Optional streamType() { + return streamType; + } + + public Optional default_() { + return default_; + } + + public Optional codec() { + return codec; + } + + public Optional index() { + return index; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional language() { + return language; + } + + public Optional languageTag() { + return languageTag; + } + + public Optional languageCode() { + return languageCode; + } + + public Optional bitDepth() { + return bitDepth; + } + + public Optional chromaLocation() { + return chromaLocation; + } + + public Optional chromaSubsampling() { + return chromaSubsampling; + } + + public Optional codedHeight() { + return codedHeight; + } + + public Optional codedWidth() { + return codedWidth; + } + + public Optional colorRange() { + return colorRange; + } + + public Optional frameRate() { + return frameRate; + } + + public Optional height() { + return height; + } + + public Optional level() { + return level; + } + + public Optional profile() { + return profile; + } + + public Optional refFrames() { + return refFrames; + } + + public Optional width() { + return width; + } + + public Optional displayTitle() { + return displayTitle; + } + + public Optional extendedDisplayTitle() { + return extendedDisplayTitle; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOnDeckStream withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetOnDeckStream withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetOnDeckStream withStreamType(double streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public GetOnDeckStream withStreamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public GetOnDeckStream withDefault(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public GetOnDeckStream withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public GetOnDeckStream withCodec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public GetOnDeckStream withCodec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public GetOnDeckStream withIndex(double index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetOnDeckStream withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetOnDeckStream withBitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetOnDeckStream withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetOnDeckStream withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public GetOnDeckStream withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public GetOnDeckStream withLanguageTag(String languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = Optional.ofNullable(languageTag); + return this; + } + + public GetOnDeckStream withLanguageTag(Optional languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = languageTag; + return this; + } + + public GetOnDeckStream withLanguageCode(String languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + public GetOnDeckStream withLanguageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public GetOnDeckStream withBitDepth(double bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public GetOnDeckStream withBitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public GetOnDeckStream withChromaLocation(String chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + public GetOnDeckStream withChromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + public GetOnDeckStream withChromaSubsampling(String chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + public GetOnDeckStream withChromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + public GetOnDeckStream withCodedHeight(double codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = Optional.ofNullable(codedHeight); + return this; + } + + public GetOnDeckStream withCodedHeight(Optional codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = codedHeight; + return this; + } + + public GetOnDeckStream withCodedWidth(double codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = Optional.ofNullable(codedWidth); + return this; + } + + public GetOnDeckStream withCodedWidth(Optional codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = codedWidth; + return this; + } + + public GetOnDeckStream withColorRange(String colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + public GetOnDeckStream withColorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + public GetOnDeckStream withFrameRate(double frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + public GetOnDeckStream withFrameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + public GetOnDeckStream withHeight(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetOnDeckStream withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetOnDeckStream withLevel(double level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public GetOnDeckStream withLevel(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public GetOnDeckStream withProfile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public GetOnDeckStream withProfile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public GetOnDeckStream withRefFrames(double refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + public GetOnDeckStream withRefFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + public GetOnDeckStream withWidth(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetOnDeckStream withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetOnDeckStream withDisplayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public GetOnDeckStream withDisplayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public GetOnDeckStream withExtendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public GetOnDeckStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnDeckStream other = (GetOnDeckStream) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.streamType, other.streamType) && + java.util.Objects.deepEquals(this.default_, other.default_) && + java.util.Objects.deepEquals(this.codec, other.codec) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.language, other.language) && + java.util.Objects.deepEquals(this.languageTag, other.languageTag) && + java.util.Objects.deepEquals(this.languageCode, other.languageCode) && + java.util.Objects.deepEquals(this.bitDepth, other.bitDepth) && + java.util.Objects.deepEquals(this.chromaLocation, other.chromaLocation) && + java.util.Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) && + java.util.Objects.deepEquals(this.codedHeight, other.codedHeight) && + java.util.Objects.deepEquals(this.codedWidth, other.codedWidth) && + java.util.Objects.deepEquals(this.colorRange, other.colorRange) && + java.util.Objects.deepEquals(this.frameRate, other.frameRate) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.level, other.level) && + java.util.Objects.deepEquals(this.profile, other.profile) && + java.util.Objects.deepEquals(this.refFrames, other.refFrames) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.displayTitle, other.displayTitle) && + java.util.Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + streamType, + default_, + codec, + index, + bitrate, + language, + languageTag, + languageCode, + bitDepth, + chromaLocation, + chromaSubsampling, + codedHeight, + codedWidth, + colorRange, + frameRate, + height, + level, + profile, + refFrames, + width, + displayTitle, + extendedDisplayTitle); + } + + @Override + public String toString() { + return Utils.toString(GetOnDeckStream.class, + "id", id, + "streamType", streamType, + "default_", default_, + "codec", codec, + "index", index, + "bitrate", bitrate, + "language", language, + "languageTag", languageTag, + "languageCode", languageCode, + "bitDepth", bitDepth, + "chromaLocation", chromaLocation, + "chromaSubsampling", chromaSubsampling, + "codedHeight", codedHeight, + "codedWidth", codedWidth, + "colorRange", colorRange, + "frameRate", frameRate, + "height", height, + "level", level, + "profile", profile, + "refFrames", refFrames, + "width", width, + "displayTitle", displayTitle, + "extendedDisplayTitle", extendedDisplayTitle); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional streamType = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional codec = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional languageTag = Optional.empty(); + + private Optional languageCode = Optional.empty(); + + private Optional bitDepth = Optional.empty(); + + private Optional chromaLocation = Optional.empty(); + + private Optional chromaSubsampling = Optional.empty(); + + private Optional codedHeight = Optional.empty(); + + private Optional codedWidth = Optional.empty(); + + private Optional colorRange = Optional.empty(); + + private Optional frameRate = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional level = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional refFrames = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional displayTitle = Optional.empty(); + + private Optional extendedDisplayTitle = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder streamType(double streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public Builder streamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public Builder default_(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public Builder default_(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Builder codec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public Builder codec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public Builder index(double index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder bitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public Builder language(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Builder languageTag(String languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = Optional.ofNullable(languageTag); + return this; + } + + public Builder languageTag(Optional languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = languageTag; + return this; + } + + public Builder languageCode(String languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + public Builder languageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public Builder bitDepth(double bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public Builder bitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public Builder chromaLocation(String chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + public Builder chromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + public Builder chromaSubsampling(String chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + public Builder chromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + public Builder codedHeight(double codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = Optional.ofNullable(codedHeight); + return this; + } + + public Builder codedHeight(Optional codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = codedHeight; + return this; + } + + public Builder codedWidth(double codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = Optional.ofNullable(codedWidth); + return this; + } + + public Builder codedWidth(Optional codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = codedWidth; + return this; + } + + public Builder colorRange(String colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + public Builder colorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + public Builder frameRate(double frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + public Builder frameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + public Builder height(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder level(double level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public Builder level(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public Builder profile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public Builder profile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public Builder refFrames(double refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + public Builder refFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + public Builder width(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder displayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public Builder displayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public Builder extendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + public GetOnDeckStream build() { + return new GetOnDeckStream( + id, + streamType, + default_, + codec, + index, + bitrate, + language, + languageTag, + languageCode, + bitDepth, + chromaLocation, + chromaSubsampling, + codedHeight, + codedWidth, + colorRange, + frameRate, + height, + level, + profile, + refFrames, + width, + displayTitle, + extendedDisplayTitle); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinErrors.java new file mode 100644 index 00000000..49361115 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPinErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetPinErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPinErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetPinErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetPinErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetPinErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetPinErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetPinErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPinErrors other = (GetPinErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetPinErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetPinErrors build() { + return new GetPinErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinPlexResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinPlexResponseBody.java new file mode 100644 index 00000000..6170ad8f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinPlexResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPinPlexResponseBody - X-Plex-Client-Identifier is missing + */ + +public class GetPinPlexResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetPinPlexResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPinPlexResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetPinPlexResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPinPlexResponseBody other = (GetPinPlexResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetPinPlexResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetPinPlexResponseBody build() { + return new GetPinPlexResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequest.java new file mode 100644 index 00000000..24447096 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequest.java @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPinRequest { + + /** + * Determines the kind of code returned by the API call + * Strong codes are used for Pin authentication flows + * Non-Strong codes are used for `Plex.tv/link` + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong") + private Optional strong; + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private String xPlexClientIdentifier; + + public GetPinRequest( + Optional strong, + String xPlexClientIdentifier) { + Utils.checkNotNull(strong, "strong"); + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.strong = strong; + this.xPlexClientIdentifier = xPlexClientIdentifier; + } + + /** + * Determines the kind of code returned by the API call + * Strong codes are used for Pin authentication flows + * Non-Strong codes are used for `Plex.tv/link` + * + */ + public Optional strong() { + return strong; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public String xPlexClientIdentifier() { + return xPlexClientIdentifier; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Determines the kind of code returned by the API call + * Strong codes are used for Pin authentication flows + * Non-Strong codes are used for `Plex.tv/link` + * + */ + public GetPinRequest withStrong(boolean strong) { + Utils.checkNotNull(strong, "strong"); + this.strong = Optional.ofNullable(strong); + return this; + } + + /** + * Determines the kind of code returned by the API call + * Strong codes are used for Pin authentication flows + * Non-Strong codes are used for `Plex.tv/link` + * + */ + public GetPinRequest withStrong(Optional strong) { + Utils.checkNotNull(strong, "strong"); + this.strong = strong; + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public GetPinRequest withXPlexClientIdentifier(String xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = xPlexClientIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPinRequest other = (GetPinRequest) o; + return + java.util.Objects.deepEquals(this.strong, other.strong) && + java.util.Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + strong, + xPlexClientIdentifier); + } + + @Override + public String toString() { + return Utils.toString(GetPinRequest.class, + "strong", strong, + "xPlexClientIdentifier", xPlexClientIdentifier); + } + + public final static class Builder { + + private Optional strong; + + private String xPlexClientIdentifier; + + private Builder() { + // force use of static builder() method + } + + /** + * Determines the kind of code returned by the API call + * Strong codes are used for Pin authentication flows + * Non-Strong codes are used for `Plex.tv/link` + * + */ + public Builder strong(boolean strong) { + Utils.checkNotNull(strong, "strong"); + this.strong = Optional.ofNullable(strong); + return this; + } + + /** + * Determines the kind of code returned by the API call + * Strong codes are used for Pin authentication flows + * Non-Strong codes are used for `Plex.tv/link` + * + */ + public Builder strong(Optional strong) { + Utils.checkNotNull(strong, "strong"); + this.strong = strong; + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public Builder xPlexClientIdentifier(String xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = xPlexClientIdentifier; + return this; + } + + public GetPinRequest build() { + if (strong == null) { + strong = _SINGLETON_VALUE_Strong.value(); + } + return new GetPinRequest( + strong, + xPlexClientIdentifier); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Strong = + new LazySingletonValue<>( + "strong", + "false", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequestBuilder.java new file mode 100644 index 00000000..36440f65 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetPinRequestBuilder { + + private Optional strong = Utils.readDefaultOrConstValue( + "strong", + "false", + new TypeReference>() {}); + private String xPlexClientIdentifier; + private java.util.Optional serverURL = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetPin sdk; + + public GetPinRequestBuilder(SDKMethodInterfaces.MethodCallGetPin sdk) { + this.sdk = sdk; + } + + public GetPinRequestBuilder strong(boolean strong) { + Utils.checkNotNull(strong, "strong"); + this.strong = Optional.of(strong); + return this; + } + + public GetPinRequestBuilder strong(Optional strong) { + Utils.checkNotNull(strong, "strong"); + this.strong = strong; + return this; + } + + public GetPinRequestBuilder xPlexClientIdentifier(String xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = xPlexClientIdentifier; + return this; + } + + public GetPinRequestBuilder serverURL(String serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = Optional.of(serverURL); + return this; + } + + public GetPinRequestBuilder serverURL(java.util.Optional serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = serverURL; + return this; + } + + public GetPinResponse call() throws Exception { + if (strong == null) { + strong = _SINGLETON_VALUE_Strong.value(); + } + + return sdk.getPin( + strong, + xPlexClientIdentifier, + serverURL); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Strong = + new LazySingletonValue<>( + "strong", + "false", + new TypeReference>() {}); +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponse.java new file mode 100644 index 00000000..f94f4d39 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPinResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The Pin + */ + private Optional twoHundredApplicationJsonObject; + + /** + * X-Plex-Client-Identifier is missing + */ + private Optional fourHundredApplicationJsonObject; + + public GetPinResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredApplicationJsonObject, "fourHundredApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredApplicationJsonObject = fourHundredApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The Pin + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public Optional fourHundredApplicationJsonObject() { + return fourHundredApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetPinResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPinResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPinResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Pin + */ + public GetPinResponse withTwoHundredApplicationJsonObject(GetPinResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Pin + */ + public GetPinResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public GetPinResponse withFourHundredApplicationJsonObject(GetPinPlexResponseBody fourHundredApplicationJsonObject) { + Utils.checkNotNull(fourHundredApplicationJsonObject, "fourHundredApplicationJsonObject"); + this.fourHundredApplicationJsonObject = Optional.ofNullable(fourHundredApplicationJsonObject); + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public GetPinResponse withFourHundredApplicationJsonObject(Optional fourHundredApplicationJsonObject) { + Utils.checkNotNull(fourHundredApplicationJsonObject, "fourHundredApplicationJsonObject"); + this.fourHundredApplicationJsonObject = fourHundredApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPinResponse other = (GetPinResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredApplicationJsonObject, other.fourHundredApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetPinResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredApplicationJsonObject", fourHundredApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Pin + */ + public Builder twoHundredApplicationJsonObject(GetPinResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Pin + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public Builder fourHundredApplicationJsonObject(GetPinPlexResponseBody fourHundredApplicationJsonObject) { + Utils.checkNotNull(fourHundredApplicationJsonObject, "fourHundredApplicationJsonObject"); + this.fourHundredApplicationJsonObject = Optional.ofNullable(fourHundredApplicationJsonObject); + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public Builder fourHundredApplicationJsonObject(Optional fourHundredApplicationJsonObject) { + Utils.checkNotNull(fourHundredApplicationJsonObject, "fourHundredApplicationJsonObject"); + this.fourHundredApplicationJsonObject = fourHundredApplicationJsonObject; + return this; + } + + public GetPinResponse build() { + return new GetPinResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponseBody.java new file mode 100644 index 00000000..8546b9e5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPinResponseBody.java @@ -0,0 +1,614 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPinResponseBody - The Pin + */ + +public class GetPinResponseBody { + + /** + * PinID for use with authentication + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("product") + private Optional product; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("trusted") + private Optional trusted; + + /** + * a link to a QR code hosted on plex.tv + * The QR code redirects to the relevant `plex.tv/link` authentication page + * Which then prompts the user for the 4 Digit Link Pin + * + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("qr") + private Optional qr; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("clientIdentifier") + private Optional clientIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expiresIn") + private Optional expiresIn; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expiresAt") + private Optional expiresAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("authToken") + private Optional authToken; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("newRegistration") + private Optional newRegistration; + + public GetPinResponseBody( + @JsonProperty("id") Optional id, + @JsonProperty("code") Optional code, + @JsonProperty("product") Optional product, + @JsonProperty("trusted") Optional trusted, + @JsonProperty("qr") Optional qr, + @JsonProperty("clientIdentifier") Optional clientIdentifier, + @JsonProperty("location") Optional location, + @JsonProperty("expiresIn") Optional expiresIn, + @JsonProperty("createdAt") Optional createdAt, + @JsonProperty("expiresAt") Optional expiresAt, + @JsonProperty("authToken") Optional authToken, + @JsonProperty("newRegistration") Optional newRegistration) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(trusted, "trusted"); + Utils.checkNotNull(qr, "qr"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(expiresIn, "expiresIn"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(expiresAt, "expiresAt"); + Utils.checkNotNull(authToken, "authToken"); + Utils.checkNotNull(newRegistration, "newRegistration"); + this.id = id; + this.code = code; + this.product = product; + this.trusted = trusted; + this.qr = qr; + this.clientIdentifier = clientIdentifier; + this.location = location; + this.expiresIn = expiresIn; + this.createdAt = createdAt; + this.expiresAt = expiresAt; + this.authToken = authToken; + this.newRegistration = newRegistration; + } + + /** + * PinID for use with authentication + */ + public Optional id() { + return id; + } + + public Optional code() { + return code; + } + + public Optional product() { + return product; + } + + public Optional trusted() { + return trusted; + } + + /** + * a link to a QR code hosted on plex.tv + * The QR code redirects to the relevant `plex.tv/link` authentication page + * Which then prompts the user for the 4 Digit Link Pin + * + */ + public Optional qr() { + return qr; + } + + public Optional clientIdentifier() { + return clientIdentifier; + } + + public Optional location() { + return location; + } + + public Optional expiresIn() { + return expiresIn; + } + + public Optional createdAt() { + return createdAt; + } + + public Optional expiresAt() { + return expiresAt; + } + + public Optional authToken() { + return authToken; + } + + public Optional newRegistration() { + return newRegistration; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * PinID for use with authentication + */ + public GetPinResponseBody withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * PinID for use with authentication + */ + public GetPinResponseBody withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetPinResponseBody withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetPinResponseBody withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetPinResponseBody withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + public GetPinResponseBody withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + public GetPinResponseBody withTrusted(boolean trusted) { + Utils.checkNotNull(trusted, "trusted"); + this.trusted = Optional.ofNullable(trusted); + return this; + } + + public GetPinResponseBody withTrusted(Optional trusted) { + Utils.checkNotNull(trusted, "trusted"); + this.trusted = trusted; + return this; + } + + /** + * a link to a QR code hosted on plex.tv + * The QR code redirects to the relevant `plex.tv/link` authentication page + * Which then prompts the user for the 4 Digit Link Pin + * + */ + public GetPinResponseBody withQr(String qr) { + Utils.checkNotNull(qr, "qr"); + this.qr = Optional.ofNullable(qr); + return this; + } + + /** + * a link to a QR code hosted on plex.tv + * The QR code redirects to the relevant `plex.tv/link` authentication page + * Which then prompts the user for the 4 Digit Link Pin + * + */ + public GetPinResponseBody withQr(Optional qr) { + Utils.checkNotNull(qr, "qr"); + this.qr = qr; + return this; + } + + public GetPinResponseBody withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + public GetPinResponseBody withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + public GetPinResponseBody withLocation(Location location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public GetPinResponseBody withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public GetPinResponseBody withExpiresIn(double expiresIn) { + Utils.checkNotNull(expiresIn, "expiresIn"); + this.expiresIn = Optional.ofNullable(expiresIn); + return this; + } + + public GetPinResponseBody withExpiresIn(Optional expiresIn) { + Utils.checkNotNull(expiresIn, "expiresIn"); + this.expiresIn = expiresIn; + return this; + } + + public GetPinResponseBody withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public GetPinResponseBody withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public GetPinResponseBody withExpiresAt(OffsetDateTime expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = Optional.ofNullable(expiresAt); + return this; + } + + public GetPinResponseBody withExpiresAt(Optional expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + public GetPinResponseBody withAuthToken(String authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = Optional.ofNullable(authToken); + return this; + } + + public GetPinResponseBody withAuthToken(Optional authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = authToken; + return this; + } + + public GetPinResponseBody withNewRegistration(String newRegistration) { + Utils.checkNotNull(newRegistration, "newRegistration"); + this.newRegistration = Optional.ofNullable(newRegistration); + return this; + } + + public GetPinResponseBody withNewRegistration(Optional newRegistration) { + Utils.checkNotNull(newRegistration, "newRegistration"); + this.newRegistration = newRegistration; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPinResponseBody other = (GetPinResponseBody) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.product, other.product) && + java.util.Objects.deepEquals(this.trusted, other.trusted) && + java.util.Objects.deepEquals(this.qr, other.qr) && + java.util.Objects.deepEquals(this.clientIdentifier, other.clientIdentifier) && + java.util.Objects.deepEquals(this.location, other.location) && + java.util.Objects.deepEquals(this.expiresIn, other.expiresIn) && + java.util.Objects.deepEquals(this.createdAt, other.createdAt) && + java.util.Objects.deepEquals(this.expiresAt, other.expiresAt) && + java.util.Objects.deepEquals(this.authToken, other.authToken) && + java.util.Objects.deepEquals(this.newRegistration, other.newRegistration); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + code, + product, + trusted, + qr, + clientIdentifier, + location, + expiresIn, + createdAt, + expiresAt, + authToken, + newRegistration); + } + + @Override + public String toString() { + return Utils.toString(GetPinResponseBody.class, + "id", id, + "code", code, + "product", product, + "trusted", trusted, + "qr", qr, + "clientIdentifier", clientIdentifier, + "location", location, + "expiresIn", expiresIn, + "createdAt", createdAt, + "expiresAt", expiresAt, + "authToken", authToken, + "newRegistration", newRegistration); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional code = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional trusted = Optional.empty(); + + private Optional qr = Optional.empty(); + + private Optional clientIdentifier = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional expiresIn = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional expiresAt = Optional.empty(); + + private Optional authToken = Optional.empty(); + + private Optional newRegistration = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * PinID for use with authentication + */ + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * PinID for use with authentication + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder code(String 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 product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + public Builder trusted(boolean trusted) { + Utils.checkNotNull(trusted, "trusted"); + this.trusted = Optional.ofNullable(trusted); + return this; + } + + public Builder trusted(Optional trusted) { + Utils.checkNotNull(trusted, "trusted"); + this.trusted = trusted; + return this; + } + + /** + * a link to a QR code hosted on plex.tv + * The QR code redirects to the relevant `plex.tv/link` authentication page + * Which then prompts the user for the 4 Digit Link Pin + * + */ + public Builder qr(String qr) { + Utils.checkNotNull(qr, "qr"); + this.qr = Optional.ofNullable(qr); + return this; + } + + /** + * a link to a QR code hosted on plex.tv + * The QR code redirects to the relevant `plex.tv/link` authentication page + * Which then prompts the user for the 4 Digit Link Pin + * + */ + public Builder qr(Optional qr) { + Utils.checkNotNull(qr, "qr"); + this.qr = qr; + return this; + } + + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + public Builder location(Location location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public Builder expiresIn(double expiresIn) { + Utils.checkNotNull(expiresIn, "expiresIn"); + this.expiresIn = Optional.ofNullable(expiresIn); + return this; + } + + public Builder expiresIn(Optional expiresIn) { + Utils.checkNotNull(expiresIn, "expiresIn"); + this.expiresIn = expiresIn; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Builder expiresAt(OffsetDateTime expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = Optional.ofNullable(expiresAt); + return this; + } + + public Builder expiresAt(Optional expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + public Builder authToken(String authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = Optional.ofNullable(authToken); + return this; + } + + public Builder authToken(Optional authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = authToken; + return this; + } + + public Builder newRegistration(String newRegistration) { + Utils.checkNotNull(newRegistration, "newRegistration"); + this.newRegistration = Optional.ofNullable(newRegistration); + return this; + } + + public Builder newRegistration(Optional newRegistration) { + Utils.checkNotNull(newRegistration, "newRegistration"); + this.newRegistration = newRegistration; + return this; + } + + public GetPinResponseBody build() { + return new GetPinResponseBody( + id, + code, + product, + trusted, + qr, + clientIdentifier, + location, + expiresIn, + createdAt, + expiresAt, + authToken, + newRegistration); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsCountry.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsCountry.java new file mode 100644 index 00000000..387f0684 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsCountry.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsCountry { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetPlaylistContentsCountry( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsCountry withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetPlaylistContentsCountry withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsCountry other = (GetPlaylistContentsCountry) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsCountry.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetPlaylistContentsCountry build() { + return new GetPlaylistContentsCountry( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsDirector.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsDirector.java new file mode 100644 index 00000000..021215ba --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsDirector.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsDirector { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetPlaylistContentsDirector( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsDirector withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetPlaylistContentsDirector withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsDirector other = (GetPlaylistContentsDirector) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsDirector.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetPlaylistContentsDirector build() { + return new GetPlaylistContentsDirector( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsErrors.java new file mode 100644 index 00000000..50000c86 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetPlaylistContentsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetPlaylistContentsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetPlaylistContentsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetPlaylistContentsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetPlaylistContentsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetPlaylistContentsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsErrors other = (GetPlaylistContentsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetPlaylistContentsErrors build() { + return new GetPlaylistContentsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsGenre.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsGenre.java new file mode 100644 index 00000000..1199d97c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsGenre.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsGenre { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetPlaylistContentsGenre( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsGenre withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetPlaylistContentsGenre withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsGenre other = (GetPlaylistContentsGenre) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsGenre.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetPlaylistContentsGenre build() { + return new GetPlaylistContentsGenre( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMedia.java new file mode 100644 index 00000000..cb003d4e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMedia.java @@ -0,0 +1,759 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public GetPlaylistContentsMedia( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.optimizedForStreaming = optimizedForStreaming; + this.audioProfile = audioProfile; + this.has64bitOffsets = has64bitOffsets; + this.videoProfile = videoProfile; + this.part = part; + } + + public Optional id() { + return id; + } + + public Optional duration() { + return duration; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional width() { + return width; + } + + public Optional height() { + return height; + } + + public Optional aspectRatio() { + return aspectRatio; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional videoResolution() { + return videoResolution; + } + + public Optional container() { + return container; + } + + public Optional videoFrameRate() { + return videoFrameRate; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsMedia withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetPlaylistContentsMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetPlaylistContentsMedia withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetPlaylistContentsMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetPlaylistContentsMedia withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetPlaylistContentsMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetPlaylistContentsMedia withWidth(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetPlaylistContentsMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetPlaylistContentsMedia withHeight(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetPlaylistContentsMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetPlaylistContentsMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public GetPlaylistContentsMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public GetPlaylistContentsMedia withAudioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetPlaylistContentsMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetPlaylistContentsMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetPlaylistContentsMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetPlaylistContentsMedia withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public GetPlaylistContentsMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public GetPlaylistContentsMedia withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public GetPlaylistContentsMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public GetPlaylistContentsMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetPlaylistContentsMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetPlaylistContentsMedia withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public GetPlaylistContentsMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public GetPlaylistContentsMedia withOptimizedForStreaming(int optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetPlaylistContentsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetPlaylistContentsMedia withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetPlaylistContentsMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetPlaylistContentsMedia withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetPlaylistContentsMedia withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetPlaylistContentsMedia withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetPlaylistContentsMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetPlaylistContentsMedia withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetPlaylistContentsMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsMedia other = (GetPlaylistContentsMedia) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.videoResolution, other.videoResolution) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + audioProfile, + has64bitOffsets, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsMedia.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "optimizedForStreaming", optimizedForStreaming, + "audioProfile", audioProfile, + "has64bitOffsets", has64bitOffsets, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder optimizedForStreaming(int optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public GetPlaylistContentsMedia build() { + return new GetPlaylistContentsMedia( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + audioProfile, + has64bitOffsets, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMediaContainer.java new file mode 100644 index 00000000..f69686c7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMediaContainer.java @@ -0,0 +1,431 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistType") + private Optional playlistType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("smart") + private Optional smart; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetPlaylistContentsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("composite") Optional composite, + @JsonProperty("duration") Optional duration, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("playlistType") Optional playlistType, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("smart") Optional smart, + @JsonProperty("title") Optional title, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.composite = composite; + this.duration = duration; + this.leafCount = leafCount; + this.playlistType = playlistType; + this.ratingKey = ratingKey; + this.smart = smart; + this.title = title; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional composite() { + return composite; + } + + public Optional duration() { + return duration; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional playlistType() { + return playlistType; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional smart() { + return smart; + } + + public Optional title() { + return title; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetPlaylistContentsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetPlaylistContentsMediaContainer withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public GetPlaylistContentsMediaContainer withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public GetPlaylistContentsMediaContainer withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetPlaylistContentsMediaContainer withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetPlaylistContentsMediaContainer withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetPlaylistContentsMediaContainer withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetPlaylistContentsMediaContainer withPlaylistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public GetPlaylistContentsMediaContainer withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public GetPlaylistContentsMediaContainer withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetPlaylistContentsMediaContainer withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetPlaylistContentsMediaContainer withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public GetPlaylistContentsMediaContainer withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public GetPlaylistContentsMediaContainer withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetPlaylistContentsMediaContainer withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetPlaylistContentsMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetPlaylistContentsMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsMediaContainer other = (GetPlaylistContentsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.composite, other.composite) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.playlistType, other.playlistType) && + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.smart, other.smart) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + composite, + duration, + leafCount, + playlistType, + ratingKey, + smart, + title, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsMediaContainer.class, + "size", size, + "composite", composite, + "duration", duration, + "leafCount", leafCount, + "playlistType", playlistType, + "ratingKey", ratingKey, + "smart", smart, + "title", title, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder playlistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetPlaylistContentsMediaContainer build() { + return new GetPlaylistContentsMediaContainer( + size, + composite, + duration, + leafCount, + playlistType, + ratingKey, + smart, + title, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMetadata.java new file mode 100644 index 00000000..91e173da --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsMetadata.java @@ -0,0 +1,1375 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionKey") + private Optional librarySectionKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPremiumExtras") + private Optional hasPremiumExtras; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPremiumPrimaryExtra") + private Optional hasPremiumPrimaryExtra; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + public GetPlaylistContentsMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("studio") Optional studio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("rating") Optional rating, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("year") Optional year, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("hasPremiumExtras") Optional hasPremiumExtras, + @JsonProperty("hasPremiumPrimaryExtra") Optional hasPremiumPrimaryExtra, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("Media") Optional> media, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("Role") Optional> role) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(role, "role"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.studio = studio; + this.type = type; + this.title = title; + this.titleSort = titleSort; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionID = librarySectionID; + this.librarySectionKey = librarySectionKey; + this.contentRating = contentRating; + this.summary = summary; + this.rating = rating; + this.audienceRating = audienceRating; + this.year = year; + this.tagline = tagline; + this.thumb = thumb; + this.art = art; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.audienceRatingImage = audienceRatingImage; + this.hasPremiumExtras = hasPremiumExtras; + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + this.ratingImage = ratingImage; + this.media = media; + this.genre = genre; + this.country = country; + this.director = director; + this.writer = writer; + this.role = role; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional studio() { + return studio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional titleSort() { + return titleSort; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionKey() { + return librarySectionKey; + } + + public Optional contentRating() { + return contentRating; + } + + public Optional summary() { + return summary; + } + + public Optional rating() { + return rating; + } + + public Optional audienceRating() { + return audienceRating; + } + + public Optional year() { + return year; + } + + public Optional tagline() { + return tagline; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional duration() { + return duration; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional audienceRatingImage() { + return audienceRatingImage; + } + + public Optional hasPremiumExtras() { + return hasPremiumExtras; + } + + public Optional hasPremiumPrimaryExtra() { + return hasPremiumPrimaryExtra; + } + + public Optional ratingImage() { + return ratingImage; + } + + public Optional> media() { + return media; + } + + public Optional> genre() { + return genre; + } + + public Optional> country() { + return country; + } + + public Optional> director() { + return director; + } + + public Optional> writer() { + return writer; + } + + public Optional> role() { + return role; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetPlaylistContentsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetPlaylistContentsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetPlaylistContentsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetPlaylistContentsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetPlaylistContentsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetPlaylistContentsMetadata withStudio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public GetPlaylistContentsMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public GetPlaylistContentsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetPlaylistContentsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetPlaylistContentsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetPlaylistContentsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetPlaylistContentsMetadata withTitleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public GetPlaylistContentsMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public GetPlaylistContentsMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetPlaylistContentsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetPlaylistContentsMetadata withLibrarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetPlaylistContentsMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetPlaylistContentsMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public GetPlaylistContentsMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public GetPlaylistContentsMetadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public GetPlaylistContentsMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetPlaylistContentsMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetPlaylistContentsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetPlaylistContentsMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public GetPlaylistContentsMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public GetPlaylistContentsMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public GetPlaylistContentsMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public GetPlaylistContentsMetadata withYear(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public GetPlaylistContentsMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public GetPlaylistContentsMetadata withTagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public GetPlaylistContentsMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public GetPlaylistContentsMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetPlaylistContentsMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetPlaylistContentsMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetPlaylistContentsMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetPlaylistContentsMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetPlaylistContentsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetPlaylistContentsMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetPlaylistContentsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetPlaylistContentsMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetPlaylistContentsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetPlaylistContentsMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetPlaylistContentsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetPlaylistContentsMetadata withAudienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public GetPlaylistContentsMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public GetPlaylistContentsMetadata withHasPremiumExtras(String hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); + return this; + } + + public GetPlaylistContentsMetadata withHasPremiumExtras(Optional hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = hasPremiumExtras; + return this; + } + + public GetPlaylistContentsMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); + return this; + } + + public GetPlaylistContentsMetadata withHasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + return this; + } + + public GetPlaylistContentsMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public GetPlaylistContentsMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public GetPlaylistContentsMetadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetPlaylistContentsMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetPlaylistContentsMetadata withGenre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public GetPlaylistContentsMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public GetPlaylistContentsMetadata withCountry(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public GetPlaylistContentsMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public GetPlaylistContentsMetadata withDirector(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public GetPlaylistContentsMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public GetPlaylistContentsMetadata withWriter(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public GetPlaylistContentsMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public GetPlaylistContentsMetadata withRole(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public GetPlaylistContentsMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsMetadata other = (GetPlaylistContentsMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.studio, other.studio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.titleSort, other.titleSort) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + java.util.Objects.deepEquals(this.contentRating, other.contentRating) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.rating, other.rating) && + java.util.Objects.deepEquals(this.audienceRating, other.audienceRating) && + java.util.Objects.deepEquals(this.year, other.year) && + java.util.Objects.deepEquals(this.tagline, other.tagline) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && + java.util.Objects.deepEquals(this.hasPremiumExtras, other.hasPremiumExtras) && + java.util.Objects.deepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) && + java.util.Objects.deepEquals(this.ratingImage, other.ratingImage) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.genre, other.genre) && + java.util.Objects.deepEquals(this.country, other.country) && + java.util.Objects.deepEquals(this.director, other.director) && + java.util.Objects.deepEquals(this.writer, other.writer) && + java.util.Objects.deepEquals(this.role, other.role); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + studio, + type, + title, + titleSort, + librarySectionTitle, + librarySectionID, + librarySectionKey, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + hasPremiumExtras, + hasPremiumPrimaryExtra, + ratingImage, + media, + genre, + country, + director, + writer, + role); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "studio", studio, + "type", type, + "title", title, + "titleSort", titleSort, + "librarySectionTitle", librarySectionTitle, + "librarySectionID", librarySectionID, + "librarySectionKey", librarySectionKey, + "contentRating", contentRating, + "summary", summary, + "rating", rating, + "audienceRating", audienceRating, + "year", year, + "tagline", tagline, + "thumb", thumb, + "art", art, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "audienceRatingImage", audienceRatingImage, + "hasPremiumExtras", hasPremiumExtras, + "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra, + "ratingImage", ratingImage, + "media", media, + "genre", genre, + "country", country, + "director", director, + "writer", writer, + "role", role); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional hasPremiumExtras = Optional.empty(); + + private Optional hasPremiumPrimaryExtra = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder studio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder titleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionID(int librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public Builder librarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public Builder year(int year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder tagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder audienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Builder hasPremiumExtras(String hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); + return this; + } + + public Builder hasPremiumExtras(Optional hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = hasPremiumExtras; + return this; + } + + public Builder hasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); + return this; + } + + public Builder hasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + return this; + } + + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder genre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Builder genre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Builder country(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder director(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Builder writer(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Builder writer(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Builder role(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public GetPlaylistContentsMetadata build() { + return new GetPlaylistContentsMetadata( + ratingKey, + key, + guid, + studio, + type, + title, + titleSort, + librarySectionTitle, + librarySectionID, + librarySectionKey, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + hasPremiumExtras, + hasPremiumPrimaryExtra, + ratingImage, + media, + genre, + country, + director, + writer, + role); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPart.java new file mode 100644 index 00000000..f2a89fd3 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPart.java @@ -0,0 +1,472 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + public GetPlaylistContentsPart( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("container") Optional container, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("videoProfile") Optional videoProfile) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(videoProfile, "videoProfile"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.audioProfile = audioProfile; + this.container = container; + this.has64bitOffsets = has64bitOffsets; + this.optimizedForStreaming = optimizedForStreaming; + this.videoProfile = videoProfile; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional size() { + return size; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional container() { + return container; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional videoProfile() { + return videoProfile; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsPart withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetPlaylistContentsPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetPlaylistContentsPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetPlaylistContentsPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetPlaylistContentsPart withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetPlaylistContentsPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetPlaylistContentsPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetPlaylistContentsPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetPlaylistContentsPart withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetPlaylistContentsPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetPlaylistContentsPart withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetPlaylistContentsPart withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetPlaylistContentsPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetPlaylistContentsPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetPlaylistContentsPart withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetPlaylistContentsPart withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetPlaylistContentsPart withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetPlaylistContentsPart withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetPlaylistContentsPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetPlaylistContentsPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsPart other = (GetPlaylistContentsPart) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + duration, + file, + size, + audioProfile, + container, + has64bitOffsets, + optimizedForStreaming, + videoProfile); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsPart.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "audioProfile", audioProfile, + "container", container, + "has64bitOffsets", has64bitOffsets, + "optimizedForStreaming", optimizedForStreaming, + "videoProfile", videoProfile); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder optimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetPlaylistContentsPart build() { + return new GetPlaylistContentsPart( + id, + key, + duration, + file, + size, + audioProfile, + container, + has64bitOffsets, + optimizedForStreaming, + videoProfile); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPlaylistsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPlaylistsResponseBody.java new file mode 100644 index 00000000..5c72069c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsPlaylistsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPlaylistContentsPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetPlaylistContentsPlaylistsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetPlaylistContentsPlaylistsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsPlaylistsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetPlaylistContentsPlaylistsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsPlaylistsResponseBody other = (GetPlaylistContentsPlaylistsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsPlaylistsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetPlaylistContentsPlaylistsResponseBody build() { + return new GetPlaylistContentsPlaylistsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequest.java new file mode 100644 index 00000000..35e4111d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequest.java @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsRequest { + + /** + * the ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") + private double playlistID; + + /** + * the metadata type of the item to return + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private double type; + + public GetPlaylistContentsRequest( + double playlistID, + double type) { + Utils.checkNotNull(playlistID, "playlistID"); + Utils.checkNotNull(type, "type"); + this.playlistID = playlistID; + this.type = type; + } + + /** + * the ID of the playlist + */ + public double playlistID() { + return playlistID; + } + + /** + * the metadata type of the item to return + */ + public double type() { + return type; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the ID of the playlist + */ + public GetPlaylistContentsRequest withPlaylistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * the metadata type of the item to return + */ + public GetPlaylistContentsRequest withType(double type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsRequest other = (GetPlaylistContentsRequest) o; + return + java.util.Objects.deepEquals(this.playlistID, other.playlistID) && + java.util.Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + playlistID, + type); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsRequest.class, + "playlistID", playlistID, + "type", type); + } + + public final static class Builder { + + private Double playlistID; + + private Double type; + + private Builder() { + // force use of static builder() method + } + + /** + * the ID of the playlist + */ + public Builder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * the metadata type of the item to return + */ + public Builder type(double type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetPlaylistContentsRequest build() { + return new GetPlaylistContentsRequest( + playlistID, + type); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequestBuilder.java new file mode 100644 index 00000000..4f0700c7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetPlaylistContentsRequestBuilder { + + private Double playlistID; + private Double type; + private final SDKMethodInterfaces.MethodCallGetPlaylistContents sdk; + + public GetPlaylistContentsRequestBuilder(SDKMethodInterfaces.MethodCallGetPlaylistContents sdk) { + this.sdk = sdk; + } + + public GetPlaylistContentsRequestBuilder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public GetPlaylistContentsRequestBuilder type(double type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetPlaylistContentsResponse call() throws Exception { + + return sdk.getPlaylistContents( + playlistID, + type); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponse.java new file mode 100644 index 00000000..8e64214c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The playlist contents + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetPlaylistContentsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The playlist contents + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetPlaylistContentsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistContentsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The playlist contents + */ + public GetPlaylistContentsResponse withTwoHundredApplicationJsonObject(GetPlaylistContentsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The playlist contents + */ + public GetPlaylistContentsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetPlaylistContentsResponse withFourHundredAndOneApplicationJsonObject(GetPlaylistContentsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetPlaylistContentsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsResponse other = (GetPlaylistContentsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The playlist contents + */ + public Builder twoHundredApplicationJsonObject(GetPlaylistContentsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The playlist contents + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetPlaylistContentsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetPlaylistContentsResponse build() { + return new GetPlaylistContentsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponseBody.java new file mode 100644 index 00000000..a8f2e978 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPlaylistContentsResponseBody - The playlist contents + */ + +public class GetPlaylistContentsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetPlaylistContentsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsResponseBody withMediaContainer(GetPlaylistContentsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetPlaylistContentsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsResponseBody other = (GetPlaylistContentsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetPlaylistContentsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetPlaylistContentsResponseBody build() { + return new GetPlaylistContentsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRole.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRole.java new file mode 100644 index 00000000..91f2d299 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsRole.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsRole { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetPlaylistContentsRole( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsRole withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetPlaylistContentsRole withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsRole other = (GetPlaylistContentsRole) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsRole.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetPlaylistContentsRole build() { + return new GetPlaylistContentsRole( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsWriter.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsWriter.java new file mode 100644 index 00000000..8baa3cf5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistContentsWriter.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistContentsWriter { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetPlaylistContentsWriter( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistContentsWriter withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetPlaylistContentsWriter withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistContentsWriter other = (GetPlaylistContentsWriter) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistContentsWriter.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetPlaylistContentsWriter build() { + return new GetPlaylistContentsWriter( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistErrors.java new file mode 100644 index 00000000..678166d9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetPlaylistErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetPlaylistErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetPlaylistErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetPlaylistErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetPlaylistErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetPlaylistErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistErrors other = (GetPlaylistErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetPlaylistErrors build() { + return new GetPlaylistErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMediaContainer.java new file mode 100644 index 00000000..64f4ef5f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetPlaylistMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetPlaylistMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetPlaylistMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetPlaylistMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistMediaContainer other = (GetPlaylistMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistMediaContainer.class, + "size", size, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetPlaylistMediaContainer build() { + return new GetPlaylistMediaContainer( + size, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMetadata.java new file mode 100644 index 00000000..f591c030 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistMetadata.java @@ -0,0 +1,677 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("smart") + private Optional smart; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistType") + private Optional playlistType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("icon") + private Optional icon; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + public GetPlaylistMetadata( + @JsonProperty("content") Optional content, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("summary") Optional summary, + @JsonProperty("smart") Optional smart, + @JsonProperty("playlistType") Optional playlistType, + @JsonProperty("composite") Optional composite, + @JsonProperty("icon") Optional icon, + @JsonProperty("duration") Optional duration, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt) { + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(icon, "icon"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.content = content; + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.type = type; + this.title = title; + this.summary = summary; + this.smart = smart; + this.playlistType = playlistType; + this.composite = composite; + this.icon = icon; + this.duration = duration; + this.leafCount = leafCount; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + } + + public Optional content() { + return content; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional summary() { + return summary; + } + + public Optional smart() { + return smart; + } + + public Optional playlistType() { + return playlistType; + } + + public Optional composite() { + return composite; + } + + public Optional icon() { + return icon; + } + + public Optional duration() { + return duration; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistMetadata withContent(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public GetPlaylistMetadata withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public GetPlaylistMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetPlaylistMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetPlaylistMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetPlaylistMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetPlaylistMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetPlaylistMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetPlaylistMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetPlaylistMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetPlaylistMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetPlaylistMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetPlaylistMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetPlaylistMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetPlaylistMetadata withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public GetPlaylistMetadata withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public GetPlaylistMetadata withPlaylistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public GetPlaylistMetadata withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public GetPlaylistMetadata withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public GetPlaylistMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public GetPlaylistMetadata withIcon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public GetPlaylistMetadata withIcon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public GetPlaylistMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetPlaylistMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetPlaylistMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetPlaylistMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetPlaylistMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetPlaylistMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetPlaylistMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetPlaylistMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistMetadata other = (GetPlaylistMetadata) o; + return + java.util.Objects.deepEquals(this.content, other.content) && + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.smart, other.smart) && + java.util.Objects.deepEquals(this.playlistType, other.playlistType) && + java.util.Objects.deepEquals(this.composite, other.composite) && + java.util.Objects.deepEquals(this.icon, other.icon) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + content, + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + composite, + icon, + duration, + leafCount, + addedAt, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistMetadata.class, + "content", content, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "type", type, + "title", title, + "summary", summary, + "smart", smart, + "playlistType", playlistType, + "composite", composite, + "icon", icon, + "duration", duration, + "leafCount", leafCount, + "addedAt", addedAt, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private Optional content = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional icon = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder content(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public Builder playlistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Builder icon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public Builder icon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetPlaylistMetadata build() { + return new GetPlaylistMetadata( + content, + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + composite, + icon, + duration, + leafCount, + addedAt, + updatedAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistPlaylistsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistPlaylistsResponseBody.java new file mode 100644 index 00000000..e0c23df2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistPlaylistsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPlaylistPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetPlaylistPlaylistsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetPlaylistPlaylistsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistPlaylistsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetPlaylistPlaylistsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistPlaylistsResponseBody other = (GetPlaylistPlaylistsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistPlaylistsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetPlaylistPlaylistsResponseBody build() { + return new GetPlaylistPlaylistsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequest.java new file mode 100644 index 00000000..7b746f07 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistRequest { + + /** + * the ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") + private double playlistID; + + public GetPlaylistRequest( + double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + } + + /** + * the ID of the playlist + */ + public double playlistID() { + return playlistID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the ID of the playlist + */ + public GetPlaylistRequest withPlaylistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistRequest other = (GetPlaylistRequest) o; + return + java.util.Objects.deepEquals(this.playlistID, other.playlistID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + playlistID); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistRequest.class, + "playlistID", playlistID); + } + + public final static class Builder { + + private Double playlistID; + + private Builder() { + // force use of static builder() method + } + + /** + * the ID of the playlist + */ + public Builder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public GetPlaylistRequest build() { + return new GetPlaylistRequest( + playlistID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequestBuilder.java new file mode 100644 index 00000000..6a1bfd7b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetPlaylistRequestBuilder { + + private Double playlistID; + private final SDKMethodInterfaces.MethodCallGetPlaylist sdk; + + public GetPlaylistRequestBuilder(SDKMethodInterfaces.MethodCallGetPlaylist sdk) { + this.sdk = sdk; + } + + public GetPlaylistRequestBuilder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public GetPlaylistResponse call() throws Exception { + + return sdk.getPlaylist( + playlistID); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponse.java new file mode 100644 index 00000000..1efc71c4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The playlist + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetPlaylistResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The playlist + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetPlaylistResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The playlist + */ + public GetPlaylistResponse withTwoHundredApplicationJsonObject(GetPlaylistResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The playlist + */ + public GetPlaylistResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetPlaylistResponse withFourHundredAndOneApplicationJsonObject(GetPlaylistPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetPlaylistResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistResponse other = (GetPlaylistResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The playlist + */ + public Builder twoHundredApplicationJsonObject(GetPlaylistResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The playlist + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetPlaylistPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetPlaylistResponse build() { + return new GetPlaylistResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponseBody.java new file mode 100644 index 00000000..856db9db --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPlaylistResponseBody - The playlist + */ + +public class GetPlaylistResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetPlaylistResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistResponseBody withMediaContainer(GetPlaylistMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetPlaylistResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistResponseBody other = (GetPlaylistResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetPlaylistMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetPlaylistResponseBody build() { + return new GetPlaylistResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsErrors.java new file mode 100644 index 00000000..73814875 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetPlaylistsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetPlaylistsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetPlaylistsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetPlaylistsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetPlaylistsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetPlaylistsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistsErrors other = (GetPlaylistsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetPlaylistsErrors build() { + return new GetPlaylistsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMediaContainer.java new file mode 100644 index 00000000..3b9e18a8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetPlaylistsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetPlaylistsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetPlaylistsMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetPlaylistsMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistsMediaContainer other = (GetPlaylistsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsMediaContainer.class, + "size", size, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetPlaylistsMediaContainer build() { + return new GetPlaylistsMediaContainer( + size, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMetadata.java new file mode 100644 index 00000000..8d303f6b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsMetadata.java @@ -0,0 +1,718 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("smart") + private Optional smart; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistType") + private Optional playlistType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("icon") + private Optional icon; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + public GetPlaylistsMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("summary") Optional summary, + @JsonProperty("smart") Optional smart, + @JsonProperty("playlistType") Optional playlistType, + @JsonProperty("composite") Optional composite, + @JsonProperty("icon") Optional icon, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("duration") Optional duration, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(icon, "icon"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.type = type; + this.title = title; + this.summary = summary; + this.smart = smart; + this.playlistType = playlistType; + this.composite = composite; + this.icon = icon; + this.viewCount = viewCount; + this.lastViewedAt = lastViewedAt; + this.duration = duration; + this.leafCount = leafCount; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional summary() { + return summary; + } + + public Optional smart() { + return smart; + } + + public Optional playlistType() { + return playlistType; + } + + public Optional composite() { + return composite; + } + + public Optional icon() { + return icon; + } + + public Optional viewCount() { + return viewCount; + } + + public Optional lastViewedAt() { + return lastViewedAt; + } + + public Optional duration() { + return duration; + } + + public Optional leafCount() { + return leafCount; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetPlaylistsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetPlaylistsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetPlaylistsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetPlaylistsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetPlaylistsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetPlaylistsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetPlaylistsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetPlaylistsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetPlaylistsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetPlaylistsMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetPlaylistsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetPlaylistsMetadata withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public GetPlaylistsMetadata withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public GetPlaylistsMetadata withPlaylistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public GetPlaylistsMetadata withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public GetPlaylistsMetadata withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public GetPlaylistsMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public GetPlaylistsMetadata withIcon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public GetPlaylistsMetadata withIcon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public GetPlaylistsMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public GetPlaylistsMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public GetPlaylistsMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public GetPlaylistsMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public GetPlaylistsMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetPlaylistsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetPlaylistsMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetPlaylistsMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetPlaylistsMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetPlaylistsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetPlaylistsMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetPlaylistsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistsMetadata other = (GetPlaylistsMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.smart, other.smart) && + java.util.Objects.deepEquals(this.playlistType, other.playlistType) && + java.util.Objects.deepEquals(this.composite, other.composite) && + java.util.Objects.deepEquals(this.icon, other.icon) && + java.util.Objects.deepEquals(this.viewCount, other.viewCount) && + java.util.Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.leafCount, other.leafCount) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + composite, + icon, + viewCount, + lastViewedAt, + duration, + leafCount, + addedAt, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsMetadata.class, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "type", type, + "title", title, + "summary", summary, + "smart", smart, + "playlistType", playlistType, + "composite", composite, + "icon", icon, + "viewCount", viewCount, + "lastViewedAt", lastViewedAt, + "duration", duration, + "leafCount", leafCount, + "addedAt", addedAt, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional icon = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public Builder playlistType(String playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Builder icon(String icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = Optional.ofNullable(icon); + return this; + } + + public Builder icon(Optional icon) { + Utils.checkNotNull(icon, "icon"); + this.icon = icon; + return this; + } + + public Builder viewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public Builder lastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder leafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetPlaylistsMetadata build() { + return new GetPlaylistsMetadata( + ratingKey, + key, + guid, + type, + title, + summary, + smart, + playlistType, + composite, + icon, + viewCount, + lastViewedAt, + duration, + leafCount, + addedAt, + updatedAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsPlaylistsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsPlaylistsResponseBody.java new file mode 100644 index 00000000..5a8a55c6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsPlaylistsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPlaylistsPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetPlaylistsPlaylistsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetPlaylistsPlaylistsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistsPlaylistsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetPlaylistsPlaylistsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistsPlaylistsResponseBody other = (GetPlaylistsPlaylistsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsPlaylistsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetPlaylistsPlaylistsResponseBody build() { + return new GetPlaylistsPlaylistsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequest.java new file mode 100644 index 00000000..97fe44bd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequest.java @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistsRequest { + + /** + * limit to a type of playlist. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playlistType") + private Optional playlistType; + + /** + * type of playlists to return (default is all). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=smart") + private Optional smart; + + public GetPlaylistsRequest( + Optional playlistType, + Optional smart) { + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(smart, "smart"); + this.playlistType = playlistType; + this.smart = smart; + } + + /** + * limit to a type of playlist. + */ + public Optional playlistType() { + return playlistType; + } + + /** + * type of playlists to return (default is all). + */ + public Optional smart() { + return smart; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * limit to a type of playlist. + */ + public GetPlaylistsRequest withPlaylistType(PlaylistType playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + /** + * limit to a type of playlist. + */ + public GetPlaylistsRequest withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + /** + * type of playlists to return (default is all). + */ + public GetPlaylistsRequest withSmart(QueryParamSmart smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + /** + * type of playlists to return (default is all). + */ + public GetPlaylistsRequest withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistsRequest other = (GetPlaylistsRequest) o; + return + java.util.Objects.deepEquals(this.playlistType, other.playlistType) && + java.util.Objects.deepEquals(this.smart, other.smart); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + playlistType, + smart); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsRequest.class, + "playlistType", playlistType, + "smart", smart); + } + + public final static class Builder { + + private Optional playlistType = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * limit to a type of playlist. + */ + public Builder playlistType(PlaylistType playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + /** + * limit to a type of playlist. + */ + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + /** + * type of playlists to return (default is all). + */ + public Builder smart(QueryParamSmart smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + /** + * type of playlists to return (default is all). + */ + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public GetPlaylistsRequest build() { + return new GetPlaylistsRequest( + playlistType, + smart); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequestBuilder.java new file mode 100644 index 00000000..f7b79b60 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetPlaylistsRequestBuilder { + + private Optional playlistType = Optional.empty(); + private Optional smart = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetPlaylists sdk; + + public GetPlaylistsRequestBuilder(SDKMethodInterfaces.MethodCallGetPlaylists sdk) { + this.sdk = sdk; + } + + public GetPlaylistsRequestBuilder playlistType(PlaylistType playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.of(playlistType); + return this; + } + + public GetPlaylistsRequestBuilder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + public GetPlaylistsRequestBuilder smart(QueryParamSmart smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.of(smart); + return this; + } + + public GetPlaylistsRequestBuilder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public GetPlaylistsResponse call() throws Exception { + + return sdk.getPlaylists( + playlistType, + smart); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponse.java new file mode 100644 index 00000000..931cb31a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetPlaylistsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * returns all playlists + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetPlaylistsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * returns all playlists + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetPlaylistsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * returns all playlists + */ + public GetPlaylistsResponse withTwoHundredApplicationJsonObject(GetPlaylistsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * returns all playlists + */ + public GetPlaylistsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetPlaylistsResponse withFourHundredAndOneApplicationJsonObject(GetPlaylistsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetPlaylistsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistsResponse other = (GetPlaylistsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * returns all playlists + */ + public Builder twoHundredApplicationJsonObject(GetPlaylistsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * returns all playlists + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetPlaylistsPlaylistsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetPlaylistsResponse build() { + return new GetPlaylistsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponseBody.java new file mode 100644 index 00000000..0d0cd6b6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetPlaylistsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetPlaylistsResponseBody - returns all playlists + */ + +public class GetPlaylistsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetPlaylistsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPlaylistsResponseBody withMediaContainer(GetPlaylistsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetPlaylistsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistsResponseBody other = (GetPlaylistsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetPlaylistsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetPlaylistsResponseBody build() { + return new GetPlaylistsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedErrors.java new file mode 100644 index 00000000..1b9b4d6b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetRecentlyAddedErrors { + + @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; + + public GetRecentlyAddedErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetRecentlyAddedErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetRecentlyAddedErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetRecentlyAddedErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetRecentlyAddedErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetRecentlyAddedErrors 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; + } + GetRecentlyAddedErrors other = (GetRecentlyAddedErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedErrors.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(double 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(double 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 GetRecentlyAddedErrors build() { + return new GetRecentlyAddedErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedLibraryResponseBody.java new file mode 100644 index 00000000..c3ceb3bf --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetRecentlyAddedLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetRecentlyAddedLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetRecentlyAddedLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetRecentlyAddedLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryResponseBody other = (GetRecentlyAddedLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetRecentlyAddedLibraryResponseBody build() { + return new GetRecentlyAddedLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedMediaContainer.java new file mode 100644 index 00000000..6492a37b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedMediaContainer.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetRecentlyAddedMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mixedParents") + private Optional mixedParents; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetRecentlyAddedMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("mixedParents") Optional mixedParents, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(mixedParents, "mixedParents"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.allowSync = allowSync; + this.identifier = identifier; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.mixedParents = mixedParents; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional identifier() { + return identifier; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional mixedParents() { + return mixedParents; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetRecentlyAddedMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetRecentlyAddedMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetRecentlyAddedMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetRecentlyAddedMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetRecentlyAddedMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetRecentlyAddedMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetRecentlyAddedMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetRecentlyAddedMediaContainer withMediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetRecentlyAddedMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetRecentlyAddedMediaContainer withMixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public GetRecentlyAddedMediaContainer withMixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + public GetRecentlyAddedMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetRecentlyAddedMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedMediaContainer other = (GetRecentlyAddedMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.mixedParents, other.mixedParents) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + identifier, + mediaTagPrefix, + mediaTagVersion, + mixedParents, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedMediaContainer.class, + "size", size, + "allowSync", allowSync, + "identifier", identifier, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "mixedParents", mixedParents, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional mixedParents = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder mixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public Builder mixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetRecentlyAddedMediaContainer build() { + return new GetRecentlyAddedMediaContainer( + size, + allowSync, + identifier, + mediaTagPrefix, + mediaTagVersion, + mixedParents, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedRequestBuilder.java new file mode 100644 index 00000000..818f36c0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetRecentlyAddedRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetRecentlyAdded sdk; + + public GetRecentlyAddedRequestBuilder(SDKMethodInterfaces.MethodCallGetRecentlyAdded sdk) { + this.sdk = sdk; + } + + public GetRecentlyAddedResponse call() throws Exception { + + return sdk.getRecentlyAddedDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponse.java new file mode 100644 index 00000000..af98bc8b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetRecentlyAddedResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The recently added content + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetRecentlyAddedResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The recently added content + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetRecentlyAddedResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRecentlyAddedResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRecentlyAddedResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The recently added content + */ + public GetRecentlyAddedResponse withTwoHundredApplicationJsonObject(GetRecentlyAddedResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The recently added content + */ + public GetRecentlyAddedResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetRecentlyAddedResponse withFourHundredAndOneApplicationJsonObject(GetRecentlyAddedLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetRecentlyAddedResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedResponse other = (GetRecentlyAddedResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The recently added content + */ + public Builder twoHundredApplicationJsonObject(GetRecentlyAddedResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The recently added content + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetRecentlyAddedLibraryResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetRecentlyAddedResponse build() { + return new GetRecentlyAddedResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponseBody.java new file mode 100644 index 00000000..38878077 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetRecentlyAddedResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetRecentlyAddedResponseBody - The recently added content + */ + +public class GetRecentlyAddedResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetRecentlyAddedResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedResponseBody withMediaContainer(GetRecentlyAddedMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetRecentlyAddedResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedResponseBody other = (GetRecentlyAddedResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetRecentlyAddedMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetRecentlyAddedResponseBody build() { + return new GetRecentlyAddedResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoErrors.java new file mode 100644 index 00000000..e8e749c9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetResizedPhotoErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetResizedPhotoErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetResizedPhotoErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetResizedPhotoErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetResizedPhotoErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetResizedPhotoErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetResizedPhotoErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetResizedPhotoErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResizedPhotoErrors other = (GetResizedPhotoErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetResizedPhotoErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetResizedPhotoErrors build() { + return new GetResizedPhotoErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequest.java new file mode 100644 index 00000000..ce7b6665 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequest.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetResizedPhotoRequest { + + /** + * The width for the resized photo + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width") + private double width; + + /** + * The height for the resized photo + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height") + private double height; + + /** + * The opacity for the resized photo + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=opacity") + private long opacity; + + /** + * The width for the resized photo + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=blur") + private double blur; + + /** + * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize") + private MinSize minSize; + + /** + * allow images to be resized beyond native dimensions. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale") + private Upscale upscale; + + /** + * path to image within Plex + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private String url; + + public GetResizedPhotoRequest( + double width, + double height, + long opacity, + double blur, + MinSize minSize, + Upscale upscale, + String url) { + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(opacity, "opacity"); + Utils.checkNotNull(blur, "blur"); + Utils.checkNotNull(minSize, "minSize"); + Utils.checkNotNull(upscale, "upscale"); + Utils.checkNotNull(url, "url"); + this.width = width; + this.height = height; + this.opacity = opacity; + this.blur = blur; + this.minSize = minSize; + this.upscale = upscale; + this.url = url; + } + + /** + * The width for the resized photo + */ + public double width() { + return width; + } + + /** + * The height for the resized photo + */ + public double height() { + return height; + } + + /** + * The opacity for the resized photo + */ + public long opacity() { + return opacity; + } + + /** + * The width for the resized photo + */ + public double blur() { + return blur; + } + + /** + * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ + public MinSize minSize() { + return minSize; + } + + /** + * allow images to be resized beyond native dimensions. + */ + public Upscale upscale() { + return upscale; + } + + /** + * path to image within Plex + */ + public String url() { + return url; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The width for the resized photo + */ + public GetResizedPhotoRequest withWidth(double width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + /** + * The height for the resized photo + */ + public GetResizedPhotoRequest withHeight(double height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + /** + * The opacity for the resized photo + */ + public GetResizedPhotoRequest withOpacity(long opacity) { + Utils.checkNotNull(opacity, "opacity"); + this.opacity = opacity; + return this; + } + + /** + * The width for the resized photo + */ + public GetResizedPhotoRequest withBlur(double blur) { + Utils.checkNotNull(blur, "blur"); + this.blur = blur; + return this; + } + + /** + * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ + public GetResizedPhotoRequest withMinSize(MinSize minSize) { + Utils.checkNotNull(minSize, "minSize"); + this.minSize = minSize; + return this; + } + + /** + * allow images to be resized beyond native dimensions. + */ + public GetResizedPhotoRequest withUpscale(Upscale upscale) { + Utils.checkNotNull(upscale, "upscale"); + this.upscale = upscale; + return this; + } + + /** + * path to image within Plex + */ + public GetResizedPhotoRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResizedPhotoRequest other = (GetResizedPhotoRequest) o; + return + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.opacity, other.opacity) && + java.util.Objects.deepEquals(this.blur, other.blur) && + java.util.Objects.deepEquals(this.minSize, other.minSize) && + java.util.Objects.deepEquals(this.upscale, other.upscale) && + java.util.Objects.deepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + width, + height, + opacity, + blur, + minSize, + upscale, + url); + } + + @Override + public String toString() { + return Utils.toString(GetResizedPhotoRequest.class, + "width", width, + "height", height, + "opacity", opacity, + "blur", blur, + "minSize", minSize, + "upscale", upscale, + "url", url); + } + + public final static class Builder { + + private Double width; + + private Double height; + + private Long opacity; + + private Double blur; + + private MinSize minSize; + + private Upscale upscale; + + private String url; + + private Builder() { + // force use of static builder() method + } + + /** + * The width for the resized photo + */ + public Builder width(double width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + /** + * The height for the resized photo + */ + public Builder height(double height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + /** + * The opacity for the resized photo + */ + public Builder opacity(long opacity) { + Utils.checkNotNull(opacity, "opacity"); + this.opacity = opacity; + return this; + } + + /** + * The width for the resized photo + */ + public Builder blur(double blur) { + Utils.checkNotNull(blur, "blur"); + this.blur = blur; + return this; + } + + /** + * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ + public Builder minSize(MinSize minSize) { + Utils.checkNotNull(minSize, "minSize"); + this.minSize = minSize; + return this; + } + + /** + * allow images to be resized beyond native dimensions. + */ + public Builder upscale(Upscale upscale) { + Utils.checkNotNull(upscale, "upscale"); + this.upscale = upscale; + return this; + } + + /** + * path to image within Plex + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public GetResizedPhotoRequest build() { + if (opacity == null) { + opacity = _SINGLETON_VALUE_Opacity.value(); + } + return new GetResizedPhotoRequest( + width, + height, + opacity, + blur, + minSize, + upscale, + url); + } + + private static final LazySingletonValue _SINGLETON_VALUE_Opacity = + new LazySingletonValue<>( + "opacity", + "100", + new TypeReference() {}); + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequestBuilder.java new file mode 100644 index 00000000..3aa02066 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetResizedPhotoRequestBuilder { + + private GetResizedPhotoRequest request; + private final SDKMethodInterfaces.MethodCallGetResizedPhoto sdk; + + public GetResizedPhotoRequestBuilder(SDKMethodInterfaces.MethodCallGetResizedPhoto sdk) { + this.sdk = sdk; + } + + public GetResizedPhotoRequestBuilder request(GetResizedPhotoRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetResizedPhotoResponse call() throws Exception { + + return sdk.getResizedPhoto( + request); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponse.java new file mode 100644 index 00000000..67bca734 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetResizedPhotoResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public GetResizedPhotoResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetResizedPhotoResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetResizedPhotoResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetResizedPhotoResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetResizedPhotoResponse withObject(GetResizedPhotoResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetResizedPhotoResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResizedPhotoResponse other = (GetResizedPhotoResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetResizedPhotoResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(GetResizedPhotoResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetResizedPhotoResponse build() { + return new GetResizedPhotoResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponseBody.java new file mode 100644 index 00000000..fa6fbdc8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetResizedPhotoResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetResizedPhotoResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetResizedPhotoResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetResizedPhotoResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetResizedPhotoResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetResizedPhotoResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResizedPhotoResponseBody other = (GetResizedPhotoResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetResizedPhotoResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetResizedPhotoResponseBody build() { + return new GetResizedPhotoResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsCountry.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsCountry.java new file mode 100644 index 00000000..f3af53dd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsCountry.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsCountry { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetSearchResultsCountry( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsCountry withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetSearchResultsCountry withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsCountry other = (GetSearchResultsCountry) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsCountry.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetSearchResultsCountry build() { + return new GetSearchResultsCountry( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsDirector.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsDirector.java new file mode 100644 index 00000000..446f5f07 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsDirector.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsDirector { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetSearchResultsDirector( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsDirector withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetSearchResultsDirector withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsDirector other = (GetSearchResultsDirector) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsDirector.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetSearchResultsDirector build() { + return new GetSearchResultsDirector( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsErrors.java new file mode 100644 index 00000000..20427d9e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetSearchResultsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetSearchResultsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetSearchResultsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetSearchResultsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetSearchResultsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetSearchResultsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsErrors other = (GetSearchResultsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetSearchResultsErrors build() { + return new GetSearchResultsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsGenre.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsGenre.java new file mode 100644 index 00000000..de7878d7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsGenre.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsGenre { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetSearchResultsGenre( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsGenre withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetSearchResultsGenre withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsGenre other = (GetSearchResultsGenre) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsGenre.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetSearchResultsGenre build() { + return new GetSearchResultsGenre( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMedia.java new file mode 100644 index 00000000..0e5fc295 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMedia.java @@ -0,0 +1,677 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public GetSearchResultsMedia( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.audioProfile = audioProfile; + this.videoProfile = videoProfile; + this.part = part; + } + + public Optional id() { + return id; + } + + public Optional duration() { + return duration; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional width() { + return width; + } + + public Optional height() { + return height; + } + + public Optional aspectRatio() { + return aspectRatio; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional videoResolution() { + return videoResolution; + } + + public Optional container() { + return container; + } + + public Optional videoFrameRate() { + return videoFrameRate; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsMedia withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetSearchResultsMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetSearchResultsMedia withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetSearchResultsMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetSearchResultsMedia withBitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetSearchResultsMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetSearchResultsMedia withWidth(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetSearchResultsMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetSearchResultsMedia withHeight(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetSearchResultsMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetSearchResultsMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public GetSearchResultsMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public GetSearchResultsMedia withAudioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetSearchResultsMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetSearchResultsMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetSearchResultsMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetSearchResultsMedia withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public GetSearchResultsMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public GetSearchResultsMedia withVideoResolution(double videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public GetSearchResultsMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public GetSearchResultsMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetSearchResultsMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetSearchResultsMedia withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public GetSearchResultsMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public GetSearchResultsMedia withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetSearchResultsMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetSearchResultsMedia withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetSearchResultsMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetSearchResultsMedia withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetSearchResultsMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsMedia other = (GetSearchResultsMedia) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.videoResolution, other.videoResolution) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + audioProfile, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsMedia.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "audioProfile", audioProfile, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder bitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(double videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public GetSearchResultsMedia build() { + return new GetSearchResultsMedia( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + audioProfile, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMediaContainer.java new file mode 100644 index 00000000..374a86e2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMediaContainer.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Provider") + private Optional> provider; + + public GetSearchResultsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("Metadata") Optional> metadata, + @JsonProperty("Provider") Optional> provider) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(provider, "provider"); + this.size = size; + this.identifier = identifier; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.metadata = metadata; + this.provider = provider; + } + + public Optional size() { + return size; + } + + public Optional identifier() { + return identifier; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional> metadata() { + return metadata; + } + + public Optional> provider() { + return provider; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetSearchResultsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetSearchResultsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetSearchResultsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetSearchResultsMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetSearchResultsMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetSearchResultsMediaContainer withMediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetSearchResultsMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetSearchResultsMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetSearchResultsMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetSearchResultsMediaContainer withProvider(java.util.List provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + public GetSearchResultsMediaContainer withProvider(Optional> provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsMediaContainer other = (GetSearchResultsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.metadata, other.metadata) && + java.util.Objects.deepEquals(this.provider, other.provider); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + identifier, + mediaTagPrefix, + mediaTagVersion, + metadata, + provider); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsMediaContainer.class, + "size", size, + "identifier", identifier, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "metadata", metadata, + "provider", provider); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional> provider = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public Builder provider(java.util.List provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + public Builder provider(Optional> provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + public GetSearchResultsMediaContainer build() { + return new GetSearchResultsMediaContainer( + size, + identifier, + mediaTagPrefix, + mediaTagVersion, + metadata, + provider); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMetadata.java new file mode 100644 index 00000000..ae488473 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsMetadata.java @@ -0,0 +1,1459 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("personal") + private Optional personal; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceTitle") + private Optional sourceTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + public GetSearchResultsMetadata( + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("personal") Optional personal, + @JsonProperty("sourceTitle") Optional sourceTitle, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("studio") Optional studio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("rating") Optional rating, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("year") Optional year, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("Media") Optional> media, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("Director") Optional> director, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("Country") Optional> country, + @JsonProperty("Role") Optional> role) { + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(personal, "personal"); + Utils.checkNotNull(sourceTitle, "sourceTitle"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(role, "role"); + this.allowSync = allowSync; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.personal = personal; + this.sourceTitle = sourceTitle; + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.studio = studio; + this.type = type; + this.title = title; + this.contentRating = contentRating; + this.summary = summary; + this.rating = rating; + this.audienceRating = audienceRating; + this.year = year; + this.tagline = tagline; + this.thumb = thumb; + this.art = art; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.audienceRatingImage = audienceRatingImage; + this.chapterSource = chapterSource; + this.primaryExtraKey = primaryExtraKey; + this.ratingImage = ratingImage; + this.media = media; + this.genre = genre; + this.director = director; + this.writer = writer; + this.country = country; + this.role = role; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + public Optional personal() { + return personal; + } + + public Optional sourceTitle() { + return sourceTitle; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional studio() { + return studio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional contentRating() { + return contentRating; + } + + public Optional summary() { + return summary; + } + + public Optional rating() { + return rating; + } + + public Optional audienceRating() { + return audienceRating; + } + + public Optional year() { + return year; + } + + public Optional tagline() { + return tagline; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional duration() { + return duration; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional audienceRatingImage() { + return audienceRatingImage; + } + + public Optional chapterSource() { + return chapterSource; + } + + public Optional primaryExtraKey() { + return primaryExtraKey; + } + + public Optional ratingImage() { + return ratingImage; + } + + public Optional> media() { + return media; + } + + public Optional> genre() { + return genre; + } + + public Optional> director() { + return director; + } + + public Optional> writer() { + return writer; + } + + public Optional> country() { + return country; + } + + public Optional> role() { + return role; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsMetadata withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetSearchResultsMetadata withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetSearchResultsMetadata withLibrarySectionID(double librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetSearchResultsMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetSearchResultsMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetSearchResultsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetSearchResultsMetadata withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public GetSearchResultsMetadata withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public GetSearchResultsMetadata withPersonal(boolean personal) { + Utils.checkNotNull(personal, "personal"); + this.personal = Optional.ofNullable(personal); + return this; + } + + public GetSearchResultsMetadata withPersonal(Optional personal) { + Utils.checkNotNull(personal, "personal"); + this.personal = personal; + return this; + } + + public GetSearchResultsMetadata withSourceTitle(String sourceTitle) { + Utils.checkNotNull(sourceTitle, "sourceTitle"); + this.sourceTitle = Optional.ofNullable(sourceTitle); + return this; + } + + public GetSearchResultsMetadata withSourceTitle(Optional sourceTitle) { + Utils.checkNotNull(sourceTitle, "sourceTitle"); + this.sourceTitle = sourceTitle; + return this; + } + + public GetSearchResultsMetadata withRatingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetSearchResultsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetSearchResultsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetSearchResultsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetSearchResultsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetSearchResultsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetSearchResultsMetadata withStudio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public GetSearchResultsMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public GetSearchResultsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetSearchResultsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetSearchResultsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetSearchResultsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetSearchResultsMetadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public GetSearchResultsMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetSearchResultsMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetSearchResultsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetSearchResultsMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public GetSearchResultsMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public GetSearchResultsMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public GetSearchResultsMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public GetSearchResultsMetadata withYear(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public GetSearchResultsMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public GetSearchResultsMetadata withTagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public GetSearchResultsMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public GetSearchResultsMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetSearchResultsMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetSearchResultsMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetSearchResultsMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetSearchResultsMetadata withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetSearchResultsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetSearchResultsMetadata withOriginallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetSearchResultsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetSearchResultsMetadata withAddedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetSearchResultsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetSearchResultsMetadata withUpdatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetSearchResultsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetSearchResultsMetadata withAudienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public GetSearchResultsMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public GetSearchResultsMetadata withChapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public GetSearchResultsMetadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public GetSearchResultsMetadata withPrimaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public GetSearchResultsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public GetSearchResultsMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public GetSearchResultsMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public GetSearchResultsMetadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetSearchResultsMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetSearchResultsMetadata withGenre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public GetSearchResultsMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public GetSearchResultsMetadata withDirector(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public GetSearchResultsMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public GetSearchResultsMetadata withWriter(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public GetSearchResultsMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public GetSearchResultsMetadata withCountry(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public GetSearchResultsMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public GetSearchResultsMetadata withRole(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public GetSearchResultsMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsMetadata other = (GetSearchResultsMetadata) o; + return + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + java.util.Objects.deepEquals(this.personal, other.personal) && + java.util.Objects.deepEquals(this.sourceTitle, other.sourceTitle) && + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.studio, other.studio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.contentRating, other.contentRating) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.rating, other.rating) && + java.util.Objects.deepEquals(this.audienceRating, other.audienceRating) && + java.util.Objects.deepEquals(this.year, other.year) && + java.util.Objects.deepEquals(this.tagline, other.tagline) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && + java.util.Objects.deepEquals(this.chapterSource, other.chapterSource) && + java.util.Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && + java.util.Objects.deepEquals(this.ratingImage, other.ratingImage) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.genre, other.genre) && + java.util.Objects.deepEquals(this.director, other.director) && + java.util.Objects.deepEquals(this.writer, other.writer) && + java.util.Objects.deepEquals(this.country, other.country) && + java.util.Objects.deepEquals(this.role, other.role); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + personal, + sourceTitle, + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + media, + genre, + director, + writer, + country, + role); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsMetadata.class, + "allowSync", allowSync, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "personal", personal, + "sourceTitle", sourceTitle, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "studio", studio, + "type", type, + "title", title, + "contentRating", contentRating, + "summary", summary, + "rating", rating, + "audienceRating", audienceRating, + "year", year, + "tagline", tagline, + "thumb", thumb, + "art", art, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "audienceRatingImage", audienceRatingImage, + "chapterSource", chapterSource, + "primaryExtraKey", primaryExtraKey, + "ratingImage", ratingImage, + "media", media, + "genre", genre, + "director", director, + "writer", writer, + "country", country, + "role", role); + } + + public final static class Builder { + + private Optional allowSync = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional personal = Optional.empty(); + + private Optional sourceTitle = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder librarySectionID(double librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder personal(boolean personal) { + Utils.checkNotNull(personal, "personal"); + this.personal = Optional.ofNullable(personal); + return this; + } + + public Builder personal(Optional personal) { + Utils.checkNotNull(personal, "personal"); + this.personal = personal; + return this; + } + + public Builder sourceTitle(String sourceTitle) { + Utils.checkNotNull(sourceTitle, "sourceTitle"); + this.sourceTitle = Optional.ofNullable(sourceTitle); + return this; + } + + public Builder sourceTitle(Optional sourceTitle) { + Utils.checkNotNull(sourceTitle, "sourceTitle"); + this.sourceTitle = sourceTitle; + return this; + } + + public Builder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder studio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public Builder year(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder tagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder originallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder audienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Builder chapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public Builder primaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder genre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Builder genre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Builder director(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Builder writer(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Builder writer(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Builder country(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder role(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public GetSearchResultsMetadata build() { + return new GetSearchResultsMetadata( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + personal, + sourceTitle, + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + media, + genre, + director, + writer, + country, + role); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsPart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsPart.java new file mode 100644 index 00000000..4a956fdd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsPart.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + public GetSearchResultsPart( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("container") Optional container, + @JsonProperty("videoProfile") Optional videoProfile) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoProfile, "videoProfile"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.audioProfile = audioProfile; + this.container = container; + this.videoProfile = videoProfile; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional size() { + return size; + } + + public Optional audioProfile() { + return audioProfile; + } + + public Optional container() { + return container; + } + + public Optional videoProfile() { + return videoProfile; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsPart withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetSearchResultsPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetSearchResultsPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetSearchResultsPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetSearchResultsPart withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetSearchResultsPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetSearchResultsPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetSearchResultsPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetSearchResultsPart withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetSearchResultsPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetSearchResultsPart withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public GetSearchResultsPart withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public GetSearchResultsPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetSearchResultsPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetSearchResultsPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetSearchResultsPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsPart other = (GetSearchResultsPart) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.audioProfile, other.audioProfile) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + duration, + file, + size, + audioProfile, + container, + videoProfile); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsPart.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "audioProfile", audioProfile, + "container", container, + "videoProfile", videoProfile); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetSearchResultsPart build() { + return new GetSearchResultsPart( + id, + key, + duration, + file, + size, + audioProfile, + container, + videoProfile); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequest.java new file mode 100644 index 00000000..0e7c6cd2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsRequest { + + /** + * The search query string to use + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private String query; + + public GetSearchResultsRequest( + String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + } + + /** + * The search query string to use + */ + public String query() { + return query; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The search query string to use + */ + public GetSearchResultsRequest withQuery(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsRequest other = (GetSearchResultsRequest) o; + return + java.util.Objects.deepEquals(this.query, other.query); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + query); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsRequest.class, + "query", query); + } + + public final static class Builder { + + private String query; + + private Builder() { + // force use of static builder() method + } + + /** + * The search query string to use + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + public GetSearchResultsRequest build() { + return new GetSearchResultsRequest( + query); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequestBuilder.java new file mode 100644 index 00000000..38d90152 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetSearchResultsRequestBuilder { + + private String query; + private final SDKMethodInterfaces.MethodCallGetSearchResults sdk; + + public GetSearchResultsRequestBuilder(SDKMethodInterfaces.MethodCallGetSearchResults sdk) { + this.sdk = sdk; + } + + public GetSearchResultsRequestBuilder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + public GetSearchResultsResponse call() throws Exception { + + return sdk.getSearchResults( + query); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponse.java new file mode 100644 index 00000000..379f5e4c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Search Results + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetSearchResultsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Search Results + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSearchResultsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSearchResultsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSearchResultsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Search Results + */ + public GetSearchResultsResponse withTwoHundredApplicationJsonObject(GetSearchResultsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Search Results + */ + public GetSearchResultsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSearchResultsResponse withFourHundredAndOneApplicationJsonObject(GetSearchResultsSearchResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSearchResultsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsResponse other = (GetSearchResultsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Search Results + */ + public Builder twoHundredApplicationJsonObject(GetSearchResultsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Search Results + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetSearchResultsSearchResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetSearchResultsResponse build() { + return new GetSearchResultsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponseBody.java new file mode 100644 index 00000000..2b23237c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetSearchResultsResponseBody - Search Results + */ + +public class GetSearchResultsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetSearchResultsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsResponseBody withMediaContainer(GetSearchResultsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetSearchResultsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsResponseBody other = (GetSearchResultsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetSearchResultsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetSearchResultsResponseBody build() { + return new GetSearchResultsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRole.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRole.java new file mode 100644 index 00000000..e91b23da --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsRole.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsRole { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetSearchResultsRole( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsRole withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetSearchResultsRole withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsRole other = (GetSearchResultsRole) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsRole.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetSearchResultsRole build() { + return new GetSearchResultsRole( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsSearchResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsSearchResponseBody.java new file mode 100644 index 00000000..3529c1e8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsSearchResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetSearchResultsSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetSearchResultsSearchResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetSearchResultsSearchResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsSearchResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetSearchResultsSearchResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsSearchResponseBody other = (GetSearchResultsSearchResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsSearchResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetSearchResultsSearchResponseBody build() { + return new GetSearchResultsSearchResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsWriter.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsWriter.java new file mode 100644 index 00000000..7d6860a1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSearchResultsWriter.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSearchResultsWriter { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public GetSearchResultsWriter( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSearchResultsWriter withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetSearchResultsWriter withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSearchResultsWriter other = (GetSearchResultsWriter) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetSearchResultsWriter.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public GetSearchResultsWriter build() { + return new GetSearchResultsWriter( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesActivitiesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesActivitiesResponseBody.java new file mode 100644 index 00000000..4429b3a9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesActivitiesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerActivitiesActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetServerActivitiesActivitiesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetServerActivitiesActivitiesResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerActivitiesActivitiesResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetServerActivitiesActivitiesResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerActivitiesActivitiesResponseBody other = (GetServerActivitiesActivitiesResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetServerActivitiesActivitiesResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetServerActivitiesActivitiesResponseBody build() { + return new GetServerActivitiesActivitiesResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesErrors.java new file mode 100644 index 00000000..a5976201 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerActivitiesErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetServerActivitiesErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerActivitiesErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetServerActivitiesErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetServerActivitiesErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetServerActivitiesErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetServerActivitiesErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetServerActivitiesErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerActivitiesErrors other = (GetServerActivitiesErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerActivitiesErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetServerActivitiesErrors build() { + return new GetServerActivitiesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesMediaContainer.java new file mode 100644 index 00000000..778ba48e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerActivitiesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Activity") + private Optional> activity; + + public GetServerActivitiesMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Activity") Optional> activity) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(activity, "activity"); + this.size = size; + this.activity = activity; + } + + public Optional size() { + return size; + } + + public Optional> activity() { + return activity; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerActivitiesMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetServerActivitiesMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetServerActivitiesMediaContainer withActivity(java.util.List activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = Optional.ofNullable(activity); + return this; + } + + public GetServerActivitiesMediaContainer withActivity(Optional> activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = activity; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerActivitiesMediaContainer other = (GetServerActivitiesMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.activity, other.activity); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + activity); + } + + @Override + public String toString() { + return Utils.toString(GetServerActivitiesMediaContainer.class, + "size", size, + "activity", activity); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> activity = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder activity(java.util.List activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = Optional.ofNullable(activity); + return this; + } + + public Builder activity(Optional> activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = activity; + return this; + } + + public GetServerActivitiesMediaContainer build() { + return new GetServerActivitiesMediaContainer( + size, + activity); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesRequestBuilder.java new file mode 100644 index 00000000..20372231 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetServerActivitiesRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetServerActivities sdk; + + public GetServerActivitiesRequestBuilder(SDKMethodInterfaces.MethodCallGetServerActivities sdk) { + this.sdk = sdk; + } + + public GetServerActivitiesResponse call() throws Exception { + + return sdk.getServerActivitiesDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponse.java new file mode 100644 index 00000000..b2d13438 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerActivitiesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The Server Activities + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetServerActivitiesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The Server Activities + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetServerActivitiesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetServerActivitiesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetServerActivitiesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Activities + */ + public GetServerActivitiesResponse withTwoHundredApplicationJsonObject(GetServerActivitiesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Activities + */ + public GetServerActivitiesResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerActivitiesResponse withFourHundredAndOneApplicationJsonObject(GetServerActivitiesActivitiesResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerActivitiesResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerActivitiesResponse other = (GetServerActivitiesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetServerActivitiesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Activities + */ + public Builder twoHundredApplicationJsonObject(GetServerActivitiesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Activities + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetServerActivitiesActivitiesResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetServerActivitiesResponse build() { + return new GetServerActivitiesResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponseBody.java new file mode 100644 index 00000000..6130acd6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerActivitiesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerActivitiesResponseBody - The Server Activities + */ + +public class GetServerActivitiesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetServerActivitiesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerActivitiesResponseBody withMediaContainer(GetServerActivitiesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetServerActivitiesResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerActivitiesResponseBody other = (GetServerActivitiesResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetServerActivitiesResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetServerActivitiesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetServerActivitiesResponseBody build() { + return new GetServerActivitiesResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesRequestBuilder.java new file mode 100644 index 00000000..d28fe58a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetServerCapabilitiesRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetServerCapabilities sdk; + + public GetServerCapabilitiesRequestBuilder(SDKMethodInterfaces.MethodCallGetServerCapabilities sdk) { + this.sdk = sdk; + } + + public GetServerCapabilitiesResponse call() throws Exception { + + return sdk.getServerCapabilitiesDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponse.java new file mode 100644 index 00000000..6908d9be --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerCapabilitiesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The Server Capabilities + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetServerCapabilitiesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The Server Capabilities + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetServerCapabilitiesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetServerCapabilitiesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetServerCapabilitiesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Capabilities + */ + public GetServerCapabilitiesResponse withTwoHundredApplicationJsonObject(GetServerCapabilitiesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Capabilities + */ + public GetServerCapabilitiesResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerCapabilitiesResponse withFourHundredAndOneApplicationJsonObject(GetServerCapabilitiesServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerCapabilitiesResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerCapabilitiesResponse other = (GetServerCapabilitiesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetServerCapabilitiesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Capabilities + */ + public Builder twoHundredApplicationJsonObject(GetServerCapabilitiesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Capabilities + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetServerCapabilitiesServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetServerCapabilitiesResponse build() { + return new GetServerCapabilitiesResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponseBody.java new file mode 100644 index 00000000..bf78a33a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerCapabilitiesResponseBody - The Server Capabilities + */ + +public class GetServerCapabilitiesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetServerCapabilitiesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerCapabilitiesResponseBody withMediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetServerCapabilitiesResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerCapabilitiesResponseBody other = (GetServerCapabilitiesResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetServerCapabilitiesResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetServerCapabilitiesResponseBody build() { + return new GetServerCapabilitiesResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesServerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesServerResponseBody.java new file mode 100644 index 00000000..73c59fe5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerCapabilitiesServerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerCapabilitiesServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetServerCapabilitiesServerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetServerCapabilitiesServerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerCapabilitiesServerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetServerCapabilitiesServerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerCapabilitiesServerResponseBody other = (GetServerCapabilitiesServerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetServerCapabilitiesServerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetServerCapabilitiesServerResponseBody build() { + return new GetServerCapabilitiesServerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityErrors.java new file mode 100644 index 00000000..4791967d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerIdentityErrors { + + @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; + + public GetServerIdentityErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerIdentityErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetServerIdentityErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetServerIdentityErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetServerIdentityErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetServerIdentityErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetServerIdentityErrors 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; + } + GetServerIdentityErrors other = (GetServerIdentityErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerIdentityErrors.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(double 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(double 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 GetServerIdentityErrors build() { + return new GetServerIdentityErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityMediaContainer.java new file mode 100644 index 00000000..657faa9d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityMediaContainer.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerIdentityMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("claimed") + private Optional claimed; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + public GetServerIdentityMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("claimed") Optional claimed, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("version") Optional version) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(claimed, "claimed"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(version, "version"); + this.size = size; + this.claimed = claimed; + this.machineIdentifier = machineIdentifier; + this.version = version; + } + + public Optional size() { + return size; + } + + public Optional claimed() { + return claimed; + } + + public Optional machineIdentifier() { + return machineIdentifier; + } + + public Optional version() { + return version; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerIdentityMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetServerIdentityMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetServerIdentityMediaContainer withClaimed(boolean claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = Optional.ofNullable(claimed); + return this; + } + + public GetServerIdentityMediaContainer withClaimed(Optional claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = claimed; + return this; + } + + public GetServerIdentityMediaContainer withMachineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public GetServerIdentityMediaContainer withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public GetServerIdentityMediaContainer withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public GetServerIdentityMediaContainer withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerIdentityMediaContainer other = (GetServerIdentityMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.claimed, other.claimed) && + java.util.Objects.deepEquals(this.machineIdentifier, other.machineIdentifier) && + java.util.Objects.deepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + claimed, + machineIdentifier, + version); + } + + @Override + public String toString() { + return Utils.toString(GetServerIdentityMediaContainer.class, + "size", size, + "claimed", claimed, + "machineIdentifier", machineIdentifier, + "version", version); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional claimed = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional version = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder claimed(boolean claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = Optional.ofNullable(claimed); + return this; + } + + public Builder claimed(Optional claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = claimed; + return this; + } + + public Builder machineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public GetServerIdentityMediaContainer build() { + return new GetServerIdentityMediaContainer( + size, + claimed, + machineIdentifier, + version); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityRequestBuilder.java new file mode 100644 index 00000000..1ffaba1d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetServerIdentityRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetServerIdentity sdk; + + public GetServerIdentityRequestBuilder(SDKMethodInterfaces.MethodCallGetServerIdentity sdk) { + this.sdk = sdk; + } + + public GetServerIdentityResponse call() throws Exception { + + return sdk.getServerIdentityDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponse.java new file mode 100644 index 00000000..5519113f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerIdentityResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The Server Identity information + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetServerIdentityResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The Server Identity information + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetServerIdentityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetServerIdentityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetServerIdentityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Identity information + */ + public GetServerIdentityResponse withTwoHundredApplicationJsonObject(GetServerIdentityResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Identity information + */ + public GetServerIdentityResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerIdentityResponse withFourHundredAndOneApplicationJsonObject(GetServerIdentityServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerIdentityResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerIdentityResponse other = (GetServerIdentityResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetServerIdentityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Identity information + */ + public Builder twoHundredApplicationJsonObject(GetServerIdentityResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Identity information + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetServerIdentityServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetServerIdentityResponse build() { + return new GetServerIdentityResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponseBody.java new file mode 100644 index 00000000..23686ae3 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerIdentityResponseBody - The Server Identity information + */ + +public class GetServerIdentityResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetServerIdentityResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerIdentityResponseBody withMediaContainer(GetServerIdentityMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetServerIdentityResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerIdentityResponseBody other = (GetServerIdentityResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetServerIdentityResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetServerIdentityMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetServerIdentityResponseBody build() { + return new GetServerIdentityResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityServerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityServerResponseBody.java new file mode 100644 index 00000000..6242f69a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerIdentityServerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerIdentityServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetServerIdentityServerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetServerIdentityServerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerIdentityServerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetServerIdentityServerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerIdentityServerResponseBody other = (GetServerIdentityServerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetServerIdentityServerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetServerIdentityServerResponseBody build() { + return new GetServerIdentityServerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListErrors.java new file mode 100644 index 00000000..2049364b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerListErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetServerListErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerListErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetServerListErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetServerListErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetServerListErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetServerListErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetServerListErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerListErrors other = (GetServerListErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerListErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetServerListErrors build() { + return new GetServerListErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListMediaContainer.java new file mode 100644 index 00000000..cf0e2ef9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerListMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Server") + private Optional> server; + + public GetServerListMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Server") Optional> server) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(server, "server"); + this.size = size; + this.server = server; + } + + public Optional size() { + return size; + } + + public Optional> server() { + return server; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerListMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetServerListMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetServerListMediaContainer withServer(java.util.List server) { + Utils.checkNotNull(server, "server"); + this.server = Optional.ofNullable(server); + return this; + } + + public GetServerListMediaContainer withServer(Optional> server) { + Utils.checkNotNull(server, "server"); + this.server = server; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerListMediaContainer other = (GetServerListMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.server, other.server); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + server); + } + + @Override + public String toString() { + return Utils.toString(GetServerListMediaContainer.class, + "size", size, + "server", server); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> server = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder server(java.util.List server) { + Utils.checkNotNull(server, "server"); + this.server = Optional.ofNullable(server); + return this; + } + + public Builder server(Optional> server) { + Utils.checkNotNull(server, "server"); + this.server = server; + return this; + } + + public GetServerListMediaContainer build() { + return new GetServerListMediaContainer( + size, + server); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListRequestBuilder.java new file mode 100644 index 00000000..5868eeaa --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetServerListRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetServerList sdk; + + public GetServerListRequestBuilder(SDKMethodInterfaces.MethodCallGetServerList sdk) { + this.sdk = sdk; + } + + public GetServerListResponse call() throws Exception { + + return sdk.getServerListDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponse.java new file mode 100644 index 00000000..0a8c974a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerListResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * List of Servers + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetServerListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * List of Servers + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetServerListResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetServerListResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetServerListResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of Servers + */ + public GetServerListResponse withTwoHundredApplicationJsonObject(GetServerListResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * List of Servers + */ + public GetServerListResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerListResponse withFourHundredAndOneApplicationJsonObject(GetServerListServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerListResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerListResponse other = (GetServerListResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetServerListResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of Servers + */ + public Builder twoHundredApplicationJsonObject(GetServerListResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * List of Servers + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetServerListServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetServerListResponse build() { + return new GetServerListResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponseBody.java new file mode 100644 index 00000000..4ae9372b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerListResponseBody - List of Servers + */ + +public class GetServerListResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetServerListResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerListResponseBody withMediaContainer(GetServerListMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetServerListResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerListResponseBody other = (GetServerListResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetServerListResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetServerListMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetServerListResponseBody build() { + return new GetServerListResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServer.java new file mode 100644 index 00000000..5c099ced --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServer.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerListServer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("host") + private Optional host; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("address") + private Optional address; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("port") + private Optional port; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + public GetServerListServer( + @JsonProperty("name") Optional name, + @JsonProperty("host") Optional host, + @JsonProperty("address") Optional address, + @JsonProperty("port") Optional port, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("version") Optional version) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(host, "host"); + Utils.checkNotNull(address, "address"); + Utils.checkNotNull(port, "port"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(version, "version"); + this.name = name; + this.host = host; + this.address = address; + this.port = port; + this.machineIdentifier = machineIdentifier; + this.version = version; + } + + public Optional name() { + return name; + } + + public Optional host() { + return host; + } + + public Optional address() { + return address; + } + + public Optional port() { + return port; + } + + public Optional machineIdentifier() { + return machineIdentifier; + } + + public Optional version() { + return version; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerListServer withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public GetServerListServer withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public GetServerListServer withHost(String host) { + Utils.checkNotNull(host, "host"); + this.host = Optional.ofNullable(host); + return this; + } + + public GetServerListServer withHost(Optional host) { + Utils.checkNotNull(host, "host"); + this.host = host; + return this; + } + + public GetServerListServer withAddress(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + public GetServerListServer withAddress(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + public GetServerListServer withPort(double port) { + Utils.checkNotNull(port, "port"); + this.port = Optional.ofNullable(port); + return this; + } + + public GetServerListServer withPort(Optional port) { + Utils.checkNotNull(port, "port"); + this.port = port; + return this; + } + + public GetServerListServer withMachineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public GetServerListServer withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public GetServerListServer withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public GetServerListServer withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerListServer other = (GetServerListServer) o; + return + java.util.Objects.deepEquals(this.name, other.name) && + java.util.Objects.deepEquals(this.host, other.host) && + java.util.Objects.deepEquals(this.address, other.address) && + java.util.Objects.deepEquals(this.port, other.port) && + java.util.Objects.deepEquals(this.machineIdentifier, other.machineIdentifier) && + java.util.Objects.deepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + name, + host, + address, + port, + machineIdentifier, + version); + } + + @Override + public String toString() { + return Utils.toString(GetServerListServer.class, + "name", name, + "host", host, + "address", address, + "port", port, + "machineIdentifier", machineIdentifier, + "version", version); + } + + public final static class Builder { + + private Optional name = Optional.empty(); + + private Optional host = Optional.empty(); + + private Optional address = Optional.empty(); + + private Optional port = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional version = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder host(String host) { + Utils.checkNotNull(host, "host"); + this.host = Optional.ofNullable(host); + return this; + } + + public Builder host(Optional host) { + Utils.checkNotNull(host, "host"); + this.host = host; + return this; + } + + public Builder address(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + public Builder address(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + public Builder port(double port) { + Utils.checkNotNull(port, "port"); + this.port = Optional.ofNullable(port); + return this; + } + + public Builder port(Optional port) { + Utils.checkNotNull(port, "port"); + this.port = port; + return this; + } + + public Builder machineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public GetServerListServer build() { + return new GetServerListServer( + name, + host, + address, + port, + machineIdentifier, + version); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServerResponseBody.java new file mode 100644 index 00000000..063b5b5b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerListServerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerListServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetServerListServerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetServerListServerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerListServerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetServerListServerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerListServerResponseBody other = (GetServerListServerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetServerListServerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetServerListServerResponseBody build() { + return new GetServerListServerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesErrors.java new file mode 100644 index 00000000..f51885f7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerPreferencesErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetServerPreferencesErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerPreferencesErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetServerPreferencesErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetServerPreferencesErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetServerPreferencesErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetServerPreferencesErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetServerPreferencesErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerPreferencesErrors other = (GetServerPreferencesErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetServerPreferencesErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetServerPreferencesErrors build() { + return new GetServerPreferencesErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesMediaContainer.java new file mode 100644 index 00000000..5a2ec9fc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerPreferencesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Setting") + private Optional> setting; + + public GetServerPreferencesMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Setting") Optional> setting) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(setting, "setting"); + this.size = size; + this.setting = setting; + } + + public Optional size() { + return size; + } + + public Optional> setting() { + return setting; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerPreferencesMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetServerPreferencesMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetServerPreferencesMediaContainer withSetting(java.util.List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + public GetServerPreferencesMediaContainer withSetting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerPreferencesMediaContainer other = (GetServerPreferencesMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.setting, other.setting); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + setting); + } + + @Override + public String toString() { + return Utils.toString(GetServerPreferencesMediaContainer.class, + "size", size, + "setting", setting); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> setting = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder setting(java.util.List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + public Builder setting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + public GetServerPreferencesMediaContainer build() { + return new GetServerPreferencesMediaContainer( + size, + setting); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesRequestBuilder.java new file mode 100644 index 00000000..29adcab1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetServerPreferencesRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetServerPreferences sdk; + + public GetServerPreferencesRequestBuilder(SDKMethodInterfaces.MethodCallGetServerPreferences sdk) { + this.sdk = sdk; + } + + public GetServerPreferencesResponse call() throws Exception { + + return sdk.getServerPreferencesDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponse.java new file mode 100644 index 00000000..3ea06ed6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetServerPreferencesResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Server Preferences + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetServerPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Server Preferences + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetServerPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetServerPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetServerPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Server Preferences + */ + public GetServerPreferencesResponse withTwoHundredApplicationJsonObject(GetServerPreferencesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Server Preferences + */ + public GetServerPreferencesResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerPreferencesResponse withFourHundredAndOneApplicationJsonObject(GetServerPreferencesServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetServerPreferencesResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerPreferencesResponse other = (GetServerPreferencesResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetServerPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Server Preferences + */ + public Builder twoHundredApplicationJsonObject(GetServerPreferencesResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Server Preferences + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetServerPreferencesServerResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetServerPreferencesResponse build() { + return new GetServerPreferencesResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponseBody.java new file mode 100644 index 00000000..2457cb02 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerPreferencesResponseBody - Server Preferences + */ + +public class GetServerPreferencesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetServerPreferencesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerPreferencesResponseBody withMediaContainer(GetServerPreferencesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetServerPreferencesResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerPreferencesResponseBody other = (GetServerPreferencesResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetServerPreferencesResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetServerPreferencesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetServerPreferencesResponseBody build() { + return new GetServerPreferencesResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesServerResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesServerResponseBody.java new file mode 100644 index 00000000..6c404f60 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetServerPreferencesServerResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetServerPreferencesServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetServerPreferencesServerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetServerPreferencesServerResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetServerPreferencesServerResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetServerPreferencesServerResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerPreferencesServerResponseBody other = (GetServerPreferencesServerResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetServerPreferencesServerResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetServerPreferencesServerResponseBody build() { + return new GetServerPreferencesServerResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryErrors.java new file mode 100644 index 00000000..b2d33bab --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionHistoryErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetSessionHistoryErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionHistoryErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetSessionHistoryErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetSessionHistoryErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetSessionHistoryErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetSessionHistoryErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetSessionHistoryErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionHistoryErrors other = (GetSessionHistoryErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistoryErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetSessionHistoryErrors build() { + return new GetSessionHistoryErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMediaContainer.java new file mode 100644 index 00000000..c0e967e5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionHistoryMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetSessionHistoryMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionHistoryMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetSessionHistoryMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetSessionHistoryMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetSessionHistoryMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionHistoryMediaContainer other = (GetSessionHistoryMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistoryMediaContainer.class, + "size", size, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetSessionHistoryMediaContainer build() { + return new GetSessionHistoryMediaContainer( + size, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMetadata.java new file mode 100644 index 00000000..426c2dc6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryMetadata.java @@ -0,0 +1,842 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionHistoryMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("historyKey") + private Optional historyKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedAt") + private Optional viewedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accountID") + private Optional accountID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deviceID") + private Optional deviceID; + + public GetSessionHistoryMetadata( + @JsonProperty("historyKey") Optional historyKey, + @JsonProperty("key") Optional key, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("title") Optional title, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("type") Optional type, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("index") Optional index, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("viewedAt") Optional viewedAt, + @JsonProperty("accountID") Optional accountID, + @JsonProperty("deviceID") Optional deviceID) { + Utils.checkNotNull(historyKey, "historyKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(viewedAt, "viewedAt"); + Utils.checkNotNull(accountID, "accountID"); + Utils.checkNotNull(deviceID, "deviceID"); + this.historyKey = historyKey; + this.key = key; + this.ratingKey = ratingKey; + this.librarySectionID = librarySectionID; + this.parentKey = parentKey; + this.grandparentKey = grandparentKey; + this.title = title; + this.grandparentTitle = grandparentTitle; + this.type = type; + this.thumb = thumb; + this.parentThumb = parentThumb; + this.grandparentThumb = grandparentThumb; + this.grandparentArt = grandparentArt; + this.index = index; + this.parentIndex = parentIndex; + this.originallyAvailableAt = originallyAvailableAt; + this.viewedAt = viewedAt; + this.accountID = accountID; + this.deviceID = deviceID; + } + + public Optional historyKey() { + return historyKey; + } + + public Optional key() { + return key; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional parentKey() { + return parentKey; + } + + public Optional grandparentKey() { + return grandparentKey; + } + + public Optional title() { + return title; + } + + public Optional grandparentTitle() { + return grandparentTitle; + } + + public Optional type() { + return type; + } + + public Optional thumb() { + return thumb; + } + + public Optional parentThumb() { + return parentThumb; + } + + public Optional grandparentThumb() { + return grandparentThumb; + } + + public Optional grandparentArt() { + return grandparentArt; + } + + public Optional index() { + return index; + } + + public Optional parentIndex() { + return parentIndex; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional viewedAt() { + return viewedAt; + } + + public Optional accountID() { + return accountID; + } + + public Optional deviceID() { + return deviceID; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionHistoryMetadata withHistoryKey(String historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = Optional.ofNullable(historyKey); + return this; + } + + public GetSessionHistoryMetadata withHistoryKey(Optional historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = historyKey; + return this; + } + + public GetSessionHistoryMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetSessionHistoryMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetSessionHistoryMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetSessionHistoryMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetSessionHistoryMetadata withLibrarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetSessionHistoryMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetSessionHistoryMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public GetSessionHistoryMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public GetSessionHistoryMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public GetSessionHistoryMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public GetSessionHistoryMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetSessionHistoryMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetSessionHistoryMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public GetSessionHistoryMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public GetSessionHistoryMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetSessionHistoryMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetSessionHistoryMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetSessionHistoryMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetSessionHistoryMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public GetSessionHistoryMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public GetSessionHistoryMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public GetSessionHistoryMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public GetSessionHistoryMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public GetSessionHistoryMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public GetSessionHistoryMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetSessionHistoryMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetSessionHistoryMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public GetSessionHistoryMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public GetSessionHistoryMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetSessionHistoryMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetSessionHistoryMetadata withViewedAt(int viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + public GetSessionHistoryMetadata withViewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + public GetSessionHistoryMetadata withAccountID(int accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + public GetSessionHistoryMetadata withAccountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + public GetSessionHistoryMetadata withDeviceID(int deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + public GetSessionHistoryMetadata withDeviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionHistoryMetadata other = (GetSessionHistoryMetadata) o; + return + java.util.Objects.deepEquals(this.historyKey, other.historyKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.parentKey, other.parentKey) && + java.util.Objects.deepEquals(this.grandparentKey, other.grandparentKey) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.parentThumb, other.parentThumb) && + java.util.Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) && + java.util.Objects.deepEquals(this.grandparentArt, other.grandparentArt) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.parentIndex, other.parentIndex) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.viewedAt, other.viewedAt) && + java.util.Objects.deepEquals(this.accountID, other.accountID) && + java.util.Objects.deepEquals(this.deviceID, other.deviceID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + historyKey, + key, + ratingKey, + librarySectionID, + parentKey, + grandparentKey, + title, + grandparentTitle, + type, + thumb, + parentThumb, + grandparentThumb, + grandparentArt, + index, + parentIndex, + originallyAvailableAt, + viewedAt, + accountID, + deviceID); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistoryMetadata.class, + "historyKey", historyKey, + "key", key, + "ratingKey", ratingKey, + "librarySectionID", librarySectionID, + "parentKey", parentKey, + "grandparentKey", grandparentKey, + "title", title, + "grandparentTitle", grandparentTitle, + "type", type, + "thumb", thumb, + "parentThumb", parentThumb, + "grandparentThumb", grandparentThumb, + "grandparentArt", grandparentArt, + "index", index, + "parentIndex", parentIndex, + "originallyAvailableAt", originallyAvailableAt, + "viewedAt", viewedAt, + "accountID", accountID, + "deviceID", deviceID); + } + + public final static class Builder { + + private Optional historyKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional viewedAt = Optional.empty(); + + private Optional accountID = Optional.empty(); + + private Optional deviceID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder historyKey(String historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = Optional.ofNullable(historyKey); + return this; + } + + public Builder historyKey(Optional historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = historyKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder librarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder viewedAt(int viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + public Builder viewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + public Builder accountID(int accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + public Builder accountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + public Builder deviceID(int deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + public Builder deviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + public GetSessionHistoryMetadata build() { + return new GetSessionHistoryMetadata( + historyKey, + key, + ratingKey, + librarySectionID, + parentKey, + grandparentKey, + title, + grandparentTitle, + type, + thumb, + parentThumb, + grandparentThumb, + grandparentArt, + index, + parentIndex, + originallyAvailableAt, + viewedAt, + accountID, + deviceID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryRequestBuilder.java new file mode 100644 index 00000000..7e2df1ba --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetSessionHistoryRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetSessionHistory sdk; + + public GetSessionHistoryRequestBuilder(SDKMethodInterfaces.MethodCallGetSessionHistory sdk) { + this.sdk = sdk; + } + + public GetSessionHistoryResponse call() throws Exception { + + return sdk.getSessionHistoryDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponse.java new file mode 100644 index 00000000..95e74d16 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionHistoryResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * List of Plex Sessions + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetSessionHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * List of Plex Sessions + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSessionHistoryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSessionHistoryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSessionHistoryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of Plex Sessions + */ + public GetSessionHistoryResponse withTwoHundredApplicationJsonObject(GetSessionHistoryResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * List of Plex Sessions + */ + public GetSessionHistoryResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSessionHistoryResponse withFourHundredAndOneApplicationJsonObject(GetSessionHistorySessionsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSessionHistoryResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionHistoryResponse other = (GetSessionHistoryResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistoryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of Plex Sessions + */ + public Builder twoHundredApplicationJsonObject(GetSessionHistoryResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * List of Plex Sessions + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetSessionHistorySessionsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetSessionHistoryResponse build() { + return new GetSessionHistoryResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponseBody.java new file mode 100644 index 00000000..2d860635 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistoryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetSessionHistoryResponseBody - List of Plex Sessions + */ + +public class GetSessionHistoryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetSessionHistoryResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionHistoryResponseBody withMediaContainer(GetSessionHistoryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetSessionHistoryResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionHistoryResponseBody other = (GetSessionHistoryResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistoryResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetSessionHistoryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetSessionHistoryResponseBody build() { + return new GetSessionHistoryResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistorySessionsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistorySessionsResponseBody.java new file mode 100644 index 00000000..9d11f2a7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionHistorySessionsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetSessionHistorySessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetSessionHistorySessionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetSessionHistorySessionsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionHistorySessionsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetSessionHistorySessionsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionHistorySessionsResponseBody other = (GetSessionHistorySessionsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetSessionHistorySessionsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetSessionHistorySessionsResponseBody build() { + return new GetSessionHistorySessionsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsErrors.java new file mode 100644 index 00000000..0c92b5f4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetSessionsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetSessionsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetSessionsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetSessionsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetSessionsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetSessionsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsErrors other = (GetSessionsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetSessionsErrors build() { + return new GetSessionsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMedia.java new file mode 100644 index 00000000..0008524d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMedia.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionsMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public GetSessionsMedia( + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("container") Optional container, + @JsonProperty("duration") Optional duration, + @JsonProperty("id") Optional id, + @JsonProperty("selected") Optional selected, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(part, "part"); + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.bitrate = bitrate; + this.container = container; + this.duration = duration; + this.id = id; + this.selected = selected; + this.part = part; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional container() { + return container; + } + + public Optional duration() { + return duration; + } + + public Optional id() { + return id; + } + + public Optional selected() { + return selected; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsMedia withAudioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetSessionsMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetSessionsMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetSessionsMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetSessionsMedia withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetSessionsMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetSessionsMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetSessionsMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetSessionsMedia withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetSessionsMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetSessionsMedia withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetSessionsMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetSessionsMedia withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public GetSessionsMedia withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public GetSessionsMedia withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetSessionsMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsMedia other = (GetSessionsMedia) o; + return + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.selected, other.selected) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + audioChannels, + audioCodec, + bitrate, + container, + duration, + id, + selected, + part); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsMedia.class, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "bitrate", bitrate, + "container", container, + "duration", duration, + "id", id, + "selected", selected, + "part", part); + } + + public final static class Builder { + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder audioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder selected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public Builder selected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public GetSessionsMedia build() { + return new GetSessionsMedia( + audioChannels, + audioCodec, + bitrate, + container, + duration, + id, + selected, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMediaContainer.java new file mode 100644 index 00000000..0b3ae750 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public GetSessionsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetSessionsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetSessionsMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetSessionsMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsMediaContainer other = (GetSessionsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsMediaContainer.class, + "size", size, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public GetSessionsMediaContainer build() { + return new GetSessionsMediaContainer( + size, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMetadata.java new file mode 100644 index 00000000..9927e365 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsMetadata.java @@ -0,0 +1,1579 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionsMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentGuid") + private Optional grandparentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionKey") + private Optional librarySectionKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("musicAnalysisVersion") + private Optional musicAnalysisVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentGuid") + private Optional parentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentStudio") + private Optional parentStudio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentYear") + private Optional parentYear; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingCount") + private Optional ratingCount; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sessionKey") + private Optional sessionKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("User") + private Optional user; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Player") + private Optional player; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Session") + private Optional session; + + public GetSessionsMetadata( + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentGuid") Optional grandparentGuid, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("guid") Optional guid, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("musicAnalysisVersion") Optional musicAnalysisVersion, + @JsonProperty("parentGuid") Optional parentGuid, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentStudio") Optional parentStudio, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("parentYear") Optional parentYear, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("sessionKey") Optional sessionKey, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title") Optional title, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("type") Optional type, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Media") Optional> media, + @JsonProperty("User") Optional user, + @JsonProperty("Player") Optional player, + @JsonProperty("Session") Optional session) { + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); + Utils.checkNotNull(parentGuid, "parentGuid"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentStudio, "parentStudio"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(parentYear, "parentYear"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(sessionKey, "sessionKey"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(user, "user"); + Utils.checkNotNull(player, "player"); + Utils.checkNotNull(session, "session"); + this.addedAt = addedAt; + this.art = art; + this.duration = duration; + this.grandparentArt = grandparentArt; + this.grandparentGuid = grandparentGuid; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.index = index; + this.key = key; + this.librarySectionID = librarySectionID; + this.librarySectionKey = librarySectionKey; + this.librarySectionTitle = librarySectionTitle; + this.musicAnalysisVersion = musicAnalysisVersion; + this.parentGuid = parentGuid; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentStudio = parentStudio; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.parentYear = parentYear; + this.ratingCount = ratingCount; + this.ratingKey = ratingKey; + this.sessionKey = sessionKey; + this.thumb = thumb; + this.title = title; + this.titleSort = titleSort; + this.type = type; + this.updatedAt = updatedAt; + this.viewOffset = viewOffset; + this.media = media; + this.user = user; + this.player = player; + this.session = session; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional art() { + return art; + } + + public Optional duration() { + return duration; + } + + public Optional grandparentArt() { + return grandparentArt; + } + + public Optional grandparentGuid() { + return grandparentGuid; + } + + public Optional grandparentKey() { + return grandparentKey; + } + + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + public Optional grandparentThumb() { + return grandparentThumb; + } + + public Optional grandparentTitle() { + return grandparentTitle; + } + + public Optional guid() { + return guid; + } + + public Optional index() { + return index; + } + + public Optional key() { + return key; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionKey() { + return librarySectionKey; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional musicAnalysisVersion() { + return musicAnalysisVersion; + } + + public Optional parentGuid() { + return parentGuid; + } + + public Optional parentIndex() { + return parentIndex; + } + + public Optional parentKey() { + return parentKey; + } + + public Optional parentRatingKey() { + return parentRatingKey; + } + + public Optional parentStudio() { + return parentStudio; + } + + public Optional parentThumb() { + return parentThumb; + } + + public Optional parentTitle() { + return parentTitle; + } + + public Optional parentYear() { + return parentYear; + } + + public Optional ratingCount() { + return ratingCount; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional sessionKey() { + return sessionKey; + } + + public Optional thumb() { + return thumb; + } + + public Optional title() { + return title; + } + + public Optional titleSort() { + return titleSort; + } + + public Optional type() { + return type; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional viewOffset() { + return viewOffset; + } + + public Optional> media() { + return media; + } + + public Optional user() { + return user; + } + + public Optional player() { + return player; + } + + public Optional session() { + return session; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetSessionsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetSessionsMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetSessionsMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetSessionsMetadata withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetSessionsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetSessionsMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public GetSessionsMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public GetSessionsMetadata withGrandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + public GetSessionsMetadata withGrandparentGuid(Optional grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = grandparentGuid; + return this; + } + + public GetSessionsMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public GetSessionsMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public GetSessionsMetadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public GetSessionsMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public GetSessionsMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public GetSessionsMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public GetSessionsMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public GetSessionsMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public GetSessionsMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetSessionsMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetSessionsMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetSessionsMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetSessionsMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetSessionsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetSessionsMetadata withLibrarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetSessionsMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetSessionsMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public GetSessionsMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public GetSessionsMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetSessionsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetSessionsMetadata withMusicAnalysisVersion(String musicAnalysisVersion) { + Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); + this.musicAnalysisVersion = Optional.ofNullable(musicAnalysisVersion); + return this; + } + + public GetSessionsMetadata withMusicAnalysisVersion(Optional musicAnalysisVersion) { + Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); + this.musicAnalysisVersion = musicAnalysisVersion; + return this; + } + + public GetSessionsMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public GetSessionsMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public GetSessionsMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public GetSessionsMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public GetSessionsMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public GetSessionsMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public GetSessionsMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public GetSessionsMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public GetSessionsMetadata withParentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public GetSessionsMetadata withParentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public GetSessionsMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public GetSessionsMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public GetSessionsMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public GetSessionsMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public GetSessionsMetadata withParentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public GetSessionsMetadata withParentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public GetSessionsMetadata withRatingCount(int ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + public GetSessionsMetadata withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + public GetSessionsMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetSessionsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetSessionsMetadata withSessionKey(String sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = Optional.ofNullable(sessionKey); + return this; + } + + public GetSessionsMetadata withSessionKey(Optional sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = sessionKey; + return this; + } + + public GetSessionsMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetSessionsMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetSessionsMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetSessionsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetSessionsMetadata withTitleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public GetSessionsMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public GetSessionsMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetSessionsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetSessionsMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetSessionsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetSessionsMetadata withViewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + public GetSessionsMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public GetSessionsMetadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetSessionsMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetSessionsMetadata withUser(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); + return this; + } + + public GetSessionsMetadata withUser(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + public GetSessionsMetadata withPlayer(Player player) { + Utils.checkNotNull(player, "player"); + this.player = Optional.ofNullable(player); + return this; + } + + public GetSessionsMetadata withPlayer(Optional player) { + Utils.checkNotNull(player, "player"); + this.player = player; + return this; + } + + public GetSessionsMetadata withSession(Session session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); + return this; + } + + public GetSessionsMetadata withSession(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsMetadata other = (GetSessionsMetadata) o; + return + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.grandparentArt, other.grandparentArt) && + java.util.Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) && + java.util.Objects.deepEquals(this.grandparentKey, other.grandparentKey) && + java.util.Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + java.util.Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) && + java.util.Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.musicAnalysisVersion, other.musicAnalysisVersion) && + java.util.Objects.deepEquals(this.parentGuid, other.parentGuid) && + java.util.Objects.deepEquals(this.parentIndex, other.parentIndex) && + java.util.Objects.deepEquals(this.parentKey, other.parentKey) && + java.util.Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && + java.util.Objects.deepEquals(this.parentStudio, other.parentStudio) && + java.util.Objects.deepEquals(this.parentThumb, other.parentThumb) && + java.util.Objects.deepEquals(this.parentTitle, other.parentTitle) && + java.util.Objects.deepEquals(this.parentYear, other.parentYear) && + java.util.Objects.deepEquals(this.ratingCount, other.ratingCount) && + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.sessionKey, other.sessionKey) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.titleSort, other.titleSort) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.viewOffset, other.viewOffset) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.user, other.user) && + java.util.Objects.deepEquals(this.player, other.player) && + java.util.Objects.deepEquals(this.session, other.session); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + addedAt, + art, + duration, + grandparentArt, + grandparentGuid, + grandparentKey, + grandparentRatingKey, + grandparentThumb, + grandparentTitle, + guid, + index, + key, + librarySectionID, + librarySectionKey, + librarySectionTitle, + musicAnalysisVersion, + parentGuid, + parentIndex, + parentKey, + parentRatingKey, + parentStudio, + parentThumb, + parentTitle, + parentYear, + ratingCount, + ratingKey, + sessionKey, + thumb, + title, + titleSort, + type, + updatedAt, + viewOffset, + media, + user, + player, + session); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsMetadata.class, + "addedAt", addedAt, + "art", art, + "duration", duration, + "grandparentArt", grandparentArt, + "grandparentGuid", grandparentGuid, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "index", index, + "key", key, + "librarySectionID", librarySectionID, + "librarySectionKey", librarySectionKey, + "librarySectionTitle", librarySectionTitle, + "musicAnalysisVersion", musicAnalysisVersion, + "parentGuid", parentGuid, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentStudio", parentStudio, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "parentYear", parentYear, + "ratingCount", ratingCount, + "ratingKey", ratingKey, + "sessionKey", sessionKey, + "thumb", thumb, + "title", title, + "titleSort", titleSort, + "type", type, + "updatedAt", updatedAt, + "viewOffset", viewOffset, + "media", media, + "user", user, + "player", player, + "session", session); + } + + public final static class Builder { + + private Optional addedAt = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentGuid = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional musicAnalysisVersion = Optional.empty(); + + private Optional parentGuid = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentStudio = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional parentYear = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional sessionKey = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional user = Optional.empty(); + + private Optional player = Optional.empty(); + + private Optional session = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public Builder grandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + public Builder grandparentGuid(Optional grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = grandparentGuid; + return this; + } + + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder librarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public Builder librarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder musicAnalysisVersion(String musicAnalysisVersion) { + Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); + this.musicAnalysisVersion = Optional.ofNullable(musicAnalysisVersion); + return this; + } + + public Builder musicAnalysisVersion(Optional musicAnalysisVersion) { + Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); + this.musicAnalysisVersion = musicAnalysisVersion; + return this; + } + + public Builder parentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public Builder parentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public Builder parentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public Builder parentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public Builder parentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public Builder parentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public Builder ratingCount(int ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder sessionKey(String sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = Optional.ofNullable(sessionKey); + return this; + } + + public Builder sessionKey(Optional sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = sessionKey; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder titleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder viewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder user(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); + return this; + } + + public Builder user(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + public Builder player(Player player) { + Utils.checkNotNull(player, "player"); + this.player = Optional.ofNullable(player); + return this; + } + + public Builder player(Optional player) { + Utils.checkNotNull(player, "player"); + this.player = player; + return this; + } + + public Builder session(Session session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); + return this; + } + + public Builder session(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; + return this; + } + + public GetSessionsMetadata build() { + return new GetSessionsMetadata( + addedAt, + art, + duration, + grandparentArt, + grandparentGuid, + grandparentKey, + grandparentRatingKey, + grandparentThumb, + grandparentTitle, + guid, + index, + key, + librarySectionID, + librarySectionKey, + librarySectionTitle, + musicAnalysisVersion, + parentGuid, + parentIndex, + parentKey, + parentRatingKey, + parentStudio, + parentThumb, + parentTitle, + parentYear, + ratingCount, + ratingKey, + sessionKey, + thumb, + title, + titleSort, + type, + updatedAt, + viewOffset, + media, + user, + player, + session); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsPart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsPart.java new file mode 100644 index 00000000..f85f175b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsPart.java @@ -0,0 +1,472 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionsPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasThumbnail") + private Optional hasThumbnail; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("decision") + private Optional decision; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Stream") + private Optional> stream; + + public GetSessionsPart( + @JsonProperty("container") Optional container, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("hasThumbnail") Optional hasThumbnail, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("size") Optional size, + @JsonProperty("decision") Optional decision, + @JsonProperty("selected") Optional selected, + @JsonProperty("Stream") Optional> stream) { + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(decision, "decision"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(stream, "stream"); + this.container = container; + this.duration = duration; + this.file = file; + this.hasThumbnail = hasThumbnail; + this.id = id; + this.key = key; + this.size = size; + this.decision = decision; + this.selected = selected; + this.stream = stream; + } + + public Optional container() { + return container; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional hasThumbnail() { + return hasThumbnail; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional size() { + return size; + } + + public Optional decision() { + return decision; + } + + public Optional selected() { + return selected; + } + + public Optional> stream() { + return stream; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetSessionsPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetSessionsPart withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetSessionsPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetSessionsPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetSessionsPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetSessionsPart withHasThumbnail(String hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public GetSessionsPart withHasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = hasThumbnail; + return this; + } + + public GetSessionsPart withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetSessionsPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetSessionsPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetSessionsPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetSessionsPart withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetSessionsPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetSessionsPart withDecision(String decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = Optional.ofNullable(decision); + return this; + } + + public GetSessionsPart withDecision(Optional decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = decision; + return this; + } + + public GetSessionsPart withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public GetSessionsPart withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public GetSessionsPart withStream(java.util.List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + public GetSessionsPart withStream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsPart other = (GetSessionsPart) o; + return + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) && + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.decision, other.decision) && + java.util.Objects.deepEquals(this.selected, other.selected) && + java.util.Objects.deepEquals(this.stream, other.stream); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + container, + duration, + file, + hasThumbnail, + id, + key, + size, + decision, + selected, + stream); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsPart.class, + "container", container, + "duration", duration, + "file", file, + "hasThumbnail", hasThumbnail, + "id", id, + "key", key, + "size", size, + "decision", decision, + "selected", selected, + "stream", stream); + } + + public final static class Builder { + + private Optional container = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional hasThumbnail = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional decision = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Optional> stream = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder hasThumbnail(String hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public Builder hasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = hasThumbnail; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder decision(String decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = Optional.ofNullable(decision); + return this; + } + + public Builder decision(Optional decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = decision; + return this; + } + + public Builder selected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public Builder selected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public Builder stream(java.util.List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + public Builder stream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; + return this; + } + + public GetSessionsPart build() { + return new GetSessionsPart( + container, + duration, + file, + hasThumbnail, + id, + key, + size, + decision, + selected, + stream); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsRequestBuilder.java new file mode 100644 index 00000000..db873072 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetSessionsRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetSessions sdk; + + public GetSessionsRequestBuilder(SDKMethodInterfaces.MethodCallGetSessions sdk) { + this.sdk = sdk; + } + + public GetSessionsResponse call() throws Exception { + + return sdk.getSessionsDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponse.java new file mode 100644 index 00000000..ddaca8fd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * List of Active Plex Sessions + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetSessionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * List of Active Plex Sessions + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSessionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSessionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSessionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of Active Plex Sessions + */ + public GetSessionsResponse withTwoHundredApplicationJsonObject(GetSessionsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * List of Active Plex Sessions + */ + public GetSessionsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSessionsResponse withFourHundredAndOneApplicationJsonObject(GetSessionsSessionsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSessionsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsResponse other = (GetSessionsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of Active Plex Sessions + */ + public Builder twoHundredApplicationJsonObject(GetSessionsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * List of Active Plex Sessions + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetSessionsSessionsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetSessionsResponse build() { + return new GetSessionsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponseBody.java new file mode 100644 index 00000000..64a90e36 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetSessionsResponseBody - List of Active Plex Sessions + */ + +public class GetSessionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetSessionsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsResponseBody withMediaContainer(GetSessionsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetSessionsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsResponseBody other = (GetSessionsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetSessionsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetSessionsResponseBody build() { + return new GetSessionsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsSessionsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsSessionsResponseBody.java new file mode 100644 index 00000000..b6b91df1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsSessionsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetSessionsSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetSessionsSessionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetSessionsSessionsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsSessionsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetSessionsSessionsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsSessionsResponseBody other = (GetSessionsSessionsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsSessionsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetSessionsSessionsResponseBody build() { + return new GetSessionsSessionsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsStream.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsStream.java new file mode 100644 index 00000000..913191df --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSessionsStream.java @@ -0,0 +1,882 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSessionsStream { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("albumGain") + private Optional albumGain; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("albumPeak") + private Optional albumPeak; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("albumRange") + private Optional albumRange; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannelLayout") + private Optional audioChannelLayout; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitDepth") + private Optional bitDepth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channels") + private Optional channels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codec") + private Optional codec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayTitle") + private Optional displayTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("extendedDisplayTitle") + private Optional extendedDisplayTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gain") + private Optional gain; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("loudness") + private Optional loudness; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lra") + private Optional lra; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("peak") + private Optional peak; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("samplingRate") + private Optional samplingRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamType") + private Optional streamType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + public GetSessionsStream( + @JsonProperty("albumGain") Optional albumGain, + @JsonProperty("albumPeak") Optional albumPeak, + @JsonProperty("albumRange") Optional albumRange, + @JsonProperty("audioChannelLayout") Optional audioChannelLayout, + @JsonProperty("bitDepth") Optional bitDepth, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("channels") Optional channels, + @JsonProperty("codec") Optional codec, + @JsonProperty("displayTitle") Optional displayTitle, + @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, + @JsonProperty("gain") Optional gain, + @JsonProperty("id") Optional id, + @JsonProperty("index") Optional index, + @JsonProperty("loudness") Optional loudness, + @JsonProperty("lra") Optional lra, + @JsonProperty("peak") Optional peak, + @JsonProperty("samplingRate") Optional samplingRate, + @JsonProperty("selected") Optional selected, + @JsonProperty("streamType") Optional streamType, + @JsonProperty("location") Optional location) { + Utils.checkNotNull(albumGain, "albumGain"); + Utils.checkNotNull(albumPeak, "albumPeak"); + Utils.checkNotNull(albumRange, "albumRange"); + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + Utils.checkNotNull(bitDepth, "bitDepth"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(channels, "channels"); + Utils.checkNotNull(codec, "codec"); + Utils.checkNotNull(displayTitle, "displayTitle"); + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + Utils.checkNotNull(gain, "gain"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(loudness, "loudness"); + Utils.checkNotNull(lra, "lra"); + Utils.checkNotNull(peak, "peak"); + Utils.checkNotNull(samplingRate, "samplingRate"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(streamType, "streamType"); + Utils.checkNotNull(location, "location"); + this.albumGain = albumGain; + this.albumPeak = albumPeak; + this.albumRange = albumRange; + this.audioChannelLayout = audioChannelLayout; + this.bitDepth = bitDepth; + this.bitrate = bitrate; + this.channels = channels; + this.codec = codec; + this.displayTitle = displayTitle; + this.extendedDisplayTitle = extendedDisplayTitle; + this.gain = gain; + this.id = id; + this.index = index; + this.loudness = loudness; + this.lra = lra; + this.peak = peak; + this.samplingRate = samplingRate; + this.selected = selected; + this.streamType = streamType; + this.location = location; + } + + public Optional albumGain() { + return albumGain; + } + + public Optional albumPeak() { + return albumPeak; + } + + public Optional albumRange() { + return albumRange; + } + + public Optional audioChannelLayout() { + return audioChannelLayout; + } + + public Optional bitDepth() { + return bitDepth; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional channels() { + return channels; + } + + public Optional codec() { + return codec; + } + + public Optional displayTitle() { + return displayTitle; + } + + public Optional extendedDisplayTitle() { + return extendedDisplayTitle; + } + + public Optional gain() { + return gain; + } + + public Optional id() { + return id; + } + + public Optional index() { + return index; + } + + public Optional loudness() { + return loudness; + } + + public Optional lra() { + return lra; + } + + public Optional peak() { + return peak; + } + + public Optional samplingRate() { + return samplingRate; + } + + public Optional selected() { + return selected; + } + + public Optional streamType() { + return streamType; + } + + public Optional location() { + return location; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSessionsStream withAlbumGain(String albumGain) { + Utils.checkNotNull(albumGain, "albumGain"); + this.albumGain = Optional.ofNullable(albumGain); + return this; + } + + public GetSessionsStream withAlbumGain(Optional albumGain) { + Utils.checkNotNull(albumGain, "albumGain"); + this.albumGain = albumGain; + return this; + } + + public GetSessionsStream withAlbumPeak(String albumPeak) { + Utils.checkNotNull(albumPeak, "albumPeak"); + this.albumPeak = Optional.ofNullable(albumPeak); + return this; + } + + public GetSessionsStream withAlbumPeak(Optional albumPeak) { + Utils.checkNotNull(albumPeak, "albumPeak"); + this.albumPeak = albumPeak; + return this; + } + + public GetSessionsStream withAlbumRange(String albumRange) { + Utils.checkNotNull(albumRange, "albumRange"); + this.albumRange = Optional.ofNullable(albumRange); + return this; + } + + public GetSessionsStream withAlbumRange(Optional albumRange) { + Utils.checkNotNull(albumRange, "albumRange"); + this.albumRange = albumRange; + return this; + } + + public GetSessionsStream withAudioChannelLayout(String audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); + return this; + } + + public GetSessionsStream withAudioChannelLayout(Optional audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = audioChannelLayout; + return this; + } + + public GetSessionsStream withBitDepth(int bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public GetSessionsStream withBitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public GetSessionsStream withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetSessionsStream withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetSessionsStream withChannels(int channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = Optional.ofNullable(channels); + return this; + } + + public GetSessionsStream withChannels(Optional channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = channels; + return this; + } + + public GetSessionsStream withCodec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public GetSessionsStream withCodec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public GetSessionsStream withDisplayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public GetSessionsStream withDisplayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public GetSessionsStream withExtendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public GetSessionsStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + public GetSessionsStream withGain(String gain) { + Utils.checkNotNull(gain, "gain"); + this.gain = Optional.ofNullable(gain); + return this; + } + + public GetSessionsStream withGain(Optional gain) { + Utils.checkNotNull(gain, "gain"); + this.gain = gain; + return this; + } + + public GetSessionsStream withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetSessionsStream withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetSessionsStream withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetSessionsStream withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetSessionsStream withLoudness(String loudness) { + Utils.checkNotNull(loudness, "loudness"); + this.loudness = Optional.ofNullable(loudness); + return this; + } + + public GetSessionsStream withLoudness(Optional loudness) { + Utils.checkNotNull(loudness, "loudness"); + this.loudness = loudness; + return this; + } + + public GetSessionsStream withLra(String lra) { + Utils.checkNotNull(lra, "lra"); + this.lra = Optional.ofNullable(lra); + return this; + } + + public GetSessionsStream withLra(Optional lra) { + Utils.checkNotNull(lra, "lra"); + this.lra = lra; + return this; + } + + public GetSessionsStream withPeak(String peak) { + Utils.checkNotNull(peak, "peak"); + this.peak = Optional.ofNullable(peak); + return this; + } + + public GetSessionsStream withPeak(Optional peak) { + Utils.checkNotNull(peak, "peak"); + this.peak = peak; + return this; + } + + public GetSessionsStream withSamplingRate(int samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + public GetSessionsStream withSamplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + public GetSessionsStream withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public GetSessionsStream withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public GetSessionsStream withStreamType(int streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public GetSessionsStream withStreamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public GetSessionsStream withLocation(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public GetSessionsStream withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionsStream other = (GetSessionsStream) o; + return + java.util.Objects.deepEquals(this.albumGain, other.albumGain) && + java.util.Objects.deepEquals(this.albumPeak, other.albumPeak) && + java.util.Objects.deepEquals(this.albumRange, other.albumRange) && + java.util.Objects.deepEquals(this.audioChannelLayout, other.audioChannelLayout) && + java.util.Objects.deepEquals(this.bitDepth, other.bitDepth) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.channels, other.channels) && + java.util.Objects.deepEquals(this.codec, other.codec) && + java.util.Objects.deepEquals(this.displayTitle, other.displayTitle) && + java.util.Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && + java.util.Objects.deepEquals(this.gain, other.gain) && + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.loudness, other.loudness) && + java.util.Objects.deepEquals(this.lra, other.lra) && + java.util.Objects.deepEquals(this.peak, other.peak) && + java.util.Objects.deepEquals(this.samplingRate, other.samplingRate) && + java.util.Objects.deepEquals(this.selected, other.selected) && + java.util.Objects.deepEquals(this.streamType, other.streamType) && + java.util.Objects.deepEquals(this.location, other.location); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + albumGain, + albumPeak, + albumRange, + audioChannelLayout, + bitDepth, + bitrate, + channels, + codec, + displayTitle, + extendedDisplayTitle, + gain, + id, + index, + loudness, + lra, + peak, + samplingRate, + selected, + streamType, + location); + } + + @Override + public String toString() { + return Utils.toString(GetSessionsStream.class, + "albumGain", albumGain, + "albumPeak", albumPeak, + "albumRange", albumRange, + "audioChannelLayout", audioChannelLayout, + "bitDepth", bitDepth, + "bitrate", bitrate, + "channels", channels, + "codec", codec, + "displayTitle", displayTitle, + "extendedDisplayTitle", extendedDisplayTitle, + "gain", gain, + "id", id, + "index", index, + "loudness", loudness, + "lra", lra, + "peak", peak, + "samplingRate", samplingRate, + "selected", selected, + "streamType", streamType, + "location", location); + } + + public final static class Builder { + + private Optional albumGain = Optional.empty(); + + private Optional albumPeak = Optional.empty(); + + private Optional albumRange = Optional.empty(); + + private Optional audioChannelLayout = Optional.empty(); + + private Optional bitDepth = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional channels = Optional.empty(); + + private Optional codec = Optional.empty(); + + private Optional displayTitle = Optional.empty(); + + private Optional extendedDisplayTitle = Optional.empty(); + + private Optional gain = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional loudness = Optional.empty(); + + private Optional lra = Optional.empty(); + + private Optional peak = Optional.empty(); + + private Optional samplingRate = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Optional streamType = Optional.empty(); + + private Optional location = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder albumGain(String albumGain) { + Utils.checkNotNull(albumGain, "albumGain"); + this.albumGain = Optional.ofNullable(albumGain); + return this; + } + + public Builder albumGain(Optional albumGain) { + Utils.checkNotNull(albumGain, "albumGain"); + this.albumGain = albumGain; + return this; + } + + public Builder albumPeak(String albumPeak) { + Utils.checkNotNull(albumPeak, "albumPeak"); + this.albumPeak = Optional.ofNullable(albumPeak); + return this; + } + + public Builder albumPeak(Optional albumPeak) { + Utils.checkNotNull(albumPeak, "albumPeak"); + this.albumPeak = albumPeak; + return this; + } + + public Builder albumRange(String albumRange) { + Utils.checkNotNull(albumRange, "albumRange"); + this.albumRange = Optional.ofNullable(albumRange); + return this; + } + + public Builder albumRange(Optional albumRange) { + Utils.checkNotNull(albumRange, "albumRange"); + this.albumRange = albumRange; + return this; + } + + public Builder audioChannelLayout(String audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); + return this; + } + + public Builder audioChannelLayout(Optional audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = audioChannelLayout; + return this; + } + + public Builder bitDepth(int bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public Builder bitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public Builder bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder channels(int channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = Optional.ofNullable(channels); + return this; + } + + public Builder channels(Optional channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = channels; + return this; + } + + public Builder codec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public Builder codec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public Builder displayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public Builder displayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public Builder extendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + public Builder gain(String gain) { + Utils.checkNotNull(gain, "gain"); + this.gain = Optional.ofNullable(gain); + return this; + } + + public Builder gain(Optional gain) { + Utils.checkNotNull(gain, "gain"); + this.gain = gain; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder loudness(String loudness) { + Utils.checkNotNull(loudness, "loudness"); + this.loudness = Optional.ofNullable(loudness); + return this; + } + + public Builder loudness(Optional loudness) { + Utils.checkNotNull(loudness, "loudness"); + this.loudness = loudness; + return this; + } + + public Builder lra(String lra) { + Utils.checkNotNull(lra, "lra"); + this.lra = Optional.ofNullable(lra); + return this; + } + + public Builder lra(Optional lra) { + Utils.checkNotNull(lra, "lra"); + this.lra = lra; + return this; + } + + public Builder peak(String peak) { + Utils.checkNotNull(peak, "peak"); + this.peak = Optional.ofNullable(peak); + return this; + } + + public Builder peak(Optional peak) { + Utils.checkNotNull(peak, "peak"); + this.peak = peak; + return this; + } + + public Builder samplingRate(int samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + public Builder samplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + public Builder selected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public Builder selected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public Builder streamType(int streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public Builder streamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public Builder location(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public GetSessionsStream build() { + return new GetSessionsStream( + albumGain, + albumPeak, + albumRange, + audioChannelLayout, + bitDepth, + bitrate, + channels, + codec, + displayTitle, + extendedDisplayTitle, + gain, + id, + index, + loudness, + lra, + peak, + samplingRate, + selected, + streamType, + location); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationErrors.java new file mode 100644 index 00000000..d00bd941 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSourceConnectionInformationErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetSourceConnectionInformationErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSourceConnectionInformationErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetSourceConnectionInformationErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetSourceConnectionInformationErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetSourceConnectionInformationErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetSourceConnectionInformationErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetSourceConnectionInformationErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSourceConnectionInformationErrors other = (GetSourceConnectionInformationErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetSourceConnectionInformationErrors build() { + return new GetSourceConnectionInformationErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequest.java new file mode 100644 index 00000000..b3958e10 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSourceConnectionInformationRequest { + + /** + * The source identifier with an included prefix. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=source") + private String source; + + public GetSourceConnectionInformationRequest( + String source) { + Utils.checkNotNull(source, "source"); + this.source = source; + } + + /** + * The source identifier with an included prefix. + */ + public String source() { + return source; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The source identifier with an included prefix. + */ + public GetSourceConnectionInformationRequest withSource(String source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSourceConnectionInformationRequest other = (GetSourceConnectionInformationRequest) o; + return + java.util.Objects.deepEquals(this.source, other.source); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + source); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationRequest.class, + "source", source); + } + + public final static class Builder { + + private String source; + + private Builder() { + // force use of static builder() method + } + + /** + * The source identifier with an included prefix. + */ + public Builder source(String source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + public GetSourceConnectionInformationRequest build() { + return new GetSourceConnectionInformationRequest( + source); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequestBuilder.java new file mode 100644 index 00000000..68a6af4e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetSourceConnectionInformationRequestBuilder { + + private String source; + private final SDKMethodInterfaces.MethodCallGetSourceConnectionInformation sdk; + + public GetSourceConnectionInformationRequestBuilder(SDKMethodInterfaces.MethodCallGetSourceConnectionInformation sdk) { + this.sdk = sdk; + } + + public GetSourceConnectionInformationRequestBuilder source(String source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + public GetSourceConnectionInformationResponse call() throws Exception { + + return sdk.getSourceConnectionInformation( + source); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponse.java new file mode 100644 index 00000000..7214da77 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetSourceConnectionInformationResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public GetSourceConnectionInformationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSourceConnectionInformationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSourceConnectionInformationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSourceConnectionInformationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSourceConnectionInformationResponse withObject(GetSourceConnectionInformationResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetSourceConnectionInformationResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSourceConnectionInformationResponse other = (GetSourceConnectionInformationResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(GetSourceConnectionInformationResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetSourceConnectionInformationResponse build() { + return new GetSourceConnectionInformationResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponseBody.java new file mode 100644 index 00000000..2a2ded3f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetSourceConnectionInformationResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetSourceConnectionInformationResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetSourceConnectionInformationResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetSourceConnectionInformationResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetSourceConnectionInformationResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetSourceConnectionInformationResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSourceConnectionInformationResponseBody other = (GetSourceConnectionInformationResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetSourceConnectionInformationResponseBody build() { + return new GetSourceConnectionInformationResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsDevice.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsDevice.java new file mode 100644 index 00000000..d06c54ad --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsDevice.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetStatisticsDevice { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platform") + private Optional platform; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("clientIdentifier") + private Optional clientIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + public GetStatisticsDevice( + @JsonProperty("id") Optional id, + @JsonProperty("name") Optional name, + @JsonProperty("platform") Optional platform, + @JsonProperty("clientIdentifier") Optional clientIdentifier, + @JsonProperty("createdAt") Optional createdAt) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(createdAt, "createdAt"); + this.id = id; + this.name = name; + this.platform = platform; + this.clientIdentifier = clientIdentifier; + this.createdAt = createdAt; + } + + public Optional id() { + return id; + } + + public Optional name() { + return name; + } + + public Optional platform() { + return platform; + } + + public Optional clientIdentifier() { + return clientIdentifier; + } + + public Optional createdAt() { + return createdAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetStatisticsDevice withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetStatisticsDevice withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetStatisticsDevice withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public GetStatisticsDevice withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public GetStatisticsDevice withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public GetStatisticsDevice withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public GetStatisticsDevice withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + public GetStatisticsDevice withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + public GetStatisticsDevice withCreatedAt(int createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public GetStatisticsDevice withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStatisticsDevice other = (GetStatisticsDevice) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.name, other.name) && + java.util.Objects.deepEquals(this.platform, other.platform) && + java.util.Objects.deepEquals(this.clientIdentifier, other.clientIdentifier) && + java.util.Objects.deepEquals(this.createdAt, other.createdAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + name, + platform, + clientIdentifier, + createdAt); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsDevice.class, + "id", id, + "name", name, + "platform", platform, + "clientIdentifier", clientIdentifier, + "createdAt", createdAt); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional clientIdentifier = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + public Builder createdAt(int createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public GetStatisticsDevice build() { + return new GetStatisticsDevice( + id, + name, + platform, + clientIdentifier, + createdAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsErrors.java new file mode 100644 index 00000000..b758266d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetStatisticsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetStatisticsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetStatisticsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetStatisticsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetStatisticsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetStatisticsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetStatisticsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetStatisticsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStatisticsErrors other = (GetStatisticsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetStatisticsErrors build() { + return new GetStatisticsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsMediaContainer.java new file mode 100644 index 00000000..0e505f55 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsMediaContainer.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetStatisticsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Account") + private Optional> account; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("StatisticsMedia") + private Optional> statisticsMedia; + + public GetStatisticsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("Device") Optional> device, + @JsonProperty("Account") Optional> account, + @JsonProperty("StatisticsMedia") Optional> statisticsMedia) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(statisticsMedia, "statisticsMedia"); + this.size = size; + this.device = device; + this.account = account; + this.statisticsMedia = statisticsMedia; + } + + public Optional size() { + return size; + } + + public Optional> device() { + return device; + } + + public Optional> account() { + return account; + } + + public Optional> statisticsMedia() { + return statisticsMedia; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetStatisticsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetStatisticsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetStatisticsMediaContainer withDevice(java.util.List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public GetStatisticsMediaContainer withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public GetStatisticsMediaContainer withAccount(java.util.List account) { + Utils.checkNotNull(account, "account"); + this.account = Optional.ofNullable(account); + return this; + } + + public GetStatisticsMediaContainer withAccount(Optional> account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + public GetStatisticsMediaContainer withStatisticsMedia(java.util.List statisticsMedia) { + Utils.checkNotNull(statisticsMedia, "statisticsMedia"); + this.statisticsMedia = Optional.ofNullable(statisticsMedia); + return this; + } + + public GetStatisticsMediaContainer withStatisticsMedia(Optional> statisticsMedia) { + Utils.checkNotNull(statisticsMedia, "statisticsMedia"); + this.statisticsMedia = statisticsMedia; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStatisticsMediaContainer other = (GetStatisticsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.device, other.device) && + java.util.Objects.deepEquals(this.account, other.account) && + java.util.Objects.deepEquals(this.statisticsMedia, other.statisticsMedia); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + device, + account, + statisticsMedia); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsMediaContainer.class, + "size", size, + "device", device, + "account", account, + "statisticsMedia", statisticsMedia); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> device = Optional.empty(); + + private Optional> account = Optional.empty(); + + private Optional> statisticsMedia = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder device(java.util.List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public Builder account(java.util.List account) { + Utils.checkNotNull(account, "account"); + this.account = Optional.ofNullable(account); + return this; + } + + public Builder account(Optional> account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + public Builder statisticsMedia(java.util.List statisticsMedia) { + Utils.checkNotNull(statisticsMedia, "statisticsMedia"); + this.statisticsMedia = Optional.ofNullable(statisticsMedia); + return this; + } + + public Builder statisticsMedia(Optional> statisticsMedia) { + Utils.checkNotNull(statisticsMedia, "statisticsMedia"); + this.statisticsMedia = statisticsMedia; + return this; + } + + public GetStatisticsMediaContainer build() { + return new GetStatisticsMediaContainer( + size, + device, + account, + statisticsMedia); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequest.java new file mode 100644 index 00000000..ddaf9a6e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequest.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetStatisticsRequest { + + /** + * The timespan to retrieve statistics for + * the exact meaning of this parameter is not known + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=Timespan") + private Optional timespan; + + public GetStatisticsRequest( + Optional timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = timespan; + } + + /** + * The timespan to retrieve statistics for + * the exact meaning of this parameter is not known + * + */ + public Optional timespan() { + return timespan; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The timespan to retrieve statistics for + * the exact meaning of this parameter is not known + * + */ + public GetStatisticsRequest withTimespan(long timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = Optional.ofNullable(timespan); + return this; + } + + /** + * The timespan to retrieve statistics for + * the exact meaning of this parameter is not known + * + */ + public GetStatisticsRequest withTimespan(Optional timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = timespan; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStatisticsRequest other = (GetStatisticsRequest) o; + return + java.util.Objects.deepEquals(this.timespan, other.timespan); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + timespan); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsRequest.class, + "timespan", timespan); + } + + public final static class Builder { + + private Optional timespan = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The timespan to retrieve statistics for + * the exact meaning of this parameter is not known + * + */ + public Builder timespan(long timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = Optional.ofNullable(timespan); + return this; + } + + /** + * The timespan to retrieve statistics for + * the exact meaning of this parameter is not known + * + */ + public Builder timespan(Optional timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = timespan; + return this; + } + + public GetStatisticsRequest build() { + return new GetStatisticsRequest( + timespan); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequestBuilder.java new file mode 100644 index 00000000..08ae8146 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsRequestBuilder.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetStatisticsRequestBuilder { + + private Optional timespan = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetStatistics sdk; + + public GetStatisticsRequestBuilder(SDKMethodInterfaces.MethodCallGetStatistics sdk) { + this.sdk = sdk; + } + + public GetStatisticsRequestBuilder timespan(long timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = Optional.of(timespan); + return this; + } + + public GetStatisticsRequestBuilder timespan(Optional timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = timespan; + return this; + } + + public GetStatisticsResponse call() throws Exception { + + return sdk.getStatistics( + timespan); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponse.java new file mode 100644 index 00000000..fe6d7293 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetStatisticsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Media Statistics + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetStatisticsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Media Statistics + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetStatisticsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetStatisticsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetStatisticsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Media Statistics + */ + public GetStatisticsResponse withTwoHundredApplicationJsonObject(GetStatisticsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Media Statistics + */ + public GetStatisticsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetStatisticsResponse withFourHundredAndOneApplicationJsonObject(GetStatisticsStatisticsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetStatisticsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStatisticsResponse other = (GetStatisticsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Media Statistics + */ + public Builder twoHundredApplicationJsonObject(GetStatisticsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * Media Statistics + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetStatisticsStatisticsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetStatisticsResponse build() { + return new GetStatisticsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponseBody.java new file mode 100644 index 00000000..3f295f36 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetStatisticsResponseBody - Media Statistics + */ + +public class GetStatisticsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetStatisticsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetStatisticsResponseBody withMediaContainer(GetStatisticsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetStatisticsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStatisticsResponseBody other = (GetStatisticsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetStatisticsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetStatisticsResponseBody build() { + return new GetStatisticsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsStatisticsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsStatisticsResponseBody.java new file mode 100644 index 00000000..a3082e3b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetStatisticsStatisticsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetStatisticsStatisticsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetStatisticsStatisticsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetStatisticsStatisticsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetStatisticsStatisticsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetStatisticsStatisticsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStatisticsStatisticsResponseBody other = (GetStatisticsStatisticsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetStatisticsStatisticsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetStatisticsStatisticsResponseBody build() { + return new GetStatisticsStatisticsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineErrors.java new file mode 100644 index 00000000..21f014d5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTimelineErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetTimelineErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTimelineErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetTimelineErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetTimelineErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetTimelineErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetTimelineErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetTimelineErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTimelineErrors other = (GetTimelineErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTimelineErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetTimelineErrors build() { + return new GetTimelineErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequest.java new file mode 100644 index 00000000..14cdcc48 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequest.java @@ -0,0 +1,459 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTimelineRequest { + + /** + * The rating key of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=ratingKey") + private double ratingKey; + + /** + * The key of the media item to get the timeline for + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private String key; + + /** + * The state of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=state") + private State state; + + /** + * Whether the media item has MDE + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") + private double hasMDE; + + /** + * The time of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=time") + private double time; + + /** + * The duration of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=duration") + private double duration; + + /** + * The context of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=context") + private String context; + + /** + * The play queue item ID of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueItemID") + private double playQueueItemID; + + /** + * The playback time of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playBackTime") + private double playBackTime; + + /** + * The row of the media item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=row") + private double row; + + public GetTimelineRequest( + double ratingKey, + String key, + State state, + double hasMDE, + double time, + double duration, + String context, + double playQueueItemID, + double playBackTime, + double row) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(state, "state"); + Utils.checkNotNull(hasMDE, "hasMDE"); + Utils.checkNotNull(time, "time"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + Utils.checkNotNull(playBackTime, "playBackTime"); + Utils.checkNotNull(row, "row"); + this.ratingKey = ratingKey; + this.key = key; + this.state = state; + this.hasMDE = hasMDE; + this.time = time; + this.duration = duration; + this.context = context; + this.playQueueItemID = playQueueItemID; + this.playBackTime = playBackTime; + this.row = row; + } + + /** + * The rating key of the media item + */ + public double ratingKey() { + return ratingKey; + } + + /** + * The key of the media item to get the timeline for + */ + public String key() { + return key; + } + + /** + * The state of the media item + */ + public State state() { + return state; + } + + /** + * Whether the media item has MDE + */ + public double hasMDE() { + return hasMDE; + } + + /** + * The time of the media item + */ + public double time() { + return time; + } + + /** + * The duration of the media item + */ + public double duration() { + return duration; + } + + /** + * The context of the media item + */ + public String context() { + return context; + } + + /** + * The play queue item ID of the media item + */ + public double playQueueItemID() { + return playQueueItemID; + } + + /** + * The playback time of the media item + */ + public double playBackTime() { + return playBackTime; + } + + /** + * The row of the media item + */ + public double row() { + return row; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The rating key of the media item + */ + public GetTimelineRequest withRatingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The key of the media item to get the timeline for + */ + public GetTimelineRequest withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The state of the media item + */ + public GetTimelineRequest withState(State state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + /** + * Whether the media item has MDE + */ + public GetTimelineRequest withHasMDE(double hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * The time of the media item + */ + public GetTimelineRequest withTime(double time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + /** + * The duration of the media item + */ + public GetTimelineRequest withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * The context of the media item + */ + public GetTimelineRequest withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + /** + * The play queue item ID of the media item + */ + public GetTimelineRequest withPlayQueueItemID(double playQueueItemID) { + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + this.playQueueItemID = playQueueItemID; + return this; + } + + /** + * The playback time of the media item + */ + public GetTimelineRequest withPlayBackTime(double playBackTime) { + Utils.checkNotNull(playBackTime, "playBackTime"); + this.playBackTime = playBackTime; + return this; + } + + /** + * The row of the media item + */ + public GetTimelineRequest withRow(double row) { + Utils.checkNotNull(row, "row"); + this.row = row; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTimelineRequest other = (GetTimelineRequest) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.state, other.state) && + java.util.Objects.deepEquals(this.hasMDE, other.hasMDE) && + java.util.Objects.deepEquals(this.time, other.time) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.context, other.context) && + java.util.Objects.deepEquals(this.playQueueItemID, other.playQueueItemID) && + java.util.Objects.deepEquals(this.playBackTime, other.playBackTime) && + java.util.Objects.deepEquals(this.row, other.row); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + state, + hasMDE, + time, + duration, + context, + playQueueItemID, + playBackTime, + row); + } + + @Override + public String toString() { + return Utils.toString(GetTimelineRequest.class, + "ratingKey", ratingKey, + "key", key, + "state", state, + "hasMDE", hasMDE, + "time", time, + "duration", duration, + "context", context, + "playQueueItemID", playQueueItemID, + "playBackTime", playBackTime, + "row", row); + } + + public final static class Builder { + + private Double ratingKey; + + private String key; + + private State state; + + private Double hasMDE; + + private Double time; + + private Double duration; + + private String context; + + private Double playQueueItemID; + + private Double playBackTime; + + private Double row; + + private Builder() { + // force use of static builder() method + } + + /** + * The rating key of the media item + */ + public Builder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The key of the media item to get the timeline for + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The state of the media item + */ + public Builder state(State state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + /** + * Whether the media item has MDE + */ + public Builder hasMDE(double hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * The time of the media item + */ + public Builder time(double time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + /** + * The duration of the media item + */ + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * The context of the media item + */ + public Builder context(String context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + /** + * The play queue item ID of the media item + */ + public Builder playQueueItemID(double playQueueItemID) { + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + this.playQueueItemID = playQueueItemID; + return this; + } + + /** + * The playback time of the media item + */ + public Builder playBackTime(double playBackTime) { + Utils.checkNotNull(playBackTime, "playBackTime"); + this.playBackTime = playBackTime; + return this; + } + + /** + * The row of the media item + */ + public Builder row(double row) { + Utils.checkNotNull(row, "row"); + this.row = row; + return this; + } + + public GetTimelineRequest build() { + return new GetTimelineRequest( + ratingKey, + key, + state, + hasMDE, + time, + duration, + context, + playQueueItemID, + playBackTime, + row); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequestBuilder.java new file mode 100644 index 00000000..c5bd73bd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetTimelineRequestBuilder { + + private GetTimelineRequest request; + private final SDKMethodInterfaces.MethodCallGetTimeline sdk; + + public GetTimelineRequestBuilder(SDKMethodInterfaces.MethodCallGetTimeline sdk) { + this.sdk = sdk; + } + + public GetTimelineRequestBuilder request(GetTimelineRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetTimelineResponse call() throws Exception { + + return sdk.getTimeline( + request); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponse.java new file mode 100644 index 00000000..cdf4e6f5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTimelineResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public GetTimelineResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetTimelineResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTimelineResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTimelineResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetTimelineResponse withObject(GetTimelineResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetTimelineResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTimelineResponse other = (GetTimelineResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetTimelineResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(GetTimelineResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTimelineResponse build() { + return new GetTimelineResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponseBody.java new file mode 100644 index 00000000..d8c2070a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTimelineResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetTimelineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetTimelineResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetTimelineResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTimelineResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetTimelineResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTimelineResponseBody other = (GetTimelineResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetTimelineResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetTimelineResponseBody build() { + return new GetTimelineResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenErrors.java new file mode 100644 index 00000000..fa5048d1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTokenErrors { + + @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; + + public GetTokenErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTokenErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetTokenErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetTokenErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetTokenErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetTokenErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetTokenErrors 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; + } + GetTokenErrors other = (GetTokenErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTokenErrors.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(double 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(double 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 GetTokenErrors build() { + return new GetTokenErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequest.java new file mode 100644 index 00000000..42cd7b7d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequest.java @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTokenRequest { + + /** + * The PinID to retrieve an access token for + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=pinID") + private String pinID; + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private String xPlexClientIdentifier; + + public GetTokenRequest( + String pinID, + String xPlexClientIdentifier) { + Utils.checkNotNull(pinID, "pinID"); + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.pinID = pinID; + this.xPlexClientIdentifier = xPlexClientIdentifier; + } + + /** + * The PinID to retrieve an access token for + */ + public String pinID() { + return pinID; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public String xPlexClientIdentifier() { + return xPlexClientIdentifier; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The PinID to retrieve an access token for + */ + public GetTokenRequest withPinID(String pinID) { + Utils.checkNotNull(pinID, "pinID"); + this.pinID = pinID; + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public GetTokenRequest withXPlexClientIdentifier(String xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = xPlexClientIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTokenRequest other = (GetTokenRequest) o; + return + java.util.Objects.deepEquals(this.pinID, other.pinID) && + java.util.Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + pinID, + xPlexClientIdentifier); + } + + @Override + public String toString() { + return Utils.toString(GetTokenRequest.class, + "pinID", pinID, + "xPlexClientIdentifier", xPlexClientIdentifier); + } + + public final static class Builder { + + private String pinID; + + private String xPlexClientIdentifier; + + private Builder() { + // force use of static builder() method + } + + /** + * The PinID to retrieve an access token for + */ + public Builder pinID(String pinID) { + Utils.checkNotNull(pinID, "pinID"); + this.pinID = pinID; + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public Builder xPlexClientIdentifier(String xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = xPlexClientIdentifier; + return this; + } + + public GetTokenRequest build() { + return new GetTokenRequest( + pinID, + xPlexClientIdentifier); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequestBuilder.java new file mode 100644 index 00000000..e0412642 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenRequestBuilder.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetTokenRequestBuilder { + + private String pinID; + private String xPlexClientIdentifier; + private java.util.Optional serverURL = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetToken sdk; + + public GetTokenRequestBuilder(SDKMethodInterfaces.MethodCallGetToken sdk) { + this.sdk = sdk; + } + + public GetTokenRequestBuilder pinID(String pinID) { + Utils.checkNotNull(pinID, "pinID"); + this.pinID = pinID; + return this; + } + + public GetTokenRequestBuilder xPlexClientIdentifier(String xPlexClientIdentifier) { + Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + this.xPlexClientIdentifier = xPlexClientIdentifier; + return this; + } + + public GetTokenRequestBuilder serverURL(String serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = Optional.of(serverURL); + return this; + } + + public GetTokenRequestBuilder serverURL(java.util.Optional serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = serverURL; + return this; + } + + public GetTokenResponse call() throws Exception { + + return sdk.getToken( + pinID, + xPlexClientIdentifier, + serverURL); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponse.java new file mode 100644 index 00000000..5ca29199 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTokenResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * X-Plex-Client-Identifier is missing + */ + private Optional object; + + public GetTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public GetTokenResponse withObject(GetTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public GetTokenResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTokenResponse other = (GetTokenResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetTokenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public Builder object(GetTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * X-Plex-Client-Identifier is missing + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTokenResponse build() { + return new GetTokenResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponseBody.java new file mode 100644 index 00000000..8948bcd1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTokenResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetTokenResponseBody - X-Plex-Client-Identifier is missing + */ + +public class GetTokenResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetTokenResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTokenResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetTokenResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTokenResponseBody other = (GetTokenResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetTokenResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetTokenResponseBody build() { + return new GetTokenResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsErrors.java new file mode 100644 index 00000000..95086177 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTranscodeSessionsErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetTranscodeSessionsErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTranscodeSessionsErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetTranscodeSessionsErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetTranscodeSessionsErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetTranscodeSessionsErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetTranscodeSessionsErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetTranscodeSessionsErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTranscodeSessionsErrors other = (GetTranscodeSessionsErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTranscodeSessionsErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetTranscodeSessionsErrors build() { + return new GetTranscodeSessionsErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsMediaContainer.java new file mode 100644 index 00000000..3f80b141 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsMediaContainer.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTranscodeSessionsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("TranscodeSession") + private Optional> transcodeSession; + + public GetTranscodeSessionsMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("TranscodeSession") Optional> transcodeSession) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.size = size; + this.transcodeSession = transcodeSession; + } + + public Optional size() { + return size; + } + + public Optional> transcodeSession() { + return transcodeSession; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTranscodeSessionsMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetTranscodeSessionsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetTranscodeSessionsMediaContainer withTranscodeSession(java.util.List transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = Optional.ofNullable(transcodeSession); + return this; + } + + public GetTranscodeSessionsMediaContainer withTranscodeSession(Optional> transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = transcodeSession; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTranscodeSessionsMediaContainer other = (GetTranscodeSessionsMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.transcodeSession, other.transcodeSession); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + transcodeSession); + } + + @Override + public String toString() { + return Utils.toString(GetTranscodeSessionsMediaContainer.class, + "size", size, + "transcodeSession", transcodeSession); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional> transcodeSession = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder transcodeSession(java.util.List transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = Optional.ofNullable(transcodeSession); + return this; + } + + public Builder transcodeSession(Optional> transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = transcodeSession; + return this; + } + + public GetTranscodeSessionsMediaContainer build() { + return new GetTranscodeSessionsMediaContainer( + size, + transcodeSession); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsRequestBuilder.java new file mode 100644 index 00000000..6df6e42b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetTranscodeSessionsRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetTranscodeSessions sdk; + + public GetTranscodeSessionsRequestBuilder(SDKMethodInterfaces.MethodCallGetTranscodeSessions sdk) { + this.sdk = sdk; + } + + public GetTranscodeSessionsResponse call() throws Exception { + + return sdk.getTranscodeSessionsDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponse.java new file mode 100644 index 00000000..65eb5cda --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTranscodeSessionsResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The Transcode Sessions + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetTranscodeSessionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The Transcode Sessions + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetTranscodeSessionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTranscodeSessionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTranscodeSessionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Transcode Sessions + */ + public GetTranscodeSessionsResponse withTwoHundredApplicationJsonObject(GetTranscodeSessionsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Transcode Sessions + */ + public GetTranscodeSessionsResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetTranscodeSessionsResponse withFourHundredAndOneApplicationJsonObject(GetTranscodeSessionsSessionsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetTranscodeSessionsResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTranscodeSessionsResponse other = (GetTranscodeSessionsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetTranscodeSessionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Transcode Sessions + */ + public Builder twoHundredApplicationJsonObject(GetTranscodeSessionsResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Transcode Sessions + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetTranscodeSessionsSessionsResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetTranscodeSessionsResponse build() { + return new GetTranscodeSessionsResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponseBody.java new file mode 100644 index 00000000..5300658e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetTranscodeSessionsResponseBody - The Transcode Sessions + */ + +public class GetTranscodeSessionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetTranscodeSessionsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTranscodeSessionsResponseBody withMediaContainer(GetTranscodeSessionsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetTranscodeSessionsResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTranscodeSessionsResponseBody other = (GetTranscodeSessionsResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetTranscodeSessionsResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetTranscodeSessionsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetTranscodeSessionsResponseBody build() { + return new GetTranscodeSessionsResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsSessionsResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsSessionsResponseBody.java new file mode 100644 index 00000000..d535fc76 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTranscodeSessionsSessionsResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetTranscodeSessionsSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetTranscodeSessionsSessionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetTranscodeSessionsSessionsResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTranscodeSessionsSessionsResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetTranscodeSessionsSessionsResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTranscodeSessionsSessionsResponseBody other = (GetTranscodeSessionsSessionsResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetTranscodeSessionsSessionsResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetTranscodeSessionsSessionsResponseBody build() { + return new GetTranscodeSessionsSessionsResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenErrors.java new file mode 100644 index 00000000..43b2e649 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTransientTokenErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetTransientTokenErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTransientTokenErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetTransientTokenErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetTransientTokenErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetTransientTokenErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetTransientTokenErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetTransientTokenErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransientTokenErrors other = (GetTransientTokenErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetTransientTokenErrors build() { + return new GetTransientTokenErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenQueryParamType.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenQueryParamType.java new file mode 100644 index 00000000..7dbc9fe5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenQueryParamType.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetTransientTokenQueryParamType - `delegation` - This is the only supported `type` parameter. + */ +public enum GetTransientTokenQueryParamType { + DELEGATION("delegation"); + + @JsonValue + private final String value; + + private GetTransientTokenQueryParamType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequest.java new file mode 100644 index 00000000..448538a3 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequest.java @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTransientTokenRequest { + + /** + * `delegation` - This is the only supported `type` parameter. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private GetTransientTokenQueryParamType type; + + /** + * `all` - This is the only supported `scope` parameter. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=scope") + private Scope scope; + + public GetTransientTokenRequest( + GetTransientTokenQueryParamType type, + Scope scope) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(scope, "scope"); + this.type = type; + this.scope = scope; + } + + /** + * `delegation` - This is the only supported `type` parameter. + */ + public GetTransientTokenQueryParamType type() { + return type; + } + + /** + * `all` - This is the only supported `scope` parameter. + */ + public Scope scope() { + return scope; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * `delegation` - This is the only supported `type` parameter. + */ + public GetTransientTokenRequest withType(GetTransientTokenQueryParamType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * `all` - This is the only supported `scope` parameter. + */ + public GetTransientTokenRequest withScope(Scope scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = scope; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransientTokenRequest other = (GetTransientTokenRequest) o; + return + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.scope, other.scope); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + type, + scope); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenRequest.class, + "type", type, + "scope", scope); + } + + public final static class Builder { + + private GetTransientTokenQueryParamType type; + + private Scope scope; + + private Builder() { + // force use of static builder() method + } + + /** + * `delegation` - This is the only supported `type` parameter. + */ + public Builder type(GetTransientTokenQueryParamType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * `all` - This is the only supported `scope` parameter. + */ + public Builder scope(Scope scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = scope; + return this; + } + + public GetTransientTokenRequest build() { + return new GetTransientTokenRequest( + type, + scope); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequestBuilder.java new file mode 100644 index 00000000..3c7a3ae2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetTransientTokenRequestBuilder { + + private GetTransientTokenQueryParamType type; + private Scope scope; + private final SDKMethodInterfaces.MethodCallGetTransientToken sdk; + + public GetTransientTokenRequestBuilder(SDKMethodInterfaces.MethodCallGetTransientToken sdk) { + this.sdk = sdk; + } + + public GetTransientTokenRequestBuilder type(GetTransientTokenQueryParamType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetTransientTokenRequestBuilder scope(Scope scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = scope; + return this; + } + + public GetTransientTokenResponse call() throws Exception { + + return sdk.getTransientToken( + type, + scope); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponse.java new file mode 100644 index 00000000..e9406f7e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetTransientTokenResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public GetTransientTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetTransientTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTransientTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTransientTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetTransientTokenResponse withObject(GetTransientTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetTransientTokenResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransientTokenResponse other = (GetTransientTokenResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(GetTransientTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTransientTokenResponse build() { + return new GetTransientTokenResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponseBody.java new file mode 100644 index 00000000..3e17a193 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetTransientTokenResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetTransientTokenResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetTransientTokenResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetTransientTokenResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTransientTokenResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetTransientTokenResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransientTokenResponseBody other = (GetTransientTokenResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetTransientTokenResponseBody build() { + return new GetTransientTokenResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusErrors.java new file mode 100644 index 00000000..f0dd4a4a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetUpdateStatusErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public GetUpdateStatusErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetUpdateStatusErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public GetUpdateStatusErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public GetUpdateStatusErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public GetUpdateStatusErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public GetUpdateStatusErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetUpdateStatusErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUpdateStatusErrors other = (GetUpdateStatusErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(GetUpdateStatusErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetUpdateStatusErrors build() { + return new GetUpdateStatusErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusMediaContainer.java new file mode 100644 index 00000000..79400095 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusMediaContainer.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetUpdateStatusMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("canInstall") + private Optional canInstall; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("checkedAt") + private Optional checkedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("downloadURL") + private Optional downloadURL; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Release") + private Optional> release; + + public GetUpdateStatusMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("canInstall") Optional canInstall, + @JsonProperty("checkedAt") Optional checkedAt, + @JsonProperty("downloadURL") Optional downloadURL, + @JsonProperty("status") Optional status, + @JsonProperty("Release") Optional> release) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(canInstall, "canInstall"); + Utils.checkNotNull(checkedAt, "checkedAt"); + Utils.checkNotNull(downloadURL, "downloadURL"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(release, "release"); + this.size = size; + this.canInstall = canInstall; + this.checkedAt = checkedAt; + this.downloadURL = downloadURL; + this.status = status; + this.release = release; + } + + public Optional size() { + return size; + } + + public Optional canInstall() { + return canInstall; + } + + public Optional checkedAt() { + return checkedAt; + } + + public Optional downloadURL() { + return downloadURL; + } + + public Optional status() { + return status; + } + + public Optional> release() { + return release; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetUpdateStatusMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetUpdateStatusMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetUpdateStatusMediaContainer withCanInstall(boolean canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = Optional.ofNullable(canInstall); + return this; + } + + public GetUpdateStatusMediaContainer withCanInstall(Optional canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = canInstall; + return this; + } + + public GetUpdateStatusMediaContainer withCheckedAt(int checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = Optional.ofNullable(checkedAt); + return this; + } + + public GetUpdateStatusMediaContainer withCheckedAt(Optional checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = checkedAt; + return this; + } + + public GetUpdateStatusMediaContainer withDownloadURL(String downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = Optional.ofNullable(downloadURL); + return this; + } + + public GetUpdateStatusMediaContainer withDownloadURL(Optional downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = downloadURL; + return this; + } + + public GetUpdateStatusMediaContainer withStatus(int status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public GetUpdateStatusMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetUpdateStatusMediaContainer withRelease(java.util.List release) { + Utils.checkNotNull(release, "release"); + this.release = Optional.ofNullable(release); + return this; + } + + public GetUpdateStatusMediaContainer withRelease(Optional> release) { + Utils.checkNotNull(release, "release"); + this.release = release; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUpdateStatusMediaContainer other = (GetUpdateStatusMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.canInstall, other.canInstall) && + java.util.Objects.deepEquals(this.checkedAt, other.checkedAt) && + java.util.Objects.deepEquals(this.downloadURL, other.downloadURL) && + java.util.Objects.deepEquals(this.status, other.status) && + java.util.Objects.deepEquals(this.release, other.release); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + canInstall, + checkedAt, + downloadURL, + status, + release); + } + + @Override + public String toString() { + return Utils.toString(GetUpdateStatusMediaContainer.class, + "size", size, + "canInstall", canInstall, + "checkedAt", checkedAt, + "downloadURL", downloadURL, + "status", status, + "release", release); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional canInstall = Optional.empty(); + + private Optional checkedAt = Optional.empty(); + + private Optional downloadURL = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional> release = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder canInstall(boolean canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = Optional.ofNullable(canInstall); + return this; + } + + public Builder canInstall(Optional canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = canInstall; + return this; + } + + public Builder checkedAt(int checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = Optional.ofNullable(checkedAt); + return this; + } + + public Builder checkedAt(Optional checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = checkedAt; + return this; + } + + public Builder downloadURL(String downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = Optional.ofNullable(downloadURL); + return this; + } + + public Builder downloadURL(Optional downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = downloadURL; + return this; + } + + public Builder status(int status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public Builder release(java.util.List release) { + Utils.checkNotNull(release, "release"); + this.release = Optional.ofNullable(release); + return this; + } + + public Builder release(Optional> release) { + Utils.checkNotNull(release, "release"); + this.release = release; + return this; + } + + public GetUpdateStatusMediaContainer build() { + return new GetUpdateStatusMediaContainer( + size, + canInstall, + checkedAt, + downloadURL, + status, + release); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusRequestBuilder.java new file mode 100644 index 00000000..ee14c429 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetUpdateStatusRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetUpdateStatus sdk; + + public GetUpdateStatusRequestBuilder(SDKMethodInterfaces.MethodCallGetUpdateStatus sdk) { + this.sdk = sdk; + } + + public GetUpdateStatusResponse call() throws Exception { + + return sdk.getUpdateStatusDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponse.java new file mode 100644 index 00000000..8823a90e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponse.java @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class GetUpdateStatusResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The Server Updates + */ + private Optional twoHundredApplicationJsonObject; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional fourHundredAndOneApplicationJsonObject; + + public GetUpdateStatusResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredApplicationJsonObject, + Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The Server Updates + */ + public Optional twoHundredApplicationJsonObject() { + return twoHundredApplicationJsonObject; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional fourHundredAndOneApplicationJsonObject() { + return fourHundredAndOneApplicationJsonObject; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetUpdateStatusResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetUpdateStatusResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetUpdateStatusResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Updates + */ + public GetUpdateStatusResponse withTwoHundredApplicationJsonObject(GetUpdateStatusResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Updates + */ + public GetUpdateStatusResponse withTwoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetUpdateStatusResponse withFourHundredAndOneApplicationJsonObject(GetUpdateStatusUpdaterResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public GetUpdateStatusResponse withFourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUpdateStatusResponse other = (GetUpdateStatusResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.twoHundredApplicationJsonObject, other.twoHundredApplicationJsonObject) && + java.util.Objects.deepEquals(this.fourHundredAndOneApplicationJsonObject, other.fourHundredAndOneApplicationJsonObject); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + + @Override + public String toString() { + return Utils.toString(GetUpdateStatusResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredApplicationJsonObject", twoHundredApplicationJsonObject, + "fourHundredAndOneApplicationJsonObject", fourHundredAndOneApplicationJsonObject); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredApplicationJsonObject = Optional.empty(); + + private Optional fourHundredAndOneApplicationJsonObject = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The Server Updates + */ + public Builder twoHundredApplicationJsonObject(GetUpdateStatusResponseBody twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = Optional.ofNullable(twoHundredApplicationJsonObject); + return this; + } + + /** + * The Server Updates + */ + public Builder twoHundredApplicationJsonObject(Optional twoHundredApplicationJsonObject) { + Utils.checkNotNull(twoHundredApplicationJsonObject, "twoHundredApplicationJsonObject"); + this.twoHundredApplicationJsonObject = twoHundredApplicationJsonObject; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(GetUpdateStatusUpdaterResponseBody fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = Optional.ofNullable(fourHundredAndOneApplicationJsonObject); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder fourHundredAndOneApplicationJsonObject(Optional fourHundredAndOneApplicationJsonObject) { + Utils.checkNotNull(fourHundredAndOneApplicationJsonObject, "fourHundredAndOneApplicationJsonObject"); + this.fourHundredAndOneApplicationJsonObject = fourHundredAndOneApplicationJsonObject; + return this; + } + + public GetUpdateStatusResponse build() { + return new GetUpdateStatusResponse( + contentType, + statusCode, + rawResponse, + twoHundredApplicationJsonObject, + fourHundredAndOneApplicationJsonObject); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponseBody.java new file mode 100644 index 00000000..96c168dc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetUpdateStatusResponseBody - The Server Updates + */ + +public class GetUpdateStatusResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public GetUpdateStatusResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetUpdateStatusResponseBody withMediaContainer(GetUpdateStatusMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetUpdateStatusResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUpdateStatusResponseBody other = (GetUpdateStatusResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetUpdateStatusResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetUpdateStatusMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetUpdateStatusResponseBody build() { + return new GetUpdateStatusResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusUpdaterResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusUpdaterResponseBody.java new file mode 100644 index 00000000..391ba3a8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/GetUpdateStatusUpdaterResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * GetUpdateStatusUpdaterResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class GetUpdateStatusUpdaterResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public GetUpdateStatusUpdaterResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetUpdateStatusUpdaterResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public GetUpdateStatusUpdaterResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUpdateStatusUpdaterResponseBody other = (GetUpdateStatusUpdaterResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(GetUpdateStatusUpdaterResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public GetUpdateStatusUpdaterResponseBody build() { + return new GetUpdateStatusUpdaterResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Guids.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Guids.java new file mode 100644 index 00000000..663269c7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Guids.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Guids { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + public Guids( + @JsonProperty("id") Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + } + + public Optional id() { + return id; + } + + public final static Builder builder() { + return new Builder(); + } + + public Guids withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Guids withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Guids other = (Guids) o; + return + java.util.Objects.deepEquals(this.id, other.id); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id); + } + + @Override + public String toString() { + return Utils.toString(Guids.class, + "id", id); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Guids build() { + return new Guids( + id); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Hub.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Hub.java new file mode 100644 index 00000000..e7e4ad42 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Hub.java @@ -0,0 +1,513 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Hub { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubKey") + private Optional hubKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubIdentifier") + private Optional hubIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("more") + private Optional more; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("style") + private Optional style; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promoted") + private Optional promoted; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public Hub( + @JsonProperty("hubKey") Optional hubKey, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("hubIdentifier") Optional hubIdentifier, + @JsonProperty("context") Optional context, + @JsonProperty("size") Optional size, + @JsonProperty("more") Optional more, + @JsonProperty("style") Optional style, + @JsonProperty("promoted") Optional promoted, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(hubKey, "hubKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(more, "more"); + Utils.checkNotNull(style, "style"); + Utils.checkNotNull(promoted, "promoted"); + Utils.checkNotNull(metadata, "metadata"); + this.hubKey = hubKey; + this.key = key; + this.title = title; + this.type = type; + this.hubIdentifier = hubIdentifier; + this.context = context; + this.size = size; + this.more = more; + this.style = style; + this.promoted = promoted; + this.metadata = metadata; + } + + public Optional hubKey() { + return hubKey; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public Optional type() { + return type; + } + + public Optional hubIdentifier() { + return hubIdentifier; + } + + public Optional context() { + return context; + } + + public Optional size() { + return size; + } + + public Optional more() { + return more; + } + + public Optional style() { + return style; + } + + public Optional promoted() { + return promoted; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public Hub withHubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + public Hub withHubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + public Hub withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Hub withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Hub withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Hub withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Hub withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Hub withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Hub withHubIdentifier(String hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = Optional.ofNullable(hubIdentifier); + return this; + } + + public Hub withHubIdentifier(Optional hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = hubIdentifier; + return this; + } + + public Hub withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Hub withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public Hub withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Hub withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Hub withMore(boolean more) { + Utils.checkNotNull(more, "more"); + this.more = Optional.ofNullable(more); + return this; + } + + public Hub withMore(Optional more) { + Utils.checkNotNull(more, "more"); + this.more = more; + return this; + } + + public Hub withStyle(String style) { + Utils.checkNotNull(style, "style"); + this.style = Optional.ofNullable(style); + return this; + } + + public Hub withStyle(Optional style) { + Utils.checkNotNull(style, "style"); + this.style = style; + return this; + } + + public Hub withPromoted(boolean promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = Optional.ofNullable(promoted); + return this; + } + + public Hub withPromoted(Optional promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = promoted; + return this; + } + + public Hub withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Hub withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Hub other = (Hub) o; + return + java.util.Objects.deepEquals(this.hubKey, other.hubKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.hubIdentifier, other.hubIdentifier) && + java.util.Objects.deepEquals(this.context, other.context) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.more, other.more) && + java.util.Objects.deepEquals(this.style, other.style) && + java.util.Objects.deepEquals(this.promoted, other.promoted) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + hubKey, + key, + title, + type, + hubIdentifier, + context, + size, + more, + style, + promoted, + metadata); + } + + @Override + public String toString() { + return Utils.toString(Hub.class, + "hubKey", hubKey, + "key", key, + "title", title, + "type", type, + "hubIdentifier", hubIdentifier, + "context", context, + "size", size, + "more", more, + "style", style, + "promoted", promoted, + "metadata", metadata); + } + + public final static class Builder { + + private Optional hubKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional hubIdentifier = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional more = Optional.empty(); + + private Optional style = Optional.empty(); + + private Optional promoted = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder hubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + public Builder hubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder hubIdentifier(String hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = Optional.ofNullable(hubIdentifier); + return this; + } + + public Builder hubIdentifier(Optional hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = hubIdentifier; + return this; + } + + public Builder context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder more(boolean more) { + Utils.checkNotNull(more, "more"); + this.more = Optional.ofNullable(more); + return this; + } + + public Builder more(Optional more) { + Utils.checkNotNull(more, "more"); + this.more = more; + return this; + } + + public Builder style(String style) { + Utils.checkNotNull(style, "style"); + this.style = Optional.ofNullable(style); + return this; + } + + public Builder style(Optional style) { + Utils.checkNotNull(style, "style"); + this.style = style; + return this; + } + + public Builder promoted(boolean promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = Optional.ofNullable(promoted); + return this; + } + + public Builder promoted(Optional promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = promoted; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public Hub build() { + return new Hub( + hubKey, + key, + title, + type, + hubIdentifier, + context, + size, + more, + style, + promoted, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/IncludeDetails.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/IncludeDetails.java new file mode 100644 index 00000000..5e2fe550 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/IncludeDetails.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * IncludeDetails - Whether or not to include details for a section (types, filters, and sorts). + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ +public enum IncludeDetails { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private IncludeDetails(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Level.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Level.java new file mode 100644 index 00000000..d800ef43 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Level.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Level - An integer log level to write to the PMS log with. + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + * + */ +public enum Level { + ZERO(0L), + ONE(1L), + TWO(2L), + THREE(3L), + FOUR(4L); + + @JsonValue + private final long value; + + private Level(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Location.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Location.java new file mode 100644 index 00000000..36823c45 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Location.java @@ -0,0 +1,472 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Location { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("european_union_member") + private Optional europeanUnionMember; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("continent_code") + private Optional continentCode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("country") + private Optional country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("city") + private Optional city; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("time_zone") + private Optional timeZone; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("postal_code") + private Optional postalCode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("in_privacy_restricted_country") + private Optional inPrivacyRestrictedCountry; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subdivisions") + private Optional subdivisions; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("coordinates") + private Optional coordinates; + + public Location( + @JsonProperty("code") Optional code, + @JsonProperty("european_union_member") Optional europeanUnionMember, + @JsonProperty("continent_code") Optional continentCode, + @JsonProperty("country") Optional country, + @JsonProperty("city") Optional city, + @JsonProperty("time_zone") Optional timeZone, + @JsonProperty("postal_code") Optional postalCode, + @JsonProperty("in_privacy_restricted_country") Optional inPrivacyRestrictedCountry, + @JsonProperty("subdivisions") Optional subdivisions, + @JsonProperty("coordinates") Optional coordinates) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); + Utils.checkNotNull(continentCode, "continentCode"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(city, "city"); + Utils.checkNotNull(timeZone, "timeZone"); + Utils.checkNotNull(postalCode, "postalCode"); + Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); + Utils.checkNotNull(subdivisions, "subdivisions"); + Utils.checkNotNull(coordinates, "coordinates"); + this.code = code; + this.europeanUnionMember = europeanUnionMember; + this.continentCode = continentCode; + this.country = country; + this.city = city; + this.timeZone = timeZone; + this.postalCode = postalCode; + this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; + this.subdivisions = subdivisions; + this.coordinates = coordinates; + } + + public Optional code() { + return code; + } + + public Optional europeanUnionMember() { + return europeanUnionMember; + } + + public Optional continentCode() { + return continentCode; + } + + public Optional country() { + return country; + } + + public Optional city() { + return city; + } + + public Optional timeZone() { + return timeZone; + } + + public Optional postalCode() { + return postalCode; + } + + public Optional inPrivacyRestrictedCountry() { + return inPrivacyRestrictedCountry; + } + + public Optional subdivisions() { + return subdivisions; + } + + public Optional coordinates() { + return coordinates; + } + + public final static Builder builder() { + return new Builder(); + } + + public Location withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public Location withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public Location withEuropeanUnionMember(boolean europeanUnionMember) { + Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); + this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); + return this; + } + + public Location withEuropeanUnionMember(Optional europeanUnionMember) { + Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); + this.europeanUnionMember = europeanUnionMember; + return this; + } + + public Location withContinentCode(String continentCode) { + Utils.checkNotNull(continentCode, "continentCode"); + this.continentCode = Optional.ofNullable(continentCode); + return this; + } + + public Location withContinentCode(Optional continentCode) { + Utils.checkNotNull(continentCode, "continentCode"); + this.continentCode = continentCode; + return this; + } + + public Location withCountry(String country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Location withCountry(Optional country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Location withCity(String city) { + Utils.checkNotNull(city, "city"); + this.city = Optional.ofNullable(city); + return this; + } + + public Location withCity(Optional city) { + Utils.checkNotNull(city, "city"); + this.city = city; + return this; + } + + public Location withTimeZone(String timeZone) { + Utils.checkNotNull(timeZone, "timeZone"); + this.timeZone = Optional.ofNullable(timeZone); + return this; + } + + public Location withTimeZone(Optional timeZone) { + Utils.checkNotNull(timeZone, "timeZone"); + this.timeZone = timeZone; + return this; + } + + public Location withPostalCode(double postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = Optional.ofNullable(postalCode); + return this; + } + + public Location withPostalCode(Optional postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = postalCode; + return this; + } + + public Location withInPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { + Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); + this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); + return this; + } + + public Location withInPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { + Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); + this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; + return this; + } + + public Location withSubdivisions(String subdivisions) { + Utils.checkNotNull(subdivisions, "subdivisions"); + this.subdivisions = Optional.ofNullable(subdivisions); + return this; + } + + public Location withSubdivisions(Optional subdivisions) { + Utils.checkNotNull(subdivisions, "subdivisions"); + this.subdivisions = subdivisions; + return this; + } + + public Location withCoordinates(String coordinates) { + Utils.checkNotNull(coordinates, "coordinates"); + this.coordinates = Optional.ofNullable(coordinates); + return this; + } + + public Location withCoordinates(Optional coordinates) { + Utils.checkNotNull(coordinates, "coordinates"); + this.coordinates = coordinates; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Location other = (Location) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.europeanUnionMember, other.europeanUnionMember) && + java.util.Objects.deepEquals(this.continentCode, other.continentCode) && + java.util.Objects.deepEquals(this.country, other.country) && + java.util.Objects.deepEquals(this.city, other.city) && + java.util.Objects.deepEquals(this.timeZone, other.timeZone) && + java.util.Objects.deepEquals(this.postalCode, other.postalCode) && + java.util.Objects.deepEquals(this.inPrivacyRestrictedCountry, other.inPrivacyRestrictedCountry) && + java.util.Objects.deepEquals(this.subdivisions, other.subdivisions) && + java.util.Objects.deepEquals(this.coordinates, other.coordinates); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + europeanUnionMember, + continentCode, + country, + city, + timeZone, + postalCode, + inPrivacyRestrictedCountry, + subdivisions, + coordinates); + } + + @Override + public String toString() { + return Utils.toString(Location.class, + "code", code, + "europeanUnionMember", europeanUnionMember, + "continentCode", continentCode, + "country", country, + "city", city, + "timeZone", timeZone, + "postalCode", postalCode, + "inPrivacyRestrictedCountry", inPrivacyRestrictedCountry, + "subdivisions", subdivisions, + "coordinates", coordinates); + } + + public final static class Builder { + + private Optional code = Optional.empty(); + + private Optional europeanUnionMember = Optional.empty(); + + private Optional continentCode = Optional.empty(); + + private Optional country = Optional.empty(); + + private Optional city = Optional.empty(); + + private Optional timeZone = Optional.empty(); + + private Optional postalCode = Optional.empty(); + + private Optional inPrivacyRestrictedCountry = Optional.empty(); + + private Optional subdivisions = Optional.empty(); + + private Optional coordinates = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder code(String 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 europeanUnionMember(boolean europeanUnionMember) { + Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); + this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); + return this; + } + + public Builder europeanUnionMember(Optional europeanUnionMember) { + Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); + this.europeanUnionMember = europeanUnionMember; + return this; + } + + public Builder continentCode(String continentCode) { + Utils.checkNotNull(continentCode, "continentCode"); + this.continentCode = Optional.ofNullable(continentCode); + return this; + } + + public Builder continentCode(Optional continentCode) { + Utils.checkNotNull(continentCode, "continentCode"); + this.continentCode = continentCode; + return this; + } + + public Builder country(String country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder city(String city) { + Utils.checkNotNull(city, "city"); + this.city = Optional.ofNullable(city); + return this; + } + + public Builder city(Optional city) { + Utils.checkNotNull(city, "city"); + this.city = city; + return this; + } + + public Builder timeZone(String timeZone) { + Utils.checkNotNull(timeZone, "timeZone"); + this.timeZone = Optional.ofNullable(timeZone); + return this; + } + + public Builder timeZone(Optional timeZone) { + Utils.checkNotNull(timeZone, "timeZone"); + this.timeZone = timeZone; + return this; + } + + public Builder postalCode(double postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = Optional.ofNullable(postalCode); + return this; + } + + public Builder postalCode(Optional postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = postalCode; + return this; + } + + public Builder inPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { + Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); + this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); + return this; + } + + public Builder inPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { + Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); + this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; + return this; + } + + public Builder subdivisions(String subdivisions) { + Utils.checkNotNull(subdivisions, "subdivisions"); + this.subdivisions = Optional.ofNullable(subdivisions); + return this; + } + + public Builder subdivisions(Optional subdivisions) { + Utils.checkNotNull(subdivisions, "subdivisions"); + this.subdivisions = subdivisions; + return this; + } + + public Builder coordinates(String coordinates) { + Utils.checkNotNull(coordinates, "coordinates"); + this.coordinates = Optional.ofNullable(coordinates); + return this; + } + + public Builder coordinates(Optional coordinates) { + Utils.checkNotNull(coordinates, "coordinates"); + this.coordinates = coordinates; + return this; + } + + public Location build() { + return new Location( + code, + europeanUnionMember, + continentCode, + country, + city, + timeZone, + postalCode, + inPrivacyRestrictedCountry, + subdivisions, + coordinates); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineErrors.java new file mode 100644 index 00000000..3acd3093 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class LogLineErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public LogLineErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public LogLineErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public LogLineErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public LogLineErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public LogLineErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public LogLineErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public LogLineErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogLineErrors other = (LogLineErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(LogLineErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public LogLineErrors build() { + return new LogLineErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequest.java new file mode 100644 index 00000000..194e3490 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequest.java @@ -0,0 +1,203 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class LogLineRequest { + + /** + * An integer log level to write to the PMS log with. + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=level") + private Level level; + + /** + * The text of the message to write to the log. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=message") + private String message; + + /** + * a string indicating the source of the message. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=source") + private String source; + + public LogLineRequest( + Level level, + String message, + String source) { + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(source, "source"); + this.level = level; + this.message = message; + this.source = source; + } + + /** + * An integer log level to write to the PMS log with. + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + * + */ + public Level level() { + return level; + } + + /** + * The text of the message to write to the log. + */ + public String message() { + return message; + } + + /** + * a string indicating the source of the message. + */ + public String source() { + return source; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * An integer log level to write to the PMS log with. + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + * + */ + public LogLineRequest withLevel(Level level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + /** + * The text of the message to write to the log. + */ + public LogLineRequest withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + /** + * a string indicating the source of the message. + */ + public LogLineRequest withSource(String source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogLineRequest other = (LogLineRequest) o; + return + java.util.Objects.deepEquals(this.level, other.level) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.source, other.source); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + level, + message, + source); + } + + @Override + public String toString() { + return Utils.toString(LogLineRequest.class, + "level", level, + "message", message, + "source", source); + } + + public final static class Builder { + + private Level level; + + private String message; + + private String source; + + private Builder() { + // force use of static builder() method + } + + /** + * An integer log level to write to the PMS log with. + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + * + */ + public Builder level(Level level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + /** + * The text of the message to write to the log. + */ + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + /** + * a string indicating the source of the message. + */ + public Builder source(String source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + public LogLineRequest build() { + return new LogLineRequest( + level, + message, + source); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequestBuilder.java new file mode 100644 index 00000000..16198538 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class LogLineRequestBuilder { + + private Level level; + private String message; + private String source; + private final SDKMethodInterfaces.MethodCallLogLine sdk; + + public LogLineRequestBuilder(SDKMethodInterfaces.MethodCallLogLine sdk) { + this.sdk = sdk; + } + + public LogLineRequestBuilder level(Level level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public LogLineRequestBuilder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public LogLineRequestBuilder source(String source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + public LogLineResponse call() throws Exception { + + return sdk.logLine( + level, + message, + source); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponse.java new file mode 100644 index 00000000..e586823b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class LogLineResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public LogLineResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public LogLineResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public LogLineResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public LogLineResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public LogLineResponse withObject(LogLineResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public LogLineResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogLineResponse other = (LogLineResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(LogLineResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(LogLineResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public LogLineResponse build() { + return new LogLineResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponseBody.java new file mode 100644 index 00000000..eccf5bef --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogLineResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * LogLineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class LogLineResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public LogLineResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public LogLineResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public LogLineResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogLineResponseBody other = (LogLineResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(LogLineResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public LogLineResponseBody build() { + return new LogLineResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineErrors.java new file mode 100644 index 00000000..6821c688 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class LogMultiLineErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public LogMultiLineErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public LogMultiLineErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public LogMultiLineErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public LogMultiLineErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public LogMultiLineErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public LogMultiLineErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public LogMultiLineErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogMultiLineErrors other = (LogMultiLineErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(LogMultiLineErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public LogMultiLineErrors build() { + return new LogMultiLineErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineRequestBuilder.java new file mode 100644 index 00000000..7cfec9d1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class LogMultiLineRequestBuilder { + + private String request; + private final SDKMethodInterfaces.MethodCallLogMultiLine sdk; + + public LogMultiLineRequestBuilder(SDKMethodInterfaces.MethodCallLogMultiLine sdk) { + this.sdk = sdk; + } + + public LogMultiLineRequestBuilder request(String request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public LogMultiLineResponse call() throws Exception { + + return sdk.logMultiLine( + request); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponse.java new file mode 100644 index 00000000..414d14cc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class LogMultiLineResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public LogMultiLineResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public LogMultiLineResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public LogMultiLineResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public LogMultiLineResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public LogMultiLineResponse withObject(LogMultiLineResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public LogMultiLineResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogMultiLineResponse other = (LogMultiLineResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(LogMultiLineResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(LogMultiLineResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public LogMultiLineResponse build() { + return new LogMultiLineResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponseBody.java new file mode 100644 index 00000000..1822a872 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/LogMultiLineResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * LogMultiLineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class LogMultiLineResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public LogMultiLineResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public LogMultiLineResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public LogMultiLineResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogMultiLineResponseBody other = (LogMultiLineResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(LogMultiLineResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public LogMultiLineResponseBody build() { + return new LogMultiLineResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedErrors.java new file mode 100644 index 00000000..633f574b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MarkPlayedErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public MarkPlayedErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public MarkPlayedErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public MarkPlayedErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public MarkPlayedErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public MarkPlayedErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public MarkPlayedErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public MarkPlayedErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkPlayedErrors other = (MarkPlayedErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(MarkPlayedErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public MarkPlayedErrors build() { + return new MarkPlayedErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequest.java new file mode 100644 index 00000000..e476c765 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MarkPlayedRequest { + + /** + * The media key to mark as played + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private double key; + + public MarkPlayedRequest( + double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + } + + /** + * The media key to mark as played + */ + public double key() { + return key; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The media key to mark as played + */ + public MarkPlayedRequest withKey(double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkPlayedRequest other = (MarkPlayedRequest) o; + return + java.util.Objects.deepEquals(this.key, other.key); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key); + } + + @Override + public String toString() { + return Utils.toString(MarkPlayedRequest.class, + "key", key); + } + + public final static class Builder { + + private Double key; + + private Builder() { + // force use of static builder() method + } + + /** + * The media key to mark as played + */ + public Builder key(double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MarkPlayedRequest build() { + return new MarkPlayedRequest( + key); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequestBuilder.java new file mode 100644 index 00000000..c5655263 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class MarkPlayedRequestBuilder { + + private Double key; + private final SDKMethodInterfaces.MethodCallMarkPlayed sdk; + + public MarkPlayedRequestBuilder(SDKMethodInterfaces.MethodCallMarkPlayed sdk) { + this.sdk = sdk; + } + + public MarkPlayedRequestBuilder key(double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MarkPlayedResponse call() throws Exception { + + return sdk.markPlayed( + key); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponse.java new file mode 100644 index 00000000..7e1fb4a4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MarkPlayedResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public MarkPlayedResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public MarkPlayedResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MarkPlayedResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MarkPlayedResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public MarkPlayedResponse withObject(MarkPlayedResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public MarkPlayedResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkPlayedResponse other = (MarkPlayedResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(MarkPlayedResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(MarkPlayedResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public MarkPlayedResponse build() { + return new MarkPlayedResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponseBody.java new file mode 100644 index 00000000..76e0b175 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkPlayedResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * MarkPlayedResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class MarkPlayedResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public MarkPlayedResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public MarkPlayedResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public MarkPlayedResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkPlayedResponseBody other = (MarkPlayedResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(MarkPlayedResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public MarkPlayedResponseBody build() { + return new MarkPlayedResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedErrors.java new file mode 100644 index 00000000..62c726ef --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MarkUnplayedErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public MarkUnplayedErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public MarkUnplayedErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public MarkUnplayedErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public MarkUnplayedErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public MarkUnplayedErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public MarkUnplayedErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public MarkUnplayedErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkUnplayedErrors other = (MarkUnplayedErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(MarkUnplayedErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public MarkUnplayedErrors build() { + return new MarkUnplayedErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequest.java new file mode 100644 index 00000000..48e4ea39 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MarkUnplayedRequest { + + /** + * The media key to mark as Unplayed + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private double key; + + public MarkUnplayedRequest( + double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + } + + /** + * The media key to mark as Unplayed + */ + public double key() { + return key; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The media key to mark as Unplayed + */ + public MarkUnplayedRequest withKey(double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkUnplayedRequest other = (MarkUnplayedRequest) o; + return + java.util.Objects.deepEquals(this.key, other.key); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key); + } + + @Override + public String toString() { + return Utils.toString(MarkUnplayedRequest.class, + "key", key); + } + + public final static class Builder { + + private Double key; + + private Builder() { + // force use of static builder() method + } + + /** + * The media key to mark as Unplayed + */ + public Builder key(double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MarkUnplayedRequest build() { + return new MarkUnplayedRequest( + key); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequestBuilder.java new file mode 100644 index 00000000..73546c0b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class MarkUnplayedRequestBuilder { + + private Double key; + private final SDKMethodInterfaces.MethodCallMarkUnplayed sdk; + + public MarkUnplayedRequestBuilder(SDKMethodInterfaces.MethodCallMarkUnplayed sdk) { + this.sdk = sdk; + } + + public MarkUnplayedRequestBuilder key(double key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MarkUnplayedResponse call() throws Exception { + + return sdk.markUnplayed( + key); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponse.java new file mode 100644 index 00000000..fa165772 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MarkUnplayedResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public MarkUnplayedResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public MarkUnplayedResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MarkUnplayedResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MarkUnplayedResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public MarkUnplayedResponse withObject(MarkUnplayedResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public MarkUnplayedResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkUnplayedResponse other = (MarkUnplayedResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(MarkUnplayedResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(MarkUnplayedResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public MarkUnplayedResponse build() { + return new MarkUnplayedResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponseBody.java new file mode 100644 index 00000000..0cc9f0a4 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MarkUnplayedResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * MarkUnplayedResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class MarkUnplayedResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public MarkUnplayedResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public MarkUnplayedResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public MarkUnplayedResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkUnplayedResponseBody other = (MarkUnplayedResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(MarkUnplayedResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public MarkUnplayedResponseBody build() { + return new MarkUnplayedResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Media.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Media.java new file mode 100644 index 00000000..1ff90b71 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Media.java @@ -0,0 +1,718 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Media { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + public Media( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("Part") Optional> part) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.optimizedForStreaming = optimizedForStreaming; + this.has64bitOffsets = has64bitOffsets; + this.videoProfile = videoProfile; + this.part = part; + } + + public Optional id() { + return id; + } + + public Optional duration() { + return duration; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional width() { + return width; + } + + public Optional height() { + return height; + } + + public Optional aspectRatio() { + return aspectRatio; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional videoResolution() { + return videoResolution; + } + + public Optional container() { + return container; + } + + public Optional videoFrameRate() { + return videoFrameRate; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional videoProfile() { + return videoProfile; + } + + public Optional> part() { + return part; + } + + public final static Builder builder() { + return new Builder(); + } + + public Media withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Media withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Media withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Media withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Media withBitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Media withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Media withWidth(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Media withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Media withHeight(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Media withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Media withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Media withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Media withAudioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Media withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Media withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Media withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Media withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Media withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Media withVideoResolution(double videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Media withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Media withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Media withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Media withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Media withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Media withOptimizedForStreaming(double optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Media withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Media withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Media withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Media withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Media withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Media withPart(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Media withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Media other = (Media) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.videoResolution, other.videoResolution) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile) && + java.util.Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + has64bitOffsets, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(Media.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "optimizedForStreaming", optimizedForStreaming, + "has64bitOffsets", has64bitOffsets, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder bitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(double videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder optimizedForStreaming(double optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder part(java.util.List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public Builder part(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public Media build() { + return new Media( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + has64bitOffsets, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MediaContainer.java new file mode 100644 index 00000000..5262b7b7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MediaContainer.java @@ -0,0 +1,2153 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowCameraUpload") + private Optional allowCameraUpload; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowChannelAccess") + private Optional allowChannelAccess; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowMediaDeletion") + private Optional allowMediaDeletion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSharing") + private Optional allowSharing; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowTuners") + private Optional allowTuners; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("backgroundProcessing") + private Optional backgroundProcessing; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("certificate") + private Optional certificate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("companionProxy") + private Optional companionProxy; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("countryCode") + private Optional countryCode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("diagnostics") + private Optional diagnostics; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("eventStream") + private Optional eventStream; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("friendlyName") + private Optional friendlyName; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubSearch") + private Optional hubSearch; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemClusters") + private Optional itemClusters; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("livetv") + private Optional livetv; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaProviders") + private Optional mediaProviders; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("multiuser") + private Optional multiuser; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("musicAnalysis") + private Optional musicAnalysis; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlex") + private Optional myPlex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexMappingState") + private Optional myPlexMappingState; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexSigninState") + private Optional myPlexSigninState; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexSubscription") + private Optional myPlexSubscription; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexUsername") + private Optional myPlexUsername; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offlineTranscode") + private Optional offlineTranscode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ownerFeatures") + private Optional ownerFeatures; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("photoAutoTag") + private Optional photoAutoTag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platform") + private Optional platform; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platformVersion") + private Optional platformVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pluginHost") + private Optional pluginHost; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pushNotifications") + private Optional pushNotifications; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("readOnlyLibraries") + private Optional readOnlyLibraries; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamingBrainABRVersion") + private Optional streamingBrainABRVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamingBrainVersion") + private Optional streamingBrainVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sync") + private Optional sync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderActiveVideoSessions") + private Optional transcoderActiveVideoSessions; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderAudio") + private Optional transcoderAudio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderLyrics") + private Optional transcoderLyrics; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderPhoto") + private Optional transcoderPhoto; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderSubtitles") + private Optional transcoderSubtitles; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideo") + private Optional transcoderVideo; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoBitrates") + private Optional transcoderVideoBitrates; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoQualities") + private Optional transcoderVideoQualities; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoResolutions") + private Optional transcoderVideoResolutions; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updater") + private Optional updater; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("voiceSearch") + private Optional voiceSearch; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + public MediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowCameraUpload") Optional allowCameraUpload, + @JsonProperty("allowChannelAccess") Optional allowChannelAccess, + @JsonProperty("allowMediaDeletion") Optional allowMediaDeletion, + @JsonProperty("allowSharing") Optional allowSharing, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("allowTuners") Optional allowTuners, + @JsonProperty("backgroundProcessing") Optional backgroundProcessing, + @JsonProperty("certificate") Optional certificate, + @JsonProperty("companionProxy") Optional companionProxy, + @JsonProperty("countryCode") Optional countryCode, + @JsonProperty("diagnostics") Optional diagnostics, + @JsonProperty("eventStream") Optional eventStream, + @JsonProperty("friendlyName") Optional friendlyName, + @JsonProperty("hubSearch") Optional hubSearch, + @JsonProperty("itemClusters") Optional itemClusters, + @JsonProperty("livetv") Optional livetv, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("mediaProviders") Optional mediaProviders, + @JsonProperty("multiuser") Optional multiuser, + @JsonProperty("musicAnalysis") Optional musicAnalysis, + @JsonProperty("myPlex") Optional myPlex, + @JsonProperty("myPlexMappingState") Optional myPlexMappingState, + @JsonProperty("myPlexSigninState") Optional myPlexSigninState, + @JsonProperty("myPlexSubscription") Optional myPlexSubscription, + @JsonProperty("myPlexUsername") Optional myPlexUsername, + @JsonProperty("offlineTranscode") Optional offlineTranscode, + @JsonProperty("ownerFeatures") Optional ownerFeatures, + @JsonProperty("photoAutoTag") Optional photoAutoTag, + @JsonProperty("platform") Optional platform, + @JsonProperty("platformVersion") Optional platformVersion, + @JsonProperty("pluginHost") Optional pluginHost, + @JsonProperty("pushNotifications") Optional pushNotifications, + @JsonProperty("readOnlyLibraries") Optional readOnlyLibraries, + @JsonProperty("streamingBrainABRVersion") Optional streamingBrainABRVersion, + @JsonProperty("streamingBrainVersion") Optional streamingBrainVersion, + @JsonProperty("sync") Optional sync, + @JsonProperty("transcoderActiveVideoSessions") Optional transcoderActiveVideoSessions, + @JsonProperty("transcoderAudio") Optional transcoderAudio, + @JsonProperty("transcoderLyrics") Optional transcoderLyrics, + @JsonProperty("transcoderPhoto") Optional transcoderPhoto, + @JsonProperty("transcoderSubtitles") Optional transcoderSubtitles, + @JsonProperty("transcoderVideo") Optional transcoderVideo, + @JsonProperty("transcoderVideoBitrates") Optional transcoderVideoBitrates, + @JsonProperty("transcoderVideoQualities") Optional transcoderVideoQualities, + @JsonProperty("transcoderVideoResolutions") Optional transcoderVideoResolutions, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("updater") Optional updater, + @JsonProperty("version") Optional version, + @JsonProperty("voiceSearch") Optional voiceSearch, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + Utils.checkNotNull(allowSharing, "allowSharing"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(allowTuners, "allowTuners"); + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + Utils.checkNotNull(certificate, "certificate"); + Utils.checkNotNull(companionProxy, "companionProxy"); + Utils.checkNotNull(countryCode, "countryCode"); + Utils.checkNotNull(diagnostics, "diagnostics"); + Utils.checkNotNull(eventStream, "eventStream"); + Utils.checkNotNull(friendlyName, "friendlyName"); + Utils.checkNotNull(hubSearch, "hubSearch"); + Utils.checkNotNull(itemClusters, "itemClusters"); + Utils.checkNotNull(livetv, "livetv"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(mediaProviders, "mediaProviders"); + Utils.checkNotNull(multiuser, "multiuser"); + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + Utils.checkNotNull(myPlex, "myPlex"); + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + Utils.checkNotNull(photoAutoTag, "photoAutoTag"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(pluginHost, "pluginHost"); + Utils.checkNotNull(pushNotifications, "pushNotifications"); + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + Utils.checkNotNull(sync, "sync"); + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(updater, "updater"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(voiceSearch, "voiceSearch"); + Utils.checkNotNull(directory, "directory"); + this.size = size; + this.allowCameraUpload = allowCameraUpload; + this.allowChannelAccess = allowChannelAccess; + this.allowMediaDeletion = allowMediaDeletion; + this.allowSharing = allowSharing; + this.allowSync = allowSync; + this.allowTuners = allowTuners; + this.backgroundProcessing = backgroundProcessing; + this.certificate = certificate; + this.companionProxy = companionProxy; + this.countryCode = countryCode; + this.diagnostics = diagnostics; + this.eventStream = eventStream; + this.friendlyName = friendlyName; + this.hubSearch = hubSearch; + this.itemClusters = itemClusters; + this.livetv = livetv; + this.machineIdentifier = machineIdentifier; + this.mediaProviders = mediaProviders; + this.multiuser = multiuser; + this.musicAnalysis = musicAnalysis; + this.myPlex = myPlex; + this.myPlexMappingState = myPlexMappingState; + this.myPlexSigninState = myPlexSigninState; + this.myPlexSubscription = myPlexSubscription; + this.myPlexUsername = myPlexUsername; + this.offlineTranscode = offlineTranscode; + this.ownerFeatures = ownerFeatures; + this.photoAutoTag = photoAutoTag; + this.platform = platform; + this.platformVersion = platformVersion; + this.pluginHost = pluginHost; + this.pushNotifications = pushNotifications; + this.readOnlyLibraries = readOnlyLibraries; + this.streamingBrainABRVersion = streamingBrainABRVersion; + this.streamingBrainVersion = streamingBrainVersion; + this.sync = sync; + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + this.transcoderAudio = transcoderAudio; + this.transcoderLyrics = transcoderLyrics; + this.transcoderPhoto = transcoderPhoto; + this.transcoderSubtitles = transcoderSubtitles; + this.transcoderVideo = transcoderVideo; + this.transcoderVideoBitrates = transcoderVideoBitrates; + this.transcoderVideoQualities = transcoderVideoQualities; + this.transcoderVideoResolutions = transcoderVideoResolutions; + this.updatedAt = updatedAt; + this.updater = updater; + this.version = version; + this.voiceSearch = voiceSearch; + this.directory = directory; + } + + public Optional size() { + return size; + } + + public Optional allowCameraUpload() { + return allowCameraUpload; + } + + public Optional allowChannelAccess() { + return allowChannelAccess; + } + + public Optional allowMediaDeletion() { + return allowMediaDeletion; + } + + public Optional allowSharing() { + return allowSharing; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional allowTuners() { + return allowTuners; + } + + public Optional backgroundProcessing() { + return backgroundProcessing; + } + + public Optional certificate() { + return certificate; + } + + public Optional companionProxy() { + return companionProxy; + } + + public Optional countryCode() { + return countryCode; + } + + public Optional diagnostics() { + return diagnostics; + } + + public Optional eventStream() { + return eventStream; + } + + public Optional friendlyName() { + return friendlyName; + } + + public Optional hubSearch() { + return hubSearch; + } + + public Optional itemClusters() { + return itemClusters; + } + + public Optional livetv() { + return livetv; + } + + public Optional machineIdentifier() { + return machineIdentifier; + } + + public Optional mediaProviders() { + return mediaProviders; + } + + public Optional multiuser() { + return multiuser; + } + + public Optional musicAnalysis() { + return musicAnalysis; + } + + public Optional myPlex() { + return myPlex; + } + + public Optional myPlexMappingState() { + return myPlexMappingState; + } + + public Optional myPlexSigninState() { + return myPlexSigninState; + } + + public Optional myPlexSubscription() { + return myPlexSubscription; + } + + public Optional myPlexUsername() { + return myPlexUsername; + } + + public Optional offlineTranscode() { + return offlineTranscode; + } + + public Optional ownerFeatures() { + return ownerFeatures; + } + + public Optional photoAutoTag() { + return photoAutoTag; + } + + public Optional platform() { + return platform; + } + + public Optional platformVersion() { + return platformVersion; + } + + public Optional pluginHost() { + return pluginHost; + } + + public Optional pushNotifications() { + return pushNotifications; + } + + public Optional readOnlyLibraries() { + return readOnlyLibraries; + } + + public Optional streamingBrainABRVersion() { + return streamingBrainABRVersion; + } + + public Optional streamingBrainVersion() { + return streamingBrainVersion; + } + + public Optional sync() { + return sync; + } + + public Optional transcoderActiveVideoSessions() { + return transcoderActiveVideoSessions; + } + + public Optional transcoderAudio() { + return transcoderAudio; + } + + public Optional transcoderLyrics() { + return transcoderLyrics; + } + + public Optional transcoderPhoto() { + return transcoderPhoto; + } + + public Optional transcoderSubtitles() { + return transcoderSubtitles; + } + + public Optional transcoderVideo() { + return transcoderVideo; + } + + public Optional transcoderVideoBitrates() { + return transcoderVideoBitrates; + } + + public Optional transcoderVideoQualities() { + return transcoderVideoQualities; + } + + public Optional transcoderVideoResolutions() { + return transcoderVideoResolutions; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional updater() { + return updater; + } + + public Optional version() { + return version; + } + + public Optional voiceSearch() { + return voiceSearch; + } + + public Optional> directory() { + return directory; + } + + public final static Builder builder() { + return new Builder(); + } + + public MediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public MediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public MediaContainer withAllowCameraUpload(boolean allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); + return this; + } + + public MediaContainer withAllowCameraUpload(Optional allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = allowCameraUpload; + return this; + } + + public MediaContainer withAllowChannelAccess(boolean allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); + return this; + } + + public MediaContainer withAllowChannelAccess(Optional allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = allowChannelAccess; + return this; + } + + public MediaContainer withAllowMediaDeletion(boolean allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = Optional.ofNullable(allowMediaDeletion); + return this; + } + + public MediaContainer withAllowMediaDeletion(Optional allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = allowMediaDeletion; + return this; + } + + public MediaContainer withAllowSharing(boolean allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = Optional.ofNullable(allowSharing); + return this; + } + + public MediaContainer withAllowSharing(Optional allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = allowSharing; + return this; + } + + public MediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public MediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public MediaContainer withAllowTuners(boolean allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = Optional.ofNullable(allowTuners); + return this; + } + + public MediaContainer withAllowTuners(Optional allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = allowTuners; + return this; + } + + public MediaContainer withBackgroundProcessing(boolean backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); + return this; + } + + public MediaContainer withBackgroundProcessing(Optional backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = backgroundProcessing; + return this; + } + + public MediaContainer withCertificate(boolean certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = Optional.ofNullable(certificate); + return this; + } + + public MediaContainer withCertificate(Optional certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = certificate; + return this; + } + + public MediaContainer withCompanionProxy(boolean companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = Optional.ofNullable(companionProxy); + return this; + } + + public MediaContainer withCompanionProxy(Optional companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = companionProxy; + return this; + } + + public MediaContainer withCountryCode(String countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = Optional.ofNullable(countryCode); + return this; + } + + public MediaContainer withCountryCode(Optional countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = countryCode; + return this; + } + + public MediaContainer withDiagnostics(String diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + public MediaContainer withDiagnostics(Optional diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + public MediaContainer withEventStream(boolean eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = Optional.ofNullable(eventStream); + return this; + } + + public MediaContainer withEventStream(Optional eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = eventStream; + return this; + } + + public MediaContainer withFriendlyName(String friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = Optional.ofNullable(friendlyName); + return this; + } + + public MediaContainer withFriendlyName(Optional friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = friendlyName; + return this; + } + + public MediaContainer withHubSearch(boolean hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = Optional.ofNullable(hubSearch); + return this; + } + + public MediaContainer withHubSearch(Optional hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = hubSearch; + return this; + } + + public MediaContainer withItemClusters(boolean itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = Optional.ofNullable(itemClusters); + return this; + } + + public MediaContainer withItemClusters(Optional itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = itemClusters; + return this; + } + + public MediaContainer withLivetv(double livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = Optional.ofNullable(livetv); + return this; + } + + public MediaContainer withLivetv(Optional livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = livetv; + return this; + } + + public MediaContainer withMachineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public MediaContainer withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public MediaContainer withMediaProviders(boolean mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = Optional.ofNullable(mediaProviders); + return this; + } + + public MediaContainer withMediaProviders(Optional mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = mediaProviders; + return this; + } + + public MediaContainer withMultiuser(boolean multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = Optional.ofNullable(multiuser); + return this; + } + + public MediaContainer withMultiuser(Optional multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = multiuser; + return this; + } + + public MediaContainer withMusicAnalysis(double musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = Optional.ofNullable(musicAnalysis); + return this; + } + + public MediaContainer withMusicAnalysis(Optional musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = musicAnalysis; + return this; + } + + public MediaContainer withMyPlex(boolean myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + public MediaContainer withMyPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + public MediaContainer withMyPlexMappingState(String myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); + return this; + } + + public MediaContainer withMyPlexMappingState(Optional myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = myPlexMappingState; + return this; + } + + public MediaContainer withMyPlexSigninState(String myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); + return this; + } + + public MediaContainer withMyPlexSigninState(Optional myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = myPlexSigninState; + return this; + } + + public MediaContainer withMyPlexSubscription(boolean myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); + return this; + } + + public MediaContainer withMyPlexSubscription(Optional myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = myPlexSubscription; + return this; + } + + public MediaContainer withMyPlexUsername(String myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = Optional.ofNullable(myPlexUsername); + return this; + } + + public MediaContainer withMyPlexUsername(Optional myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = myPlexUsername; + return this; + } + + public MediaContainer withOfflineTranscode(double offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = Optional.ofNullable(offlineTranscode); + return this; + } + + public MediaContainer withOfflineTranscode(Optional offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = offlineTranscode; + return this; + } + + public MediaContainer withOwnerFeatures(String ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = Optional.ofNullable(ownerFeatures); + return this; + } + + public MediaContainer withOwnerFeatures(Optional ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = ownerFeatures; + return this; + } + + public MediaContainer withPhotoAutoTag(boolean photoAutoTag) { + Utils.checkNotNull(photoAutoTag, "photoAutoTag"); + this.photoAutoTag = Optional.ofNullable(photoAutoTag); + return this; + } + + public MediaContainer withPhotoAutoTag(Optional photoAutoTag) { + Utils.checkNotNull(photoAutoTag, "photoAutoTag"); + this.photoAutoTag = photoAutoTag; + return this; + } + + public MediaContainer withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public MediaContainer withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public MediaContainer withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + public MediaContainer withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + public MediaContainer withPluginHost(boolean pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = Optional.ofNullable(pluginHost); + return this; + } + + public MediaContainer withPluginHost(Optional pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = pluginHost; + return this; + } + + public MediaContainer withPushNotifications(boolean pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = Optional.ofNullable(pushNotifications); + return this; + } + + public MediaContainer withPushNotifications(Optional pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = pushNotifications; + return this; + } + + public MediaContainer withReadOnlyLibraries(boolean readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); + return this; + } + + public MediaContainer withReadOnlyLibraries(Optional readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = readOnlyLibraries; + return this; + } + + public MediaContainer withStreamingBrainABRVersion(double streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); + return this; + } + + public MediaContainer withStreamingBrainABRVersion(Optional streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = streamingBrainABRVersion; + return this; + } + + public MediaContainer withStreamingBrainVersion(double streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); + return this; + } + + public MediaContainer withStreamingBrainVersion(Optional streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = streamingBrainVersion; + return this; + } + + public MediaContainer withSync(boolean sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = Optional.ofNullable(sync); + return this; + } + + public MediaContainer withSync(Optional sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = sync; + return this; + } + + public MediaContainer withTranscoderActiveVideoSessions(double transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); + return this; + } + + public MediaContainer withTranscoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + return this; + } + + public MediaContainer withTranscoderAudio(boolean transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = Optional.ofNullable(transcoderAudio); + return this; + } + + public MediaContainer withTranscoderAudio(Optional transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = transcoderAudio; + return this; + } + + public MediaContainer withTranscoderLyrics(boolean transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); + return this; + } + + public MediaContainer withTranscoderLyrics(Optional transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = transcoderLyrics; + return this; + } + + public MediaContainer withTranscoderPhoto(boolean transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = Optional.ofNullable(transcoderPhoto); + return this; + } + + public MediaContainer withTranscoderPhoto(Optional transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = transcoderPhoto; + return this; + } + + public MediaContainer withTranscoderSubtitles(boolean transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); + return this; + } + + public MediaContainer withTranscoderSubtitles(Optional transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = transcoderSubtitles; + return this; + } + + public MediaContainer withTranscoderVideo(boolean transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = Optional.ofNullable(transcoderVideo); + return this; + } + + public MediaContainer withTranscoderVideo(Optional transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = transcoderVideo; + return this; + } + + public MediaContainer withTranscoderVideoBitrates(String transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); + return this; + } + + public MediaContainer withTranscoderVideoBitrates(Optional transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = transcoderVideoBitrates; + return this; + } + + public MediaContainer withTranscoderVideoQualities(String transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); + return this; + } + + public MediaContainer withTranscoderVideoQualities(Optional transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = transcoderVideoQualities; + return this; + } + + public MediaContainer withTranscoderVideoResolutions(String transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); + return this; + } + + public MediaContainer withTranscoderVideoResolutions(Optional transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = transcoderVideoResolutions; + return this; + } + + public MediaContainer withUpdatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public MediaContainer withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public MediaContainer withUpdater(boolean updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = Optional.ofNullable(updater); + return this; + } + + public MediaContainer withUpdater(Optional updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = updater; + return this; + } + + public MediaContainer withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public MediaContainer withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public MediaContainer withVoiceSearch(boolean voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = Optional.ofNullable(voiceSearch); + return this; + } + + public MediaContainer withVoiceSearch(Optional voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = voiceSearch; + return this; + } + + public MediaContainer withDirectory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public MediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainer other = (MediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowCameraUpload, other.allowCameraUpload) && + java.util.Objects.deepEquals(this.allowChannelAccess, other.allowChannelAccess) && + java.util.Objects.deepEquals(this.allowMediaDeletion, other.allowMediaDeletion) && + java.util.Objects.deepEquals(this.allowSharing, other.allowSharing) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.allowTuners, other.allowTuners) && + java.util.Objects.deepEquals(this.backgroundProcessing, other.backgroundProcessing) && + java.util.Objects.deepEquals(this.certificate, other.certificate) && + java.util.Objects.deepEquals(this.companionProxy, other.companionProxy) && + java.util.Objects.deepEquals(this.countryCode, other.countryCode) && + java.util.Objects.deepEquals(this.diagnostics, other.diagnostics) && + java.util.Objects.deepEquals(this.eventStream, other.eventStream) && + java.util.Objects.deepEquals(this.friendlyName, other.friendlyName) && + java.util.Objects.deepEquals(this.hubSearch, other.hubSearch) && + java.util.Objects.deepEquals(this.itemClusters, other.itemClusters) && + java.util.Objects.deepEquals(this.livetv, other.livetv) && + java.util.Objects.deepEquals(this.machineIdentifier, other.machineIdentifier) && + java.util.Objects.deepEquals(this.mediaProviders, other.mediaProviders) && + java.util.Objects.deepEquals(this.multiuser, other.multiuser) && + java.util.Objects.deepEquals(this.musicAnalysis, other.musicAnalysis) && + java.util.Objects.deepEquals(this.myPlex, other.myPlex) && + java.util.Objects.deepEquals(this.myPlexMappingState, other.myPlexMappingState) && + java.util.Objects.deepEquals(this.myPlexSigninState, other.myPlexSigninState) && + java.util.Objects.deepEquals(this.myPlexSubscription, other.myPlexSubscription) && + java.util.Objects.deepEquals(this.myPlexUsername, other.myPlexUsername) && + java.util.Objects.deepEquals(this.offlineTranscode, other.offlineTranscode) && + java.util.Objects.deepEquals(this.ownerFeatures, other.ownerFeatures) && + java.util.Objects.deepEquals(this.photoAutoTag, other.photoAutoTag) && + java.util.Objects.deepEquals(this.platform, other.platform) && + java.util.Objects.deepEquals(this.platformVersion, other.platformVersion) && + java.util.Objects.deepEquals(this.pluginHost, other.pluginHost) && + java.util.Objects.deepEquals(this.pushNotifications, other.pushNotifications) && + java.util.Objects.deepEquals(this.readOnlyLibraries, other.readOnlyLibraries) && + java.util.Objects.deepEquals(this.streamingBrainABRVersion, other.streamingBrainABRVersion) && + java.util.Objects.deepEquals(this.streamingBrainVersion, other.streamingBrainVersion) && + java.util.Objects.deepEquals(this.sync, other.sync) && + java.util.Objects.deepEquals(this.transcoderActiveVideoSessions, other.transcoderActiveVideoSessions) && + java.util.Objects.deepEquals(this.transcoderAudio, other.transcoderAudio) && + java.util.Objects.deepEquals(this.transcoderLyrics, other.transcoderLyrics) && + java.util.Objects.deepEquals(this.transcoderPhoto, other.transcoderPhoto) && + java.util.Objects.deepEquals(this.transcoderSubtitles, other.transcoderSubtitles) && + java.util.Objects.deepEquals(this.transcoderVideo, other.transcoderVideo) && + java.util.Objects.deepEquals(this.transcoderVideoBitrates, other.transcoderVideoBitrates) && + java.util.Objects.deepEquals(this.transcoderVideoQualities, other.transcoderVideoQualities) && + java.util.Objects.deepEquals(this.transcoderVideoResolutions, other.transcoderVideoResolutions) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.updater, other.updater) && + java.util.Objects.deepEquals(this.version, other.version) && + java.util.Objects.deepEquals(this.voiceSearch, other.voiceSearch) && + java.util.Objects.deepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowCameraUpload, + allowChannelAccess, + allowMediaDeletion, + allowSharing, + allowSync, + allowTuners, + backgroundProcessing, + certificate, + companionProxy, + countryCode, + diagnostics, + eventStream, + friendlyName, + hubSearch, + itemClusters, + livetv, + machineIdentifier, + mediaProviders, + multiuser, + musicAnalysis, + myPlex, + myPlexMappingState, + myPlexSigninState, + myPlexSubscription, + myPlexUsername, + offlineTranscode, + ownerFeatures, + photoAutoTag, + platform, + platformVersion, + pluginHost, + pushNotifications, + readOnlyLibraries, + streamingBrainABRVersion, + streamingBrainVersion, + sync, + transcoderActiveVideoSessions, + transcoderAudio, + transcoderLyrics, + transcoderPhoto, + transcoderSubtitles, + transcoderVideo, + transcoderVideoBitrates, + transcoderVideoQualities, + transcoderVideoResolutions, + updatedAt, + updater, + version, + voiceSearch, + directory); + } + + @Override + public String toString() { + return Utils.toString(MediaContainer.class, + "size", size, + "allowCameraUpload", allowCameraUpload, + "allowChannelAccess", allowChannelAccess, + "allowMediaDeletion", allowMediaDeletion, + "allowSharing", allowSharing, + "allowSync", allowSync, + "allowTuners", allowTuners, + "backgroundProcessing", backgroundProcessing, + "certificate", certificate, + "companionProxy", companionProxy, + "countryCode", countryCode, + "diagnostics", diagnostics, + "eventStream", eventStream, + "friendlyName", friendlyName, + "hubSearch", hubSearch, + "itemClusters", itemClusters, + "livetv", livetv, + "machineIdentifier", machineIdentifier, + "mediaProviders", mediaProviders, + "multiuser", multiuser, + "musicAnalysis", musicAnalysis, + "myPlex", myPlex, + "myPlexMappingState", myPlexMappingState, + "myPlexSigninState", myPlexSigninState, + "myPlexSubscription", myPlexSubscription, + "myPlexUsername", myPlexUsername, + "offlineTranscode", offlineTranscode, + "ownerFeatures", ownerFeatures, + "photoAutoTag", photoAutoTag, + "platform", platform, + "platformVersion", platformVersion, + "pluginHost", pluginHost, + "pushNotifications", pushNotifications, + "readOnlyLibraries", readOnlyLibraries, + "streamingBrainABRVersion", streamingBrainABRVersion, + "streamingBrainVersion", streamingBrainVersion, + "sync", sync, + "transcoderActiveVideoSessions", transcoderActiveVideoSessions, + "transcoderAudio", transcoderAudio, + "transcoderLyrics", transcoderLyrics, + "transcoderPhoto", transcoderPhoto, + "transcoderSubtitles", transcoderSubtitles, + "transcoderVideo", transcoderVideo, + "transcoderVideoBitrates", transcoderVideoBitrates, + "transcoderVideoQualities", transcoderVideoQualities, + "transcoderVideoResolutions", transcoderVideoResolutions, + "updatedAt", updatedAt, + "updater", updater, + "version", version, + "voiceSearch", voiceSearch, + "directory", directory); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowCameraUpload = Optional.empty(); + + private Optional allowChannelAccess = Optional.empty(); + + private Optional allowMediaDeletion = Optional.empty(); + + private Optional allowSharing = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional allowTuners = Optional.empty(); + + private Optional backgroundProcessing = Optional.empty(); + + private Optional certificate = Optional.empty(); + + private Optional companionProxy = Optional.empty(); + + private Optional countryCode = Optional.empty(); + + private Optional diagnostics = Optional.empty(); + + private Optional eventStream = Optional.empty(); + + private Optional friendlyName = Optional.empty(); + + private Optional hubSearch = Optional.empty(); + + private Optional itemClusters = Optional.empty(); + + private Optional livetv = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional mediaProviders = Optional.empty(); + + private Optional multiuser = Optional.empty(); + + private Optional musicAnalysis = Optional.empty(); + + private Optional myPlex = Optional.empty(); + + private Optional myPlexMappingState = Optional.empty(); + + private Optional myPlexSigninState = Optional.empty(); + + private Optional myPlexSubscription = Optional.empty(); + + private Optional myPlexUsername = Optional.empty(); + + private Optional offlineTranscode = Optional.empty(); + + private Optional ownerFeatures = Optional.empty(); + + private Optional photoAutoTag = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional pluginHost = Optional.empty(); + + private Optional pushNotifications = Optional.empty(); + + private Optional readOnlyLibraries = Optional.empty(); + + private Optional streamingBrainABRVersion = Optional.empty(); + + private Optional streamingBrainVersion = Optional.empty(); + + private Optional sync = Optional.empty(); + + private Optional transcoderActiveVideoSessions = Optional.empty(); + + private Optional transcoderAudio = Optional.empty(); + + private Optional transcoderLyrics = Optional.empty(); + + private Optional transcoderPhoto = Optional.empty(); + + private Optional transcoderSubtitles = Optional.empty(); + + private Optional transcoderVideo = Optional.empty(); + + private Optional transcoderVideoBitrates = Optional.empty(); + + private Optional transcoderVideoQualities = Optional.empty(); + + private Optional transcoderVideoResolutions = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional updater = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional voiceSearch = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowCameraUpload(boolean allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); + return this; + } + + public Builder allowCameraUpload(Optional allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = allowCameraUpload; + return this; + } + + public Builder allowChannelAccess(boolean allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); + return this; + } + + public Builder allowChannelAccess(Optional allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = allowChannelAccess; + return this; + } + + public Builder allowMediaDeletion(boolean allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = Optional.ofNullable(allowMediaDeletion); + return this; + } + + public Builder allowMediaDeletion(Optional allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = allowMediaDeletion; + return this; + } + + public Builder allowSharing(boolean allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = Optional.ofNullable(allowSharing); + return this; + } + + public Builder allowSharing(Optional allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = allowSharing; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder allowTuners(boolean allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = Optional.ofNullable(allowTuners); + return this; + } + + public Builder allowTuners(Optional allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = allowTuners; + return this; + } + + public Builder backgroundProcessing(boolean backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); + return this; + } + + public Builder backgroundProcessing(Optional backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = backgroundProcessing; + return this; + } + + public Builder certificate(boolean certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = Optional.ofNullable(certificate); + return this; + } + + public Builder certificate(Optional certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = certificate; + return this; + } + + public Builder companionProxy(boolean companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = Optional.ofNullable(companionProxy); + return this; + } + + public Builder companionProxy(Optional companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = companionProxy; + return this; + } + + public Builder countryCode(String countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = Optional.ofNullable(countryCode); + return this; + } + + public Builder countryCode(Optional countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = countryCode; + return this; + } + + public Builder diagnostics(String diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + public Builder diagnostics(Optional diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + public Builder eventStream(boolean eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = Optional.ofNullable(eventStream); + return this; + } + + public Builder eventStream(Optional eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = eventStream; + return this; + } + + public Builder friendlyName(String friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = Optional.ofNullable(friendlyName); + return this; + } + + public Builder friendlyName(Optional friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = friendlyName; + return this; + } + + public Builder hubSearch(boolean hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = Optional.ofNullable(hubSearch); + return this; + } + + public Builder hubSearch(Optional hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = hubSearch; + return this; + } + + public Builder itemClusters(boolean itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = Optional.ofNullable(itemClusters); + return this; + } + + public Builder itemClusters(Optional itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = itemClusters; + return this; + } + + public Builder livetv(double livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = Optional.ofNullable(livetv); + return this; + } + + public Builder livetv(Optional livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = livetv; + return this; + } + + public Builder machineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public Builder mediaProviders(boolean mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = Optional.ofNullable(mediaProviders); + return this; + } + + public Builder mediaProviders(Optional mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = mediaProviders; + return this; + } + + public Builder multiuser(boolean multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = Optional.ofNullable(multiuser); + return this; + } + + public Builder multiuser(Optional multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = multiuser; + return this; + } + + public Builder musicAnalysis(double musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = Optional.ofNullable(musicAnalysis); + return this; + } + + public Builder musicAnalysis(Optional musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = musicAnalysis; + return this; + } + + public Builder myPlex(boolean myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + public Builder myPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + public Builder myPlexMappingState(String myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); + return this; + } + + public Builder myPlexMappingState(Optional myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = myPlexMappingState; + return this; + } + + public Builder myPlexSigninState(String myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); + return this; + } + + public Builder myPlexSigninState(Optional myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = myPlexSigninState; + return this; + } + + public Builder myPlexSubscription(boolean myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); + return this; + } + + public Builder myPlexSubscription(Optional myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = myPlexSubscription; + return this; + } + + public Builder myPlexUsername(String myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = Optional.ofNullable(myPlexUsername); + return this; + } + + public Builder myPlexUsername(Optional myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = myPlexUsername; + return this; + } + + public Builder offlineTranscode(double offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = Optional.ofNullable(offlineTranscode); + return this; + } + + public Builder offlineTranscode(Optional offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = offlineTranscode; + return this; + } + + public Builder ownerFeatures(String ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = Optional.ofNullable(ownerFeatures); + return this; + } + + public Builder ownerFeatures(Optional ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = ownerFeatures; + return this; + } + + public Builder photoAutoTag(boolean photoAutoTag) { + Utils.checkNotNull(photoAutoTag, "photoAutoTag"); + this.photoAutoTag = Optional.ofNullable(photoAutoTag); + return this; + } + + public Builder photoAutoTag(Optional photoAutoTag) { + Utils.checkNotNull(photoAutoTag, "photoAutoTag"); + this.photoAutoTag = photoAutoTag; + return this; + } + + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + public Builder pluginHost(boolean pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = Optional.ofNullable(pluginHost); + return this; + } + + public Builder pluginHost(Optional pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = pluginHost; + return this; + } + + public Builder pushNotifications(boolean pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = Optional.ofNullable(pushNotifications); + return this; + } + + public Builder pushNotifications(Optional pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = pushNotifications; + return this; + } + + public Builder readOnlyLibraries(boolean readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); + return this; + } + + public Builder readOnlyLibraries(Optional readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = readOnlyLibraries; + return this; + } + + public Builder streamingBrainABRVersion(double streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); + return this; + } + + public Builder streamingBrainABRVersion(Optional streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = streamingBrainABRVersion; + return this; + } + + public Builder streamingBrainVersion(double streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); + return this; + } + + public Builder streamingBrainVersion(Optional streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = streamingBrainVersion; + return this; + } + + public Builder sync(boolean sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = Optional.ofNullable(sync); + return this; + } + + public Builder sync(Optional sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = sync; + return this; + } + + public Builder transcoderActiveVideoSessions(double transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); + return this; + } + + public Builder transcoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + return this; + } + + public Builder transcoderAudio(boolean transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = Optional.ofNullable(transcoderAudio); + return this; + } + + public Builder transcoderAudio(Optional transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = transcoderAudio; + return this; + } + + public Builder transcoderLyrics(boolean transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); + return this; + } + + public Builder transcoderLyrics(Optional transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = transcoderLyrics; + return this; + } + + public Builder transcoderPhoto(boolean transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = Optional.ofNullable(transcoderPhoto); + return this; + } + + public Builder transcoderPhoto(Optional transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = transcoderPhoto; + return this; + } + + public Builder transcoderSubtitles(boolean transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); + return this; + } + + public Builder transcoderSubtitles(Optional transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = transcoderSubtitles; + return this; + } + + public Builder transcoderVideo(boolean transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = Optional.ofNullable(transcoderVideo); + return this; + } + + public Builder transcoderVideo(Optional transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = transcoderVideo; + return this; + } + + public Builder transcoderVideoBitrates(String transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); + return this; + } + + public Builder transcoderVideoBitrates(Optional transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = transcoderVideoBitrates; + return this; + } + + public Builder transcoderVideoQualities(String transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); + return this; + } + + public Builder transcoderVideoQualities(Optional transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = transcoderVideoQualities; + return this; + } + + public Builder transcoderVideoResolutions(String transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); + return this; + } + + public Builder transcoderVideoResolutions(Optional transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = transcoderVideoResolutions; + return this; + } + + public Builder updatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder updater(boolean updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = Optional.ofNullable(updater); + return this; + } + + public Builder updater(Optional updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = updater; + return this; + } + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Builder voiceSearch(boolean voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = Optional.ofNullable(voiceSearch); + return this; + } + + public Builder voiceSearch(Optional voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = voiceSearch; + return this; + } + + public Builder directory(java.util.List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public MediaContainer build() { + return new MediaContainer( + size, + allowCameraUpload, + allowChannelAccess, + allowMediaDeletion, + allowSharing, + allowSync, + allowTuners, + backgroundProcessing, + certificate, + companionProxy, + countryCode, + diagnostics, + eventStream, + friendlyName, + hubSearch, + itemClusters, + livetv, + machineIdentifier, + mediaProviders, + multiuser, + musicAnalysis, + myPlex, + myPlexMappingState, + myPlexSigninState, + myPlexSubscription, + myPlexUsername, + offlineTranscode, + ownerFeatures, + photoAutoTag, + platform, + platformVersion, + pluginHost, + pushNotifications, + readOnlyLibraries, + streamingBrainABRVersion, + streamingBrainVersion, + sync, + transcoderActiveVideoSessions, + transcoderAudio, + transcoderLyrics, + transcoderPhoto, + transcoderSubtitles, + transcoderVideo, + transcoderVideoBitrates, + transcoderVideoQualities, + transcoderVideoResolutions, + updatedAt, + updater, + version, + voiceSearch, + directory); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Metadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Metadata.java new file mode 100644 index 00000000..cb172031 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Metadata.java @@ -0,0 +1,1377 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Metadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + public Metadata( + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("studio") Optional studio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("rating") Optional rating, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("year") Optional year, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("Media") Optional> media, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("Director") Optional> director, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("Country") Optional> country, + @JsonProperty("Role") Optional> role) { + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(role, "role"); + this.allowSync = allowSync; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.studio = studio; + this.type = type; + this.title = title; + this.contentRating = contentRating; + this.summary = summary; + this.rating = rating; + this.audienceRating = audienceRating; + this.year = year; + this.tagline = tagline; + this.thumb = thumb; + this.art = art; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.audienceRatingImage = audienceRatingImage; + this.chapterSource = chapterSource; + this.primaryExtraKey = primaryExtraKey; + this.ratingImage = ratingImage; + this.media = media; + this.genre = genre; + this.director = director; + this.writer = writer; + this.country = country; + this.role = role; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional librarySectionID() { + return librarySectionID; + } + + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional guid() { + return guid; + } + + public Optional studio() { + return studio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional contentRating() { + return contentRating; + } + + public Optional summary() { + return summary; + } + + public Optional rating() { + return rating; + } + + public Optional audienceRating() { + return audienceRating; + } + + public Optional year() { + return year; + } + + public Optional tagline() { + return tagline; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional duration() { + return duration; + } + + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public Optional audienceRatingImage() { + return audienceRatingImage; + } + + public Optional chapterSource() { + return chapterSource; + } + + public Optional primaryExtraKey() { + return primaryExtraKey; + } + + public Optional ratingImage() { + return ratingImage; + } + + public Optional> media() { + return media; + } + + public Optional> genre() { + return genre; + } + + public Optional> director() { + return director; + } + + public Optional> writer() { + return writer; + } + + public Optional> country() { + return country; + } + + public Optional> role() { + return role; + } + + public final static Builder builder() { + return new Builder(); + } + + public Metadata withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Metadata withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Metadata withLibrarySectionID(double librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Metadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Metadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Metadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Metadata withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Metadata withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Metadata withRatingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Metadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Metadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Metadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Metadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Metadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Metadata withStudio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Metadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Metadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Metadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Metadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Metadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Metadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Metadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Metadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Metadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Metadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public Metadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Metadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public Metadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public Metadata withYear(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Metadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Metadata withTagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public Metadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public Metadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Metadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Metadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Metadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Metadata withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Metadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Metadata withOriginallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Metadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Metadata withAddedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Metadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Metadata withUpdatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Metadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Metadata withAudienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Metadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Metadata withChapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public Metadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public Metadata withPrimaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public Metadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public Metadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public Metadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Metadata withMedia(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Metadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Metadata withGenre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Metadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Metadata withDirector(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Metadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Metadata withWriter(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Metadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Metadata withCountry(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Metadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Metadata withRole(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Metadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Metadata other = (Metadata) o; + return + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + java.util.Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + java.util.Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.studio, other.studio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.contentRating, other.contentRating) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.rating, other.rating) && + java.util.Objects.deepEquals(this.audienceRating, other.audienceRating) && + java.util.Objects.deepEquals(this.year, other.year) && + java.util.Objects.deepEquals(this.tagline, other.tagline) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt) && + java.util.Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) && + java.util.Objects.deepEquals(this.chapterSource, other.chapterSource) && + java.util.Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && + java.util.Objects.deepEquals(this.ratingImage, other.ratingImage) && + java.util.Objects.deepEquals(this.media, other.media) && + java.util.Objects.deepEquals(this.genre, other.genre) && + java.util.Objects.deepEquals(this.director, other.director) && + java.util.Objects.deepEquals(this.writer, other.writer) && + java.util.Objects.deepEquals(this.country, other.country) && + java.util.Objects.deepEquals(this.role, other.role); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + media, + genre, + director, + writer, + country, + role); + } + + @Override + public String toString() { + return Utils.toString(Metadata.class, + "allowSync", allowSync, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "studio", studio, + "type", type, + "title", title, + "contentRating", contentRating, + "summary", summary, + "rating", rating, + "audienceRating", audienceRating, + "year", year, + "tagline", tagline, + "thumb", thumb, + "art", art, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "audienceRatingImage", audienceRatingImage, + "chapterSource", chapterSource, + "primaryExtraKey", primaryExtraKey, + "ratingImage", ratingImage, + "media", media, + "genre", genre, + "director", director, + "writer", writer, + "country", country, + "role", role); + } + + public final static class Builder { + + private Optional allowSync = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder librarySectionID(double librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public Builder librarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public Builder librarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public Builder librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder studio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public Builder year(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder tagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder originallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder audienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Builder chapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public Builder primaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public Builder ratingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Builder media(java.util.List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder genre(java.util.List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Builder genre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Builder director(java.util.List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Builder writer(java.util.List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Builder writer(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Builder country(java.util.List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder role(java.util.List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public Metadata build() { + return new Metadata( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + media, + genre, + director, + writer, + country, + role); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MinSize.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MinSize.java new file mode 100644 index 00000000..0a059487 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MinSize.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * MinSize - images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ +public enum MinSize { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private MinSize(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/MyPlex.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MyPlex.java new file mode 100644 index 00000000..08215f12 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/MyPlex.java @@ -0,0 +1,554 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class MyPlex { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("authToken") + private Optional authToken; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("username") + private Optional username; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mappingState") + private Optional mappingState; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mappingError") + private Optional mappingError; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("signInState") + private Optional signInState; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("publicAddress") + private Optional publicAddress; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("publicPort") + private Optional publicPort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("privateAddress") + private Optional privateAddress; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("privatePort") + private Optional privatePort; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subscriptionFeatures") + private Optional subscriptionFeatures; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subscriptionActive") + private Optional subscriptionActive; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subscriptionState") + private Optional subscriptionState; + + public MyPlex( + @JsonProperty("authToken") Optional authToken, + @JsonProperty("username") Optional username, + @JsonProperty("mappingState") Optional mappingState, + @JsonProperty("mappingError") Optional mappingError, + @JsonProperty("signInState") Optional signInState, + @JsonProperty("publicAddress") Optional publicAddress, + @JsonProperty("publicPort") Optional publicPort, + @JsonProperty("privateAddress") Optional privateAddress, + @JsonProperty("privatePort") Optional privatePort, + @JsonProperty("subscriptionFeatures") Optional subscriptionFeatures, + @JsonProperty("subscriptionActive") Optional subscriptionActive, + @JsonProperty("subscriptionState") Optional subscriptionState) { + Utils.checkNotNull(authToken, "authToken"); + Utils.checkNotNull(username, "username"); + Utils.checkNotNull(mappingState, "mappingState"); + Utils.checkNotNull(mappingError, "mappingError"); + Utils.checkNotNull(signInState, "signInState"); + Utils.checkNotNull(publicAddress, "publicAddress"); + Utils.checkNotNull(publicPort, "publicPort"); + Utils.checkNotNull(privateAddress, "privateAddress"); + Utils.checkNotNull(privatePort, "privatePort"); + Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); + Utils.checkNotNull(subscriptionActive, "subscriptionActive"); + Utils.checkNotNull(subscriptionState, "subscriptionState"); + this.authToken = authToken; + this.username = username; + this.mappingState = mappingState; + this.mappingError = mappingError; + this.signInState = signInState; + this.publicAddress = publicAddress; + this.publicPort = publicPort; + this.privateAddress = privateAddress; + this.privatePort = privatePort; + this.subscriptionFeatures = subscriptionFeatures; + this.subscriptionActive = subscriptionActive; + this.subscriptionState = subscriptionState; + } + + public Optional authToken() { + return authToken; + } + + public Optional username() { + return username; + } + + public Optional mappingState() { + return mappingState; + } + + public Optional mappingError() { + return mappingError; + } + + public Optional signInState() { + return signInState; + } + + public Optional publicAddress() { + return publicAddress; + } + + public Optional publicPort() { + return publicPort; + } + + public Optional privateAddress() { + return privateAddress; + } + + public Optional privatePort() { + return privatePort; + } + + public Optional subscriptionFeatures() { + return subscriptionFeatures; + } + + public Optional subscriptionActive() { + return subscriptionActive; + } + + public Optional subscriptionState() { + return subscriptionState; + } + + public final static Builder builder() { + return new Builder(); + } + + public MyPlex withAuthToken(String authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = Optional.ofNullable(authToken); + return this; + } + + public MyPlex withAuthToken(Optional authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = authToken; + return this; + } + + public MyPlex withUsername(String username) { + Utils.checkNotNull(username, "username"); + this.username = Optional.ofNullable(username); + return this; + } + + public MyPlex withUsername(Optional username) { + Utils.checkNotNull(username, "username"); + this.username = username; + return this; + } + + public MyPlex withMappingState(String mappingState) { + Utils.checkNotNull(mappingState, "mappingState"); + this.mappingState = Optional.ofNullable(mappingState); + return this; + } + + public MyPlex withMappingState(Optional mappingState) { + Utils.checkNotNull(mappingState, "mappingState"); + this.mappingState = mappingState; + return this; + } + + public MyPlex withMappingError(String mappingError) { + Utils.checkNotNull(mappingError, "mappingError"); + this.mappingError = Optional.ofNullable(mappingError); + return this; + } + + public MyPlex withMappingError(Optional mappingError) { + Utils.checkNotNull(mappingError, "mappingError"); + this.mappingError = mappingError; + return this; + } + + public MyPlex withSignInState(String signInState) { + Utils.checkNotNull(signInState, "signInState"); + this.signInState = Optional.ofNullable(signInState); + return this; + } + + public MyPlex withSignInState(Optional signInState) { + Utils.checkNotNull(signInState, "signInState"); + this.signInState = signInState; + return this; + } + + public MyPlex withPublicAddress(String publicAddress) { + Utils.checkNotNull(publicAddress, "publicAddress"); + this.publicAddress = Optional.ofNullable(publicAddress); + return this; + } + + public MyPlex withPublicAddress(Optional publicAddress) { + Utils.checkNotNull(publicAddress, "publicAddress"); + this.publicAddress = publicAddress; + return this; + } + + public MyPlex withPublicPort(double publicPort) { + Utils.checkNotNull(publicPort, "publicPort"); + this.publicPort = Optional.ofNullable(publicPort); + return this; + } + + public MyPlex withPublicPort(Optional publicPort) { + Utils.checkNotNull(publicPort, "publicPort"); + this.publicPort = publicPort; + return this; + } + + public MyPlex withPrivateAddress(String privateAddress) { + Utils.checkNotNull(privateAddress, "privateAddress"); + this.privateAddress = Optional.ofNullable(privateAddress); + return this; + } + + public MyPlex withPrivateAddress(Optional privateAddress) { + Utils.checkNotNull(privateAddress, "privateAddress"); + this.privateAddress = privateAddress; + return this; + } + + public MyPlex withPrivatePort(double privatePort) { + Utils.checkNotNull(privatePort, "privatePort"); + this.privatePort = Optional.ofNullable(privatePort); + return this; + } + + public MyPlex withPrivatePort(Optional privatePort) { + Utils.checkNotNull(privatePort, "privatePort"); + this.privatePort = privatePort; + return this; + } + + public MyPlex withSubscriptionFeatures(String subscriptionFeatures) { + Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); + this.subscriptionFeatures = Optional.ofNullable(subscriptionFeatures); + return this; + } + + public MyPlex withSubscriptionFeatures(Optional subscriptionFeatures) { + Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); + this.subscriptionFeatures = subscriptionFeatures; + return this; + } + + public MyPlex withSubscriptionActive(boolean subscriptionActive) { + Utils.checkNotNull(subscriptionActive, "subscriptionActive"); + this.subscriptionActive = Optional.ofNullable(subscriptionActive); + return this; + } + + public MyPlex withSubscriptionActive(Optional subscriptionActive) { + Utils.checkNotNull(subscriptionActive, "subscriptionActive"); + this.subscriptionActive = subscriptionActive; + return this; + } + + public MyPlex withSubscriptionState(String subscriptionState) { + Utils.checkNotNull(subscriptionState, "subscriptionState"); + this.subscriptionState = Optional.ofNullable(subscriptionState); + return this; + } + + public MyPlex withSubscriptionState(Optional subscriptionState) { + Utils.checkNotNull(subscriptionState, "subscriptionState"); + this.subscriptionState = subscriptionState; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MyPlex other = (MyPlex) o; + return + java.util.Objects.deepEquals(this.authToken, other.authToken) && + java.util.Objects.deepEquals(this.username, other.username) && + java.util.Objects.deepEquals(this.mappingState, other.mappingState) && + java.util.Objects.deepEquals(this.mappingError, other.mappingError) && + java.util.Objects.deepEquals(this.signInState, other.signInState) && + java.util.Objects.deepEquals(this.publicAddress, other.publicAddress) && + java.util.Objects.deepEquals(this.publicPort, other.publicPort) && + java.util.Objects.deepEquals(this.privateAddress, other.privateAddress) && + java.util.Objects.deepEquals(this.privatePort, other.privatePort) && + java.util.Objects.deepEquals(this.subscriptionFeatures, other.subscriptionFeatures) && + java.util.Objects.deepEquals(this.subscriptionActive, other.subscriptionActive) && + java.util.Objects.deepEquals(this.subscriptionState, other.subscriptionState); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + authToken, + username, + mappingState, + mappingError, + signInState, + publicAddress, + publicPort, + privateAddress, + privatePort, + subscriptionFeatures, + subscriptionActive, + subscriptionState); + } + + @Override + public String toString() { + return Utils.toString(MyPlex.class, + "authToken", authToken, + "username", username, + "mappingState", mappingState, + "mappingError", mappingError, + "signInState", signInState, + "publicAddress", publicAddress, + "publicPort", publicPort, + "privateAddress", privateAddress, + "privatePort", privatePort, + "subscriptionFeatures", subscriptionFeatures, + "subscriptionActive", subscriptionActive, + "subscriptionState", subscriptionState); + } + + public final static class Builder { + + private Optional authToken = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional mappingState = Optional.empty(); + + private Optional mappingError = Optional.empty(); + + private Optional signInState = Optional.empty(); + + private Optional publicAddress = Optional.empty(); + + private Optional publicPort = Optional.empty(); + + private Optional privateAddress = Optional.empty(); + + private Optional privatePort = Optional.empty(); + + private Optional subscriptionFeatures = Optional.empty(); + + private Optional subscriptionActive = Optional.empty(); + + private Optional subscriptionState = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder authToken(String authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = Optional.ofNullable(authToken); + return this; + } + + public Builder authToken(Optional authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = authToken; + return this; + } + + public Builder username(String username) { + Utils.checkNotNull(username, "username"); + this.username = Optional.ofNullable(username); + return this; + } + + public Builder username(Optional username) { + Utils.checkNotNull(username, "username"); + this.username = username; + return this; + } + + public Builder mappingState(String mappingState) { + Utils.checkNotNull(mappingState, "mappingState"); + this.mappingState = Optional.ofNullable(mappingState); + return this; + } + + public Builder mappingState(Optional mappingState) { + Utils.checkNotNull(mappingState, "mappingState"); + this.mappingState = mappingState; + return this; + } + + public Builder mappingError(String mappingError) { + Utils.checkNotNull(mappingError, "mappingError"); + this.mappingError = Optional.ofNullable(mappingError); + return this; + } + + public Builder mappingError(Optional mappingError) { + Utils.checkNotNull(mappingError, "mappingError"); + this.mappingError = mappingError; + return this; + } + + public Builder signInState(String signInState) { + Utils.checkNotNull(signInState, "signInState"); + this.signInState = Optional.ofNullable(signInState); + return this; + } + + public Builder signInState(Optional signInState) { + Utils.checkNotNull(signInState, "signInState"); + this.signInState = signInState; + return this; + } + + public Builder publicAddress(String publicAddress) { + Utils.checkNotNull(publicAddress, "publicAddress"); + this.publicAddress = Optional.ofNullable(publicAddress); + return this; + } + + public Builder publicAddress(Optional publicAddress) { + Utils.checkNotNull(publicAddress, "publicAddress"); + this.publicAddress = publicAddress; + return this; + } + + public Builder publicPort(double publicPort) { + Utils.checkNotNull(publicPort, "publicPort"); + this.publicPort = Optional.ofNullable(publicPort); + return this; + } + + public Builder publicPort(Optional publicPort) { + Utils.checkNotNull(publicPort, "publicPort"); + this.publicPort = publicPort; + return this; + } + + public Builder privateAddress(String privateAddress) { + Utils.checkNotNull(privateAddress, "privateAddress"); + this.privateAddress = Optional.ofNullable(privateAddress); + return this; + } + + public Builder privateAddress(Optional privateAddress) { + Utils.checkNotNull(privateAddress, "privateAddress"); + this.privateAddress = privateAddress; + return this; + } + + public Builder privatePort(double privatePort) { + Utils.checkNotNull(privatePort, "privatePort"); + this.privatePort = Optional.ofNullable(privatePort); + return this; + } + + public Builder privatePort(Optional privatePort) { + Utils.checkNotNull(privatePort, "privatePort"); + this.privatePort = privatePort; + return this; + } + + public Builder subscriptionFeatures(String subscriptionFeatures) { + Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); + this.subscriptionFeatures = Optional.ofNullable(subscriptionFeatures); + return this; + } + + public Builder subscriptionFeatures(Optional subscriptionFeatures) { + Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); + this.subscriptionFeatures = subscriptionFeatures; + return this; + } + + public Builder subscriptionActive(boolean subscriptionActive) { + Utils.checkNotNull(subscriptionActive, "subscriptionActive"); + this.subscriptionActive = Optional.ofNullable(subscriptionActive); + return this; + } + + public Builder subscriptionActive(Optional subscriptionActive) { + Utils.checkNotNull(subscriptionActive, "subscriptionActive"); + this.subscriptionActive = subscriptionActive; + return this; + } + + public Builder subscriptionState(String subscriptionState) { + Utils.checkNotNull(subscriptionState, "subscriptionState"); + this.subscriptionState = Optional.ofNullable(subscriptionState); + return this; + } + + public Builder subscriptionState(Optional subscriptionState) { + Utils.checkNotNull(subscriptionState, "subscriptionState"); + this.subscriptionState = subscriptionState; + return this; + } + + public MyPlex build() { + return new MyPlex( + authToken, + username, + mappingState, + mappingError, + signInState, + publicAddress, + publicPort, + privateAddress, + privatePort, + subscriptionFeatures, + subscriptionActive, + subscriptionState); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/OnlyTransient.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/OnlyTransient.java new file mode 100644 index 00000000..cd27c0f1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/OnlyTransient.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * OnlyTransient - Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ +public enum OnlyTransient { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private OnlyTransient(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Operator.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Operator.java new file mode 100644 index 00000000..71a2dfe6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Operator.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Operator { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + public Operator( + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.key = key; + this.title = title; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public final static Builder builder() { + return new Builder(); + } + + public Operator withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Operator withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Operator withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Operator withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Operator other = (Operator) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + title); + } + + @Override + public String toString() { + return Utils.toString(Operator.class, + "key", key, + "title", title); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Operator build() { + return new Operator( + key, + title); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Part.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Part.java new file mode 100644 index 00000000..5c4a71a2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Part.java @@ -0,0 +1,472 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Part { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasThumbnail") + private Optional hasThumbnail; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + public Part( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("container") Optional container, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("hasThumbnail") Optional hasThumbnail, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("videoProfile") Optional videoProfile) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(videoProfile, "videoProfile"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.container = container; + this.has64bitOffsets = has64bitOffsets; + this.hasThumbnail = hasThumbnail; + this.optimizedForStreaming = optimizedForStreaming; + this.videoProfile = videoProfile; + } + + public Optional id() { + return id; + } + + public Optional key() { + return key; + } + + public Optional duration() { + return duration; + } + + public Optional file() { + return file; + } + + public Optional size() { + return size; + } + + public Optional container() { + return container; + } + + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + public Optional hasThumbnail() { + return hasThumbnail; + } + + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + public Optional videoProfile() { + return videoProfile; + } + + public final static Builder builder() { + return new Builder(); + } + + public Part withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Part withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Part withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Part withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Part withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Part withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Part withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Part withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Part withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Part withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Part withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Part withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Part withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Part withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Part withHasThumbnail(double hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public Part withHasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = hasThumbnail; + return this; + } + + public Part withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Part withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Part withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Part withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Part other = (Part) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.file, other.file) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + java.util.Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) && + java.util.Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + java.util.Objects.deepEquals(this.videoProfile, other.videoProfile); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + key, + duration, + file, + size, + container, + has64bitOffsets, + hasThumbnail, + optimizedForStreaming, + videoProfile); + } + + @Override + public String toString() { + return Utils.toString(Part.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "container", container, + "has64bitOffsets", has64bitOffsets, + "hasThumbnail", hasThumbnail, + "optimizedForStreaming", optimizedForStreaming, + "videoProfile", videoProfile); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional hasThumbnail = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder hasThumbnail(double hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public Builder hasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = hasThumbnail; + return this; + } + + public Builder optimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public Builder videoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Part build() { + return new Part( + id, + key, + duration, + file, + size, + container, + has64bitOffsets, + hasThumbnail, + optimizedForStreaming, + videoProfile); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PathParamTaskName.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PathParamTaskName.java new file mode 100644 index 00000000..6f8c0b8f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PathParamTaskName.java @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * PathParamTaskName - The name of the task to be started. + */ +public enum PathParamTaskName { + BACKUP_DATABASE("BackupDatabase"), + BUILD_GRACENOTE_COLLECTIONS("BuildGracenoteCollections"), + CHECK_FOR_UPDATES("CheckForUpdates"), + CLEAN_OLD_BUNDLES("CleanOldBundles"), + CLEAN_OLD_CACHE_FILES("CleanOldCacheFiles"), + DEEP_MEDIA_ANALYSIS("DeepMediaAnalysis"), + GENERATE_AUTO_TAGS("GenerateAutoTags"), + GENERATE_CHAPTER_THUMBS("GenerateChapterThumbs"), + GENERATE_MEDIA_INDEX_FILES("GenerateMediaIndexFiles"), + OPTIMIZE_DATABASE("OptimizeDatabase"), + REFRESH_LIBRARIES("RefreshLibraries"), + REFRESH_LOCAL_MEDIA("RefreshLocalMedia"), + REFRESH_PERIODIC_METADATA("RefreshPeriodicMetadata"), + UPGRADE_MEDIA_ANALYSIS("UpgradeMediaAnalysis"); + + @JsonValue + private final String value; + + private PathParamTaskName(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchErrors.java new file mode 100644 index 00000000..854913d2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class PerformSearchErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public PerformSearchErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public PerformSearchErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public PerformSearchErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public PerformSearchErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public PerformSearchErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public PerformSearchErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public PerformSearchErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformSearchErrors other = (PerformSearchErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(PerformSearchErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public PerformSearchErrors build() { + return new PerformSearchErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequest.java new file mode 100644 index 00000000..0abfdd24 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequest.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class PerformSearchRequest { + + /** + * The query term + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private String query; + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionId") + private Optional sectionId; + + /** + * The number of items to return per hub + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + public PerformSearchRequest( + String query, + Optional sectionId, + Optional limit) { + Utils.checkNotNull(query, "query"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(limit, "limit"); + this.query = query; + this.sectionId = sectionId; + this.limit = limit; + } + + /** + * The query term + */ + public String query() { + return query; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public Optional sectionId() { + return sectionId; + } + + /** + * The number of items to return per hub + */ + public Optional limit() { + return limit; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The query term + */ + public PerformSearchRequest withQuery(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public PerformSearchRequest withSectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.ofNullable(sectionId); + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public PerformSearchRequest withSectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The number of items to return per hub + */ + public PerformSearchRequest withLimit(double limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The number of items to return per hub + */ + public PerformSearchRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformSearchRequest other = (PerformSearchRequest) o; + return + java.util.Objects.deepEquals(this.query, other.query) && + java.util.Objects.deepEquals(this.sectionId, other.sectionId) && + java.util.Objects.deepEquals(this.limit, other.limit); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + query, + sectionId, + limit); + } + + @Override + public String toString() { + return Utils.toString(PerformSearchRequest.class, + "query", query, + "sectionId", sectionId, + "limit", limit); + } + + public final static class Builder { + + private String query; + + private Optional sectionId = Optional.empty(); + + private Optional limit; + + private Builder() { + // force use of static builder() method + } + + /** + * The query term + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public Builder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.ofNullable(sectionId); + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public Builder sectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The number of items to return per hub + */ + public Builder limit(double limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The number of items to return per hub + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public PerformSearchRequest build() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + return new PerformSearchRequest( + query, + sectionId, + limit); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "3", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequestBuilder.java new file mode 100644 index 00000000..451edb97 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class PerformSearchRequestBuilder { + + private String query; + private Optional sectionId = Optional.empty(); + private Optional limit = Utils.readDefaultOrConstValue( + "limit", + "3", + new TypeReference>() {}); + private final SDKMethodInterfaces.MethodCallPerformSearch sdk; + + public PerformSearchRequestBuilder(SDKMethodInterfaces.MethodCallPerformSearch sdk) { + this.sdk = sdk; + } + + public PerformSearchRequestBuilder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + public PerformSearchRequestBuilder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.of(sectionId); + return this; + } + + public PerformSearchRequestBuilder sectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public PerformSearchRequestBuilder limit(double limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.of(limit); + return this; + } + + public PerformSearchRequestBuilder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public PerformSearchResponse call() throws Exception { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + return sdk.performSearch( + query, + sectionId, + limit); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "3", + new TypeReference>() {}); +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponse.java new file mode 100644 index 00000000..60ea365d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class PerformSearchResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public PerformSearchResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public PerformSearchResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PerformSearchResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PerformSearchResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public PerformSearchResponse withObject(PerformSearchResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public PerformSearchResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformSearchResponse other = (PerformSearchResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(PerformSearchResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(PerformSearchResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public PerformSearchResponse build() { + return new PerformSearchResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponseBody.java new file mode 100644 index 00000000..9704055d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformSearchResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * PerformSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class PerformSearchResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public PerformSearchResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public PerformSearchResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public PerformSearchResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformSearchResponseBody other = (PerformSearchResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(PerformSearchResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public PerformSearchResponseBody build() { + return new PerformSearchResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchErrors.java new file mode 100644 index 00000000..fd4dcc25 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class PerformVoiceSearchErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public PerformVoiceSearchErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public PerformVoiceSearchErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public PerformVoiceSearchErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public PerformVoiceSearchErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public PerformVoiceSearchErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public PerformVoiceSearchErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public PerformVoiceSearchErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformVoiceSearchErrors other = (PerformVoiceSearchErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(PerformVoiceSearchErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public PerformVoiceSearchErrors build() { + return new PerformVoiceSearchErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequest.java new file mode 100644 index 00000000..b86689a9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequest.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class PerformVoiceSearchRequest { + + /** + * The query term + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private String query; + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionId") + private Optional sectionId; + + /** + * The number of items to return per hub + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + public PerformVoiceSearchRequest( + String query, + Optional sectionId, + Optional limit) { + Utils.checkNotNull(query, "query"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(limit, "limit"); + this.query = query; + this.sectionId = sectionId; + this.limit = limit; + } + + /** + * The query term + */ + public String query() { + return query; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public Optional sectionId() { + return sectionId; + } + + /** + * The number of items to return per hub + */ + public Optional limit() { + return limit; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The query term + */ + public PerformVoiceSearchRequest withQuery(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public PerformVoiceSearchRequest withSectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.ofNullable(sectionId); + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public PerformVoiceSearchRequest withSectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The number of items to return per hub + */ + public PerformVoiceSearchRequest withLimit(double limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The number of items to return per hub + */ + public PerformVoiceSearchRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformVoiceSearchRequest other = (PerformVoiceSearchRequest) o; + return + java.util.Objects.deepEquals(this.query, other.query) && + java.util.Objects.deepEquals(this.sectionId, other.sectionId) && + java.util.Objects.deepEquals(this.limit, other.limit); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + query, + sectionId, + limit); + } + + @Override + public String toString() { + return Utils.toString(PerformVoiceSearchRequest.class, + "query", query, + "sectionId", sectionId, + "limit", limit); + } + + public final static class Builder { + + private String query; + + private Optional sectionId = Optional.empty(); + + private Optional limit; + + private Builder() { + // force use of static builder() method + } + + /** + * The query term + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public Builder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.ofNullable(sectionId); + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + public Builder sectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The number of items to return per hub + */ + public Builder limit(double limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The number of items to return per hub + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public PerformVoiceSearchRequest build() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + return new PerformVoiceSearchRequest( + query, + sectionId, + limit); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "3", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequestBuilder.java new file mode 100644 index 00000000..2d77fb09 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class PerformVoiceSearchRequestBuilder { + + private String query; + private Optional sectionId = Optional.empty(); + private Optional limit = Utils.readDefaultOrConstValue( + "limit", + "3", + new TypeReference>() {}); + private final SDKMethodInterfaces.MethodCallPerformVoiceSearch sdk; + + public PerformVoiceSearchRequestBuilder(SDKMethodInterfaces.MethodCallPerformVoiceSearch sdk) { + this.sdk = sdk; + } + + public PerformVoiceSearchRequestBuilder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + public PerformVoiceSearchRequestBuilder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.of(sectionId); + return this; + } + + public PerformVoiceSearchRequestBuilder sectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public PerformVoiceSearchRequestBuilder limit(double limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.of(limit); + return this; + } + + public PerformVoiceSearchRequestBuilder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public PerformVoiceSearchResponse call() throws Exception { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + return sdk.performVoiceSearch( + query, + sectionId, + limit); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "3", + new TypeReference>() {}); +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponse.java new file mode 100644 index 00000000..16ea2911 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class PerformVoiceSearchResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public PerformVoiceSearchResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public PerformVoiceSearchResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PerformVoiceSearchResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PerformVoiceSearchResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public PerformVoiceSearchResponse withObject(PerformVoiceSearchResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public PerformVoiceSearchResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformVoiceSearchResponse other = (PerformVoiceSearchResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(PerformVoiceSearchResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(PerformVoiceSearchResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public PerformVoiceSearchResponse build() { + return new PerformVoiceSearchResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponseBody.java new file mode 100644 index 00000000..626c1770 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PerformVoiceSearchResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * PerformVoiceSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class PerformVoiceSearchResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public PerformVoiceSearchResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public PerformVoiceSearchResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public PerformVoiceSearchResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformVoiceSearchResponseBody other = (PerformVoiceSearchResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(PerformVoiceSearchResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public PerformVoiceSearchResponseBody build() { + return new PerformVoiceSearchResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Player.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Player.java new file mode 100644 index 00000000..4fc71669 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Player.java @@ -0,0 +1,677 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Player { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("address") + private Optional address; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("model") + private Optional model; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platform") + private Optional platform; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platformVersion") + private Optional platformVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("product") + private Optional product; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("profile") + private Optional profile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("remotePublicAddress") + private Optional remotePublicAddress; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("state") + private Optional state; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("local") + private Optional local; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("relayed") + private Optional relayed; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secure") + private Optional secure; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userID") + private Optional userID; + + public Player( + @JsonProperty("address") Optional address, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("model") Optional model, + @JsonProperty("platform") Optional platform, + @JsonProperty("platformVersion") Optional platformVersion, + @JsonProperty("product") Optional product, + @JsonProperty("profile") Optional profile, + @JsonProperty("remotePublicAddress") Optional remotePublicAddress, + @JsonProperty("state") Optional state, + @JsonProperty("title") Optional title, + @JsonProperty("version") Optional version, + @JsonProperty("local") Optional local, + @JsonProperty("relayed") Optional relayed, + @JsonProperty("secure") Optional secure, + @JsonProperty("userID") Optional userID) { + Utils.checkNotNull(address, "address"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(profile, "profile"); + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + Utils.checkNotNull(state, "state"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(local, "local"); + Utils.checkNotNull(relayed, "relayed"); + Utils.checkNotNull(secure, "secure"); + Utils.checkNotNull(userID, "userID"); + this.address = address; + this.machineIdentifier = machineIdentifier; + this.model = model; + this.platform = platform; + this.platformVersion = platformVersion; + this.product = product; + this.profile = profile; + this.remotePublicAddress = remotePublicAddress; + this.state = state; + this.title = title; + this.version = version; + this.local = local; + this.relayed = relayed; + this.secure = secure; + this.userID = userID; + } + + public Optional address() { + return address; + } + + public Optional machineIdentifier() { + return machineIdentifier; + } + + public Optional model() { + return model; + } + + public Optional platform() { + return platform; + } + + public Optional platformVersion() { + return platformVersion; + } + + public Optional product() { + return product; + } + + public Optional profile() { + return profile; + } + + public Optional remotePublicAddress() { + return remotePublicAddress; + } + + public Optional state() { + return state; + } + + public Optional title() { + return title; + } + + public Optional version() { + return version; + } + + public Optional local() { + return local; + } + + public Optional relayed() { + return relayed; + } + + public Optional secure() { + return secure; + } + + public Optional userID() { + return userID; + } + + public final static Builder builder() { + return new Builder(); + } + + public Player withAddress(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + public Player withAddress(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + public Player withMachineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Player withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public Player withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + public Player withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + public Player withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Player withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public Player withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + public Player withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + public Player withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + public Player withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + public Player withProfile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public Player withProfile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public Player withRemotePublicAddress(String remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = Optional.ofNullable(remotePublicAddress); + return this; + } + + public Player withRemotePublicAddress(Optional remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = remotePublicAddress; + return this; + } + + public Player withState(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + public Player withState(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public Player withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Player withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Player withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Player withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Player withLocal(boolean local) { + Utils.checkNotNull(local, "local"); + this.local = Optional.ofNullable(local); + return this; + } + + public Player withLocal(Optional local) { + Utils.checkNotNull(local, "local"); + this.local = local; + return this; + } + + public Player withRelayed(boolean relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = Optional.ofNullable(relayed); + return this; + } + + public Player withRelayed(Optional relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = relayed; + return this; + } + + public Player withSecure(boolean secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = Optional.ofNullable(secure); + return this; + } + + public Player withSecure(Optional secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = secure; + return this; + } + + public Player withUserID(int userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + public Player withUserID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Player other = (Player) o; + return + java.util.Objects.deepEquals(this.address, other.address) && + java.util.Objects.deepEquals(this.machineIdentifier, other.machineIdentifier) && + java.util.Objects.deepEquals(this.model, other.model) && + java.util.Objects.deepEquals(this.platform, other.platform) && + java.util.Objects.deepEquals(this.platformVersion, other.platformVersion) && + java.util.Objects.deepEquals(this.product, other.product) && + java.util.Objects.deepEquals(this.profile, other.profile) && + java.util.Objects.deepEquals(this.remotePublicAddress, other.remotePublicAddress) && + java.util.Objects.deepEquals(this.state, other.state) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.version, other.version) && + java.util.Objects.deepEquals(this.local, other.local) && + java.util.Objects.deepEquals(this.relayed, other.relayed) && + java.util.Objects.deepEquals(this.secure, other.secure) && + java.util.Objects.deepEquals(this.userID, other.userID); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + address, + machineIdentifier, + model, + platform, + platformVersion, + product, + profile, + remotePublicAddress, + state, + title, + version, + local, + relayed, + secure, + userID); + } + + @Override + public String toString() { + return Utils.toString(Player.class, + "address", address, + "machineIdentifier", machineIdentifier, + "model", model, + "platform", platform, + "platformVersion", platformVersion, + "product", product, + "profile", profile, + "remotePublicAddress", remotePublicAddress, + "state", state, + "title", title, + "version", version, + "local", local, + "relayed", relayed, + "secure", secure, + "userID", userID); + } + + public final static class Builder { + + private Optional address = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional remotePublicAddress = Optional.empty(); + + private Optional state = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional local = Optional.empty(); + + private Optional relayed = Optional.empty(); + + private Optional secure = Optional.empty(); + + private Optional userID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder address(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + public Builder address(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + public Builder machineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + public Builder profile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public Builder profile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public Builder remotePublicAddress(String remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = Optional.ofNullable(remotePublicAddress); + return this; + } + + public Builder remotePublicAddress(Optional remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = remotePublicAddress; + return this; + } + + public Builder state(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + public Builder state(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Builder local(boolean local) { + Utils.checkNotNull(local, "local"); + this.local = Optional.ofNullable(local); + return this; + } + + public Builder local(Optional local) { + Utils.checkNotNull(local, "local"); + this.local = local; + return this; + } + + public Builder relayed(boolean relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = Optional.ofNullable(relayed); + return this; + } + + public Builder relayed(Optional relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = relayed; + return this; + } + + public Builder secure(boolean secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = Optional.ofNullable(secure); + return this; + } + + public Builder secure(Optional secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = secure; + return this; + } + + public Builder userID(int userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + public Builder userID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + public Player build() { + return new Player( + address, + machineIdentifier, + model, + platform, + platformVersion, + product, + profile, + remotePublicAddress, + state, + title, + version, + local, + relayed, + secure, + userID); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/PlaylistType.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PlaylistType.java new file mode 100644 index 00000000..6e863744 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/PlaylistType.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * PlaylistType - limit to a type of playlist. + */ +public enum PlaylistType { + AUDIO("audio"), + VIDEO("video"), + PHOTO("photo"); + + @JsonValue + private final String value; + + private PlaylistType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Producer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Producer.java new file mode 100644 index 00000000..f3d819be --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Producer.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Producer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + public Producer( + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(thumb, "thumb"); + this.id = id; + this.filter = filter; + this.tag = tag; + this.tagKey = tagKey; + this.thumb = thumb; + } + + public Optional id() { + return id; + } + + public Optional filter() { + return filter; + } + + public Optional tag() { + return tag; + } + + public Optional tagKey() { + return tagKey; + } + + public Optional thumb() { + return thumb; + } + + public final static Builder builder() { + return new Builder(); + } + + public Producer withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Producer withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Producer withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Producer withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Producer withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Producer withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Producer withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public Producer withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public Producer withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Producer withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Producer other = (Producer) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.filter, other.filter) && + java.util.Objects.deepEquals(this.tag, other.tag) && + java.util.Objects.deepEquals(this.tagKey, other.tagKey) && + java.util.Objects.deepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + filter, + tag, + tagKey, + thumb); + } + + @Override + public String toString() { + return Utils.toString(Producer.class, + "id", id, + "filter", filter, + "tag", tag, + "tagKey", tagKey, + "thumb", thumb); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Builder tagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + public Builder tagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Producer build() { + return new Producer( + id, + filter, + tag, + tagKey, + thumb); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Provider.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Provider.java new file mode 100644 index 00000000..3e72bc33 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Provider.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Provider { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + public Provider( + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.key = key; + this.title = title; + this.type = type; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public Optional type() { + return type; + } + + public final static Builder builder() { + return new Builder(); + } + + public Provider withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Provider withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Provider withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Provider withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Provider withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Provider withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Provider other = (Provider) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + title, + type); + } + + @Override + public String toString() { + return Utils.toString(Provider.class, + "key", key, + "title", title, + "type", type); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Provider build() { + return new Provider( + key, + title, + type); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamOnlyTransient.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamOnlyTransient.java new file mode 100644 index 00000000..77a49dcb --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamOnlyTransient.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * QueryParamOnlyTransient - Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ +public enum QueryParamOnlyTransient { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private QueryParamOnlyTransient(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamSmart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamSmart.java new file mode 100644 index 00000000..c482b690 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamSmart.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * QueryParamSmart - type of playlists to return (default is all). + */ +public enum QueryParamSmart { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private QueryParamSmart(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamType.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamType.java new file mode 100644 index 00000000..99c7c7f5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/QueryParamType.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * QueryParamType - type of playlist to create + */ +public enum QueryParamType { + AUDIO("audio"), + VIDEO("video"), + PHOTO("photo"); + + @JsonValue + private final String value; + + private QueryParamType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Ratings.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Ratings.java new file mode 100644 index 00000000..49a58f29 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Ratings.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Ratings { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("image") + private Optional image; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("value") + private Optional value; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + public Ratings( + @JsonProperty("image") Optional image, + @JsonProperty("value") Optional value, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(value, "value"); + Utils.checkNotNull(type, "type"); + this.image = image; + this.value = value; + this.type = type; + } + + public Optional image() { + return image; + } + + public Optional value() { + return value; + } + + public Optional type() { + return type; + } + + public final static Builder builder() { + return new Builder(); + } + + public Ratings withImage(String image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + public Ratings withImage(Optional image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + public Ratings withValue(double value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + public Ratings withValue(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public Ratings withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Ratings withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Ratings other = (Ratings) o; + return + java.util.Objects.deepEquals(this.image, other.image) && + java.util.Objects.deepEquals(this.value, other.value) && + java.util.Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + image, + value, + type); + } + + @Override + public String toString() { + return Utils.toString(Ratings.class, + "image", image, + "value", value, + "type", type); + } + + public final static class Builder { + + private Optional image = Optional.empty(); + + private Optional value = Optional.empty(); + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder image(String image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + public Builder image(Optional image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + public Builder value(double value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + public Builder value(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Ratings build() { + return new Ratings( + image, + value, + type); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryErrors.java new file mode 100644 index 00000000..434994bd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class RefreshLibraryErrors { + + @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; + + public RefreshLibraryErrors( + @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 Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public RefreshLibraryErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public RefreshLibraryErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public RefreshLibraryErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public RefreshLibraryErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public RefreshLibraryErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public RefreshLibraryErrors 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; + } + RefreshLibraryErrors other = (RefreshLibraryErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(RefreshLibraryErrors.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(double 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(double 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 RefreshLibraryErrors build() { + return new RefreshLibraryErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequest.java new file mode 100644 index 00000000..88289ce8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class RefreshLibraryRequest { + + /** + * the Id of the library to refresh + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private double sectionId; + + public RefreshLibraryRequest( + double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + } + + /** + * the Id of the library to refresh + */ + public double sectionId() { + return sectionId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the Id of the library to refresh + */ + public RefreshLibraryRequest withSectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshLibraryRequest other = (RefreshLibraryRequest) o; + return + java.util.Objects.deepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + sectionId); + } + + @Override + public String toString() { + return Utils.toString(RefreshLibraryRequest.class, + "sectionId", sectionId); + } + + public final static class Builder { + + private Double sectionId; + + private Builder() { + // force use of static builder() method + } + + /** + * the Id of the library to refresh + */ + public Builder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public RefreshLibraryRequest build() { + return new RefreshLibraryRequest( + sectionId); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequestBuilder.java new file mode 100644 index 00000000..e1761209 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class RefreshLibraryRequestBuilder { + + private Double sectionId; + private final SDKMethodInterfaces.MethodCallRefreshLibrary sdk; + + public RefreshLibraryRequestBuilder(SDKMethodInterfaces.MethodCallRefreshLibrary sdk) { + this.sdk = sdk; + } + + public RefreshLibraryRequestBuilder sectionId(double sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public RefreshLibraryResponse call() throws Exception { + + return sdk.refreshLibrary( + sectionId); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponse.java new file mode 100644 index 00000000..e9f08d60 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class RefreshLibraryResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public RefreshLibraryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public RefreshLibraryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshLibraryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshLibraryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public RefreshLibraryResponse withObject(RefreshLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public RefreshLibraryResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshLibraryResponse other = (RefreshLibraryResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(RefreshLibraryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(RefreshLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public RefreshLibraryResponse build() { + return new RefreshLibraryResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponseBody.java new file mode 100644 index 00000000..c4f059e8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/RefreshLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * RefreshLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class RefreshLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public RefreshLibraryResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public RefreshLibraryResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public RefreshLibraryResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshLibraryResponseBody other = (RefreshLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(RefreshLibraryResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public RefreshLibraryResponseBody build() { + return new RefreshLibraryResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Release.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Release.java new file mode 100644 index 00000000..7aa44127 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Release.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Release { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("added") + private Optional added; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("fixed") + private Optional fixed; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("downloadURL") + private Optional downloadURL; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("state") + private Optional state; + + public Release( + @JsonProperty("key") Optional key, + @JsonProperty("version") Optional version, + @JsonProperty("added") Optional added, + @JsonProperty("fixed") Optional fixed, + @JsonProperty("downloadURL") Optional downloadURL, + @JsonProperty("state") Optional state) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(added, "added"); + Utils.checkNotNull(fixed, "fixed"); + Utils.checkNotNull(downloadURL, "downloadURL"); + Utils.checkNotNull(state, "state"); + this.key = key; + this.version = version; + this.added = added; + this.fixed = fixed; + this.downloadURL = downloadURL; + this.state = state; + } + + public Optional key() { + return key; + } + + public Optional version() { + return version; + } + + public Optional added() { + return added; + } + + public Optional fixed() { + return fixed; + } + + public Optional downloadURL() { + return downloadURL; + } + + public Optional state() { + return state; + } + + public final static Builder builder() { + return new Builder(); + } + + public Release withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Release withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Release withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Release withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Release withAdded(String added) { + Utils.checkNotNull(added, "added"); + this.added = Optional.ofNullable(added); + return this; + } + + public Release withAdded(Optional added) { + Utils.checkNotNull(added, "added"); + this.added = added; + return this; + } + + public Release withFixed(String fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = Optional.ofNullable(fixed); + return this; + } + + public Release withFixed(Optional fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = fixed; + return this; + } + + public Release withDownloadURL(String downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = Optional.ofNullable(downloadURL); + return this; + } + + public Release withDownloadURL(Optional downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = downloadURL; + return this; + } + + public Release withState(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + public Release withState(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Release other = (Release) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.version, other.version) && + java.util.Objects.deepEquals(this.added, other.added) && + java.util.Objects.deepEquals(this.fixed, other.fixed) && + java.util.Objects.deepEquals(this.downloadURL, other.downloadURL) && + java.util.Objects.deepEquals(this.state, other.state); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + version, + added, + fixed, + downloadURL, + state); + } + + @Override + public String toString() { + return Utils.toString(Release.class, + "key", key, + "version", version, + "added", added, + "fixed", fixed, + "downloadURL", downloadURL, + "state", state); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional added = Optional.empty(); + + private Optional fixed = Optional.empty(); + + private Optional downloadURL = Optional.empty(); + + private Optional state = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Builder added(String added) { + Utils.checkNotNull(added, "added"); + this.added = Optional.ofNullable(added); + return this; + } + + public Builder added(Optional added) { + Utils.checkNotNull(added, "added"); + this.added = added; + return this; + } + + public Builder fixed(String fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = Optional.ofNullable(fixed); + return this; + } + + public Builder fixed(Optional fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = fixed; + return this; + } + + public Builder downloadURL(String downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = Optional.ofNullable(downloadURL); + return this; + } + + public Builder downloadURL(Optional downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = downloadURL; + return this; + } + + public Builder state(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + public Builder state(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public Release build() { + return new Release( + key, + version, + added, + fixed, + downloadURL, + state); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Role.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Role.java new file mode 100644 index 00000000..ff1a42ac --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Role.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Role { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public Role( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public Role withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Role withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Role other = (Role) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(Role.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Role build() { + return new Role( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/SDKMethodInterfaces.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SDKMethodInterfaces.java new file mode 100644 index 00000000..966b8c5f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SDKMethodInterfaces.java @@ -0,0 +1,385 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class SDKMethodInterfaces { + + public interface MethodCallGetServerCapabilities { + lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse getServerCapabilitiesDirect() throws Exception; + } + + + public interface MethodCallGetServerPreferences { + lukehagar.plexapi.plexapi.models.operations.GetServerPreferencesResponse getServerPreferencesDirect() throws Exception; + } + + + public interface MethodCallGetAvailableClients { + lukehagar.plexapi.plexapi.models.operations.GetAvailableClientsResponse getAvailableClientsDirect() throws Exception; + } + + + public interface MethodCallGetDevices { + lukehagar.plexapi.plexapi.models.operations.GetDevicesResponse getDevicesDirect() throws Exception; + } + + + public interface MethodCallGetServerIdentity { + lukehagar.plexapi.plexapi.models.operations.GetServerIdentityResponse getServerIdentityDirect() throws Exception; + } + + + public interface MethodCallGetMyPlexAccount { + lukehagar.plexapi.plexapi.models.operations.GetMyPlexAccountResponse getMyPlexAccountDirect() throws Exception; + } + + + public interface MethodCallGetResizedPhoto { + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoResponse getResizedPhoto( + lukehagar.plexapi.plexapi.models.operations.GetResizedPhotoRequest request) throws Exception; + } + + + public interface MethodCallGetServerList { + lukehagar.plexapi.plexapi.models.operations.GetServerListResponse getServerListDirect() throws Exception; + } + + + public interface MethodCallMarkPlayed { + lukehagar.plexapi.plexapi.models.operations.MarkPlayedResponse markPlayed( + double key) throws Exception; + } + + + public interface MethodCallMarkUnplayed { + lukehagar.plexapi.plexapi.models.operations.MarkUnplayedResponse markUnplayed( + double key) throws Exception; + } + + + public interface MethodCallUpdatePlayProgress { + lukehagar.plexapi.plexapi.models.operations.UpdatePlayProgressResponse updatePlayProgress( + String key, + double time, + String state) throws Exception; + } + + + public interface MethodCallGetTimeline { + lukehagar.plexapi.plexapi.models.operations.GetTimelineResponse getTimeline( + lukehagar.plexapi.plexapi.models.operations.GetTimelineRequest request) throws Exception; + } + + + public interface MethodCallStartUniversalTranscode { + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeResponse startUniversalTranscode( + lukehagar.plexapi.plexapi.models.operations.StartUniversalTranscodeRequest request) throws Exception; + } + + + public interface MethodCallGetServerActivities { + lukehagar.plexapi.plexapi.models.operations.GetServerActivitiesResponse getServerActivitiesDirect() throws Exception; + } + + + public interface MethodCallCancelServerActivities { + lukehagar.plexapi.plexapi.models.operations.CancelServerActivitiesResponse cancelServerActivities( + String activityUUID) throws Exception; + } + + + public interface MethodCallGetButlerTasks { + lukehagar.plexapi.plexapi.models.operations.GetButlerTasksResponse getButlerTasksDirect() throws Exception; + } + + + public interface MethodCallStartAllTasks { + lukehagar.plexapi.plexapi.models.operations.StartAllTasksResponse startAllTasksDirect() throws Exception; + } + + + public interface MethodCallStopAllTasks { + lukehagar.plexapi.plexapi.models.operations.StopAllTasksResponse stopAllTasksDirect() throws Exception; + } + + + public interface MethodCallStartTask { + lukehagar.plexapi.plexapi.models.operations.StartTaskResponse startTask( + lukehagar.plexapi.plexapi.models.operations.TaskName taskName) throws Exception; + } + + + public interface MethodCallStopTask { + lukehagar.plexapi.plexapi.models.operations.StopTaskResponse stopTask( + lukehagar.plexapi.plexapi.models.operations.PathParamTaskName taskName) throws Exception; + } + + + public interface MethodCallGetGlobalHubs { + lukehagar.plexapi.plexapi.models.operations.GetGlobalHubsResponse getGlobalHubs( + Optional count, + Optional onlyTransient) throws Exception; + } + + + public interface MethodCallGetLibraryHubs { + lukehagar.plexapi.plexapi.models.operations.GetLibraryHubsResponse getLibraryHubs( + double sectionId, + Optional count, + Optional onlyTransient) throws Exception; + } + + + public interface MethodCallPerformSearch { + lukehagar.plexapi.plexapi.models.operations.PerformSearchResponse performSearch( + String query, + Optional sectionId, + Optional limit) throws Exception; + } + + + public interface MethodCallPerformVoiceSearch { + lukehagar.plexapi.plexapi.models.operations.PerformVoiceSearchResponse performVoiceSearch( + String query, + Optional sectionId, + Optional limit) throws Exception; + } + + + public interface MethodCallGetSearchResults { + lukehagar.plexapi.plexapi.models.operations.GetSearchResultsResponse getSearchResults( + String query) throws Exception; + } + + + public interface MethodCallGetFileHash { + lukehagar.plexapi.plexapi.models.operations.GetFileHashResponse getFileHash( + String url, + Optional type) throws Exception; + } + + + public interface MethodCallGetRecentlyAdded { + lukehagar.plexapi.plexapi.models.operations.GetRecentlyAddedResponse getRecentlyAddedDirect() throws Exception; + } + + + public interface MethodCallGetLibraries { + lukehagar.plexapi.plexapi.models.operations.GetLibrariesResponse getLibrariesDirect() throws Exception; + } + + + public interface MethodCallGetLibrary { + lukehagar.plexapi.plexapi.models.operations.GetLibraryResponse getLibrary( + double sectionId, + Optional includeDetails) throws Exception; + } + + + public interface MethodCallDeleteLibrary { + lukehagar.plexapi.plexapi.models.operations.DeleteLibraryResponse deleteLibrary( + double sectionId) throws Exception; + } + + + public interface MethodCallGetLibraryItems { + lukehagar.plexapi.plexapi.models.operations.GetLibraryItemsResponse getLibraryItems( + long sectionId, + lukehagar.plexapi.plexapi.models.operations.Tag tag) throws Exception; + } + + + public interface MethodCallRefreshLibrary { + lukehagar.plexapi.plexapi.models.operations.RefreshLibraryResponse refreshLibrary( + double sectionId) throws Exception; + } + + + public interface MethodCallSearchLibrary { + lukehagar.plexapi.plexapi.models.operations.SearchLibraryResponse searchLibrary( + long sectionId, + lukehagar.plexapi.plexapi.models.operations.Type type) throws Exception; + } + + + public interface MethodCallGetMetadata { + lukehagar.plexapi.plexapi.models.operations.GetMetadataResponse getMetadata( + double ratingKey) throws Exception; + } + + + public interface MethodCallGetMetadataChildren { + lukehagar.plexapi.plexapi.models.operations.GetMetadataChildrenResponse getMetadataChildren( + double ratingKey) throws Exception; + } + + + public interface MethodCallGetOnDeck { + lukehagar.plexapi.plexapi.models.operations.GetOnDeckResponse getOnDeckDirect() throws Exception; + } + + + public interface MethodCallLogLine { + lukehagar.plexapi.plexapi.models.operations.LogLineResponse logLine( + lukehagar.plexapi.plexapi.models.operations.Level level, + String message, + String source) throws Exception; + } + + + public interface MethodCallLogMultiLine { + lukehagar.plexapi.plexapi.models.operations.LogMultiLineResponse logMultiLine( + String request) throws Exception; + } + + + public interface MethodCallEnablePaperTrail { + lukehagar.plexapi.plexapi.models.operations.EnablePaperTrailResponse enablePaperTrailDirect() throws Exception; + } + + + public interface MethodCallGetPin { + lukehagar.plexapi.plexapi.models.operations.GetPinResponse getPin( + Optional strong, + String xPlexClientIdentifier, + java.util.Optional serverURL) throws Exception; + } + + + public interface MethodCallGetToken { + lukehagar.plexapi.plexapi.models.operations.GetTokenResponse getToken( + String pinID, + String xPlexClientIdentifier, + java.util.Optional serverURL) throws Exception; + } + + + public interface MethodCallCreatePlaylist { + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistResponse createPlaylist( + lukehagar.plexapi.plexapi.models.operations.CreatePlaylistRequest request) throws Exception; + } + + + public interface MethodCallGetPlaylists { + lukehagar.plexapi.plexapi.models.operations.GetPlaylistsResponse getPlaylists( + Optional playlistType, + Optional smart) throws Exception; + } + + + public interface MethodCallGetPlaylist { + lukehagar.plexapi.plexapi.models.operations.GetPlaylistResponse getPlaylist( + double playlistID) throws Exception; + } + + + public interface MethodCallDeletePlaylist { + lukehagar.plexapi.plexapi.models.operations.DeletePlaylistResponse deletePlaylist( + double playlistID) throws Exception; + } + + + public interface MethodCallUpdatePlaylist { + lukehagar.plexapi.plexapi.models.operations.UpdatePlaylistResponse updatePlaylist( + double playlistID, + Optional title, + Optional summary) throws Exception; + } + + + public interface MethodCallGetPlaylistContents { + lukehagar.plexapi.plexapi.models.operations.GetPlaylistContentsResponse getPlaylistContents( + double playlistID, + double type) throws Exception; + } + + + public interface MethodCallClearPlaylistContents { + lukehagar.plexapi.plexapi.models.operations.ClearPlaylistContentsResponse clearPlaylistContents( + double playlistID) throws Exception; + } + + + public interface MethodCallAddPlaylistContents { + lukehagar.plexapi.plexapi.models.operations.AddPlaylistContentsResponse addPlaylistContents( + double playlistID, + String uri, + Optional playQueueID) throws Exception; + } + + + public interface MethodCallUploadPlaylist { + lukehagar.plexapi.plexapi.models.operations.UploadPlaylistResponse uploadPlaylist( + String path, + lukehagar.plexapi.plexapi.models.operations.Force force) throws Exception; + } + + + public interface MethodCallGetTransientToken { + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenResponse getTransientToken( + lukehagar.plexapi.plexapi.models.operations.GetTransientTokenQueryParamType type, + lukehagar.plexapi.plexapi.models.operations.Scope scope) throws Exception; + } + + + public interface MethodCallGetSourceConnectionInformation { + lukehagar.plexapi.plexapi.models.operations.GetSourceConnectionInformationResponse getSourceConnectionInformation( + String source) throws Exception; + } + + + public interface MethodCallGetStatistics { + lukehagar.plexapi.plexapi.models.operations.GetStatisticsResponse getStatistics( + Optional timespan) throws Exception; + } + + + public interface MethodCallGetSessions { + lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse getSessionsDirect() throws Exception; + } + + + public interface MethodCallGetSessionHistory { + lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse getSessionHistoryDirect() throws Exception; + } + + + public interface MethodCallGetTranscodeSessions { + lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse getTranscodeSessionsDirect() throws Exception; + } + + + public interface MethodCallStopTranscodeSession { + lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse stopTranscodeSession( + String sessionKey) throws Exception; + } + + + public interface MethodCallGetUpdateStatus { + lukehagar.plexapi.plexapi.models.operations.GetUpdateStatusResponse getUpdateStatusDirect() throws Exception; + } + + + public interface MethodCallCheckForUpdates { + lukehagar.plexapi.plexapi.models.operations.CheckForUpdatesResponse checkForUpdates( + Optional download) throws Exception; + } + + + public interface MethodCallApplyUpdates { + lukehagar.plexapi.plexapi.models.operations.ApplyUpdatesResponse applyUpdates( + Optional tonight, + Optional skip) throws Exception; + } + +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Scope.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Scope.java new file mode 100644 index 00000000..1b11cf71 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Scope.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Scope - `all` - This is the only supported `scope` parameter. + */ +public enum Scope { + ALL("all"); + + @JsonValue + private final String value; + + private Scope(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMediaContainer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMediaContainer.java new file mode 100644 index 00000000..19be3b2c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMediaContainer.java @@ -0,0 +1,595 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class SearchLibraryMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("nocache") + private Optional nocache; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title1") + private Optional title1; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title2") + private Optional title2; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewGroup") + private Optional viewGroup; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewMode") + private Optional viewMode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + public SearchLibraryMediaContainer( + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("art") Optional art, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("nocache") Optional nocache, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title1") Optional title1, + @JsonProperty("title2") Optional title2, + @JsonProperty("viewGroup") Optional viewGroup, + @JsonProperty("viewMode") Optional viewMode, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(nocache, "nocache"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title1, "title1"); + Utils.checkNotNull(title2, "title2"); + Utils.checkNotNull(viewGroup, "viewGroup"); + Utils.checkNotNull(viewMode, "viewMode"); + Utils.checkNotNull(metadata, "metadata"); + this.size = size; + this.allowSync = allowSync; + this.art = art; + this.identifier = identifier; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.nocache = nocache; + this.thumb = thumb; + this.title1 = title1; + this.title2 = title2; + this.viewGroup = viewGroup; + this.viewMode = viewMode; + this.metadata = metadata; + } + + public Optional size() { + return size; + } + + public Optional allowSync() { + return allowSync; + } + + public Optional art() { + return art; + } + + public Optional identifier() { + return identifier; + } + + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + public Optional nocache() { + return nocache; + } + + public Optional thumb() { + return thumb; + } + + public Optional title1() { + return title1; + } + + public Optional title2() { + return title2; + } + + public Optional viewGroup() { + return viewGroup; + } + + public Optional viewMode() { + return viewMode; + } + + public Optional> metadata() { + return metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public SearchLibraryMediaContainer withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public SearchLibraryMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public SearchLibraryMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public SearchLibraryMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public SearchLibraryMediaContainer withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public SearchLibraryMediaContainer withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public SearchLibraryMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public SearchLibraryMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public SearchLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public SearchLibraryMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public SearchLibraryMediaContainer withMediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public SearchLibraryMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public SearchLibraryMediaContainer withNocache(boolean nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = Optional.ofNullable(nocache); + return this; + } + + public SearchLibraryMediaContainer withNocache(Optional nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = nocache; + return this; + } + + public SearchLibraryMediaContainer withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public SearchLibraryMediaContainer withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public SearchLibraryMediaContainer withTitle1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public SearchLibraryMediaContainer withTitle1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public SearchLibraryMediaContainer withTitle2(String title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = Optional.ofNullable(title2); + return this; + } + + public SearchLibraryMediaContainer withTitle2(Optional title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = title2; + return this; + } + + public SearchLibraryMediaContainer withViewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public SearchLibraryMediaContainer withViewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public SearchLibraryMediaContainer withViewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public SearchLibraryMediaContainer withViewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public SearchLibraryMediaContainer withMetadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public SearchLibraryMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchLibraryMediaContainer other = (SearchLibraryMediaContainer) o; + return + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.allowSync, other.allowSync) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.identifier, other.identifier) && + java.util.Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + java.util.Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + java.util.Objects.deepEquals(this.nocache, other.nocache) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.title1, other.title1) && + java.util.Objects.deepEquals(this.title2, other.title2) && + java.util.Objects.deepEquals(this.viewGroup, other.viewGroup) && + java.util.Objects.deepEquals(this.viewMode, other.viewMode) && + java.util.Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + size, + allowSync, + art, + identifier, + mediaTagPrefix, + mediaTagVersion, + nocache, + thumb, + title1, + title2, + viewGroup, + viewMode, + metadata); + } + + @Override + public String toString() { + return Utils.toString(SearchLibraryMediaContainer.class, + "size", size, + "allowSync", allowSync, + "art", art, + "identifier", identifier, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "nocache", nocache, + "thumb", thumb, + "title1", title1, + "title2", title2, + "viewGroup", viewGroup, + "viewMode", viewMode, + "metadata", metadata); + } + + public final static class Builder { + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional nocache = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title1 = Optional.empty(); + + private Optional title2 = Optional.empty(); + + private Optional viewGroup = Optional.empty(); + + private Optional viewMode = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(int mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder nocache(boolean nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = Optional.ofNullable(nocache); + return this; + } + + public Builder nocache(Optional nocache) { + Utils.checkNotNull(nocache, "nocache"); + this.nocache = nocache; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder title1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public Builder title1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public Builder title2(String title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = Optional.ofNullable(title2); + return this; + } + + public Builder title2(Optional title2) { + Utils.checkNotNull(title2, "title2"); + this.title2 = title2; + return this; + } + + public Builder viewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public Builder viewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public Builder viewMode(int viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public Builder viewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public Builder metadata(java.util.List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public SearchLibraryMediaContainer build() { + return new SearchLibraryMediaContainer( + size, + allowSync, + art, + identifier, + mediaTagPrefix, + mediaTagVersion, + nocache, + thumb, + title1, + title2, + viewGroup, + viewMode, + metadata); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMetadata.java new file mode 100644 index 00000000..f1dfd8d2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryMetadata.java @@ -0,0 +1,882 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class SearchLibraryMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentGuid") + private Optional parentGuid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentStudio") + private Optional parentStudio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentYear") + private Optional parentYear; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTheme") + private Optional parentTheme; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + public SearchLibraryMetadata( + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("guid") Optional guid, + @JsonProperty("parentGuid") Optional parentGuid, + @JsonProperty("parentStudio") Optional parentStudio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("summary") Optional summary, + @JsonProperty("index") Optional index, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentYear") Optional parentYear, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTheme") Optional parentTheme, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt) { + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(parentGuid, "parentGuid"); + Utils.checkNotNull(parentStudio, "parentStudio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentYear, "parentYear"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTheme, "parentTheme"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.ratingKey = ratingKey; + this.key = key; + this.parentRatingKey = parentRatingKey; + this.guid = guid; + this.parentGuid = parentGuid; + this.parentStudio = parentStudio; + this.type = type; + this.title = title; + this.parentKey = parentKey; + this.parentTitle = parentTitle; + this.summary = summary; + this.index = index; + this.parentIndex = parentIndex; + this.parentYear = parentYear; + this.thumb = thumb; + this.art = art; + this.parentThumb = parentThumb; + this.parentTheme = parentTheme; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + } + + public Optional ratingKey() { + return ratingKey; + } + + public Optional key() { + return key; + } + + public Optional parentRatingKey() { + return parentRatingKey; + } + + public Optional guid() { + return guid; + } + + public Optional parentGuid() { + return parentGuid; + } + + public Optional parentStudio() { + return parentStudio; + } + + public Optional type() { + return type; + } + + public Optional title() { + return title; + } + + public Optional parentKey() { + return parentKey; + } + + public Optional parentTitle() { + return parentTitle; + } + + public Optional summary() { + return summary; + } + + public Optional index() { + return index; + } + + public Optional parentIndex() { + return parentIndex; + } + + public Optional parentYear() { + return parentYear; + } + + public Optional thumb() { + return thumb; + } + + public Optional art() { + return art; + } + + public Optional parentThumb() { + return parentThumb; + } + + public Optional parentTheme() { + return parentTheme; + } + + public Optional addedAt() { + return addedAt; + } + + public Optional updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public SearchLibraryMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public SearchLibraryMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public SearchLibraryMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public SearchLibraryMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public SearchLibraryMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public SearchLibraryMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public SearchLibraryMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public SearchLibraryMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public SearchLibraryMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public SearchLibraryMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public SearchLibraryMetadata withParentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public SearchLibraryMetadata withParentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public SearchLibraryMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public SearchLibraryMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public SearchLibraryMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public SearchLibraryMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public SearchLibraryMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public SearchLibraryMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public SearchLibraryMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public SearchLibraryMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public SearchLibraryMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public SearchLibraryMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public SearchLibraryMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public SearchLibraryMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public SearchLibraryMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public SearchLibraryMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public SearchLibraryMetadata withParentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public SearchLibraryMetadata withParentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public SearchLibraryMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public SearchLibraryMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public SearchLibraryMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public SearchLibraryMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public SearchLibraryMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public SearchLibraryMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public SearchLibraryMetadata withParentTheme(String parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = Optional.ofNullable(parentTheme); + return this; + } + + public SearchLibraryMetadata withParentTheme(Optional parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = parentTheme; + return this; + } + + public SearchLibraryMetadata withAddedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public SearchLibraryMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public SearchLibraryMetadata withUpdatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public SearchLibraryMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchLibraryMetadata other = (SearchLibraryMetadata) o; + return + java.util.Objects.deepEquals(this.ratingKey, other.ratingKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) && + java.util.Objects.deepEquals(this.guid, other.guid) && + java.util.Objects.deepEquals(this.parentGuid, other.parentGuid) && + java.util.Objects.deepEquals(this.parentStudio, other.parentStudio) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.parentKey, other.parentKey) && + java.util.Objects.deepEquals(this.parentTitle, other.parentTitle) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.parentIndex, other.parentIndex) && + java.util.Objects.deepEquals(this.parentYear, other.parentYear) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.art, other.art) && + java.util.Objects.deepEquals(this.parentThumb, other.parentThumb) && + java.util.Objects.deepEquals(this.parentTheme, other.parentTheme) && + java.util.Objects.deepEquals(this.addedAt, other.addedAt) && + java.util.Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + ratingKey, + key, + parentRatingKey, + guid, + parentGuid, + parentStudio, + type, + title, + parentKey, + parentTitle, + summary, + index, + parentIndex, + parentYear, + thumb, + art, + parentThumb, + parentTheme, + addedAt, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(SearchLibraryMetadata.class, + "ratingKey", ratingKey, + "key", key, + "parentRatingKey", parentRatingKey, + "guid", guid, + "parentGuid", parentGuid, + "parentStudio", parentStudio, + "type", type, + "title", title, + "parentKey", parentKey, + "parentTitle", parentTitle, + "summary", summary, + "index", index, + "parentIndex", parentIndex, + "parentYear", parentYear, + "thumb", thumb, + "art", art, + "parentThumb", parentThumb, + "parentTheme", parentTheme, + "addedAt", addedAt, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional parentGuid = Optional.empty(); + + private Optional parentStudio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentYear = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTheme = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder parentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public Builder parentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public Builder parentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public Builder parentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder parentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public Builder parentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public Builder parentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder art(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public Builder parentTheme(String parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = Optional.ofNullable(parentTheme); + return this; + } + + public Builder parentTheme(Optional parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = parentTheme; + return this; + } + + public Builder addedAt(int addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(int updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public SearchLibraryMetadata build() { + return new SearchLibraryMetadata( + ratingKey, + key, + parentRatingKey, + guid, + parentGuid, + parentStudio, + type, + title, + parentKey, + parentTitle, + summary, + index, + parentIndex, + parentYear, + thumb, + art, + parentThumb, + parentTheme, + addedAt, + updatedAt); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequest.java new file mode 100644 index 00000000..c0bfba37 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequest.java @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class SearchLibraryRequest { + + /** + * the Id of the library to query + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * Plex content type to search for + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Type type; + + public SearchLibraryRequest( + long sectionId, + Type type) { + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(type, "type"); + this.sectionId = sectionId; + this.type = type; + } + + /** + * the Id of the library to query + */ + public long sectionId() { + return sectionId; + } + + /** + * Plex content type to search for + */ + public Type type() { + return type; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the Id of the library to query + */ + public SearchLibraryRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Plex content type to search for + */ + public SearchLibraryRequest withType(Type type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchLibraryRequest other = (SearchLibraryRequest) o; + return + java.util.Objects.deepEquals(this.sectionId, other.sectionId) && + java.util.Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + sectionId, + type); + } + + @Override + public String toString() { + return Utils.toString(SearchLibraryRequest.class, + "sectionId", sectionId, + "type", type); + } + + public final static class Builder { + + private Long sectionId; + + private Type type; + + private Builder() { + // force use of static builder() method + } + + /** + * the Id of the library to query + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Plex content type to search for + */ + public Builder type(Type type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public SearchLibraryRequest build() { + return new SearchLibraryRequest( + sectionId, + type); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequestBuilder.java new file mode 100644 index 00000000..2d250350 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class SearchLibraryRequestBuilder { + + private Long sectionId; + private Type type; + private final SDKMethodInterfaces.MethodCallSearchLibrary sdk; + + public SearchLibraryRequestBuilder(SDKMethodInterfaces.MethodCallSearchLibrary sdk) { + this.sdk = sdk; + } + + public SearchLibraryRequestBuilder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public SearchLibraryRequestBuilder type(Type type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public SearchLibraryResponse call() throws Exception { + + return sdk.searchLibrary( + sectionId, + type); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponse.java new file mode 100644 index 00000000..4ad5e962 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class SearchLibraryResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The contents of the library by section and type + */ + private Optional object; + + public SearchLibraryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The contents of the library by section and type + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public SearchLibraryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SearchLibraryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SearchLibraryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The contents of the library by section and type + */ + public SearchLibraryResponse withObject(SearchLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The contents of the library by section and type + */ + public SearchLibraryResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchLibraryResponse other = (SearchLibraryResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(SearchLibraryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The contents of the library by section and type + */ + public Builder object(SearchLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The contents of the library by section and type + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public SearchLibraryResponse build() { + return new SearchLibraryResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponseBody.java new file mode 100644 index 00000000..f20d03b0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/SearchLibraryResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * SearchLibraryResponseBody - The contents of the library by section and type + */ + +public class SearchLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + public SearchLibraryResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public Optional mediaContainer() { + return mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public SearchLibraryResponseBody withMediaContainer(SearchLibraryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public SearchLibraryResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchLibraryResponseBody other = (SearchLibraryResponseBody) o; + return + java.util.Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(SearchLibraryResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(SearchLibraryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public SearchLibraryResponseBody build() { + return new SearchLibraryResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Server.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Server.java new file mode 100644 index 00000000..e8ed9029 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Server.java @@ -0,0 +1,513 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Server { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("host") + private Optional host; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("address") + private Optional address; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("port") + private Optional port; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocol") + private Optional protocol; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("product") + private Optional product; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deviceClass") + private Optional deviceClass; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocolVersion") + private Optional protocolVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocolCapabilities") + private Optional protocolCapabilities; + + public Server( + @JsonProperty("name") Optional name, + @JsonProperty("host") Optional host, + @JsonProperty("address") Optional address, + @JsonProperty("port") Optional port, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("version") Optional version, + @JsonProperty("protocol") Optional protocol, + @JsonProperty("product") Optional product, + @JsonProperty("deviceClass") Optional deviceClass, + @JsonProperty("protocolVersion") Optional protocolVersion, + @JsonProperty("protocolCapabilities") Optional protocolCapabilities) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(host, "host"); + Utils.checkNotNull(address, "address"); + Utils.checkNotNull(port, "port"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(deviceClass, "deviceClass"); + Utils.checkNotNull(protocolVersion, "protocolVersion"); + Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); + this.name = name; + this.host = host; + this.address = address; + this.port = port; + this.machineIdentifier = machineIdentifier; + this.version = version; + this.protocol = protocol; + this.product = product; + this.deviceClass = deviceClass; + this.protocolVersion = protocolVersion; + this.protocolCapabilities = protocolCapabilities; + } + + public Optional name() { + return name; + } + + public Optional host() { + return host; + } + + public Optional address() { + return address; + } + + public Optional port() { + return port; + } + + public Optional machineIdentifier() { + return machineIdentifier; + } + + public Optional version() { + return version; + } + + public Optional protocol() { + return protocol; + } + + public Optional product() { + return product; + } + + public Optional deviceClass() { + return deviceClass; + } + + public Optional protocolVersion() { + return protocolVersion; + } + + public Optional protocolCapabilities() { + return protocolCapabilities; + } + + public final static Builder builder() { + return new Builder(); + } + + public Server withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Server withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Server withHost(String host) { + Utils.checkNotNull(host, "host"); + this.host = Optional.ofNullable(host); + return this; + } + + public Server withHost(Optional host) { + Utils.checkNotNull(host, "host"); + this.host = host; + return this; + } + + public Server withAddress(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + public Server withAddress(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + public Server withPort(double port) { + Utils.checkNotNull(port, "port"); + this.port = Optional.ofNullable(port); + return this; + } + + public Server withPort(Optional port) { + Utils.checkNotNull(port, "port"); + this.port = port; + return this; + } + + public Server withMachineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Server withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public Server withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Server withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Server withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Server withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public Server withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + public Server withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + public Server withDeviceClass(String deviceClass) { + Utils.checkNotNull(deviceClass, "deviceClass"); + this.deviceClass = Optional.ofNullable(deviceClass); + return this; + } + + public Server withDeviceClass(Optional deviceClass) { + Utils.checkNotNull(deviceClass, "deviceClass"); + this.deviceClass = deviceClass; + return this; + } + + public Server withProtocolVersion(double protocolVersion) { + Utils.checkNotNull(protocolVersion, "protocolVersion"); + this.protocolVersion = Optional.ofNullable(protocolVersion); + return this; + } + + public Server withProtocolVersion(Optional protocolVersion) { + Utils.checkNotNull(protocolVersion, "protocolVersion"); + this.protocolVersion = protocolVersion; + return this; + } + + public Server withProtocolCapabilities(String protocolCapabilities) { + Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); + this.protocolCapabilities = Optional.ofNullable(protocolCapabilities); + return this; + } + + public Server withProtocolCapabilities(Optional protocolCapabilities) { + Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); + this.protocolCapabilities = protocolCapabilities; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Server other = (Server) o; + return + java.util.Objects.deepEquals(this.name, other.name) && + java.util.Objects.deepEquals(this.host, other.host) && + java.util.Objects.deepEquals(this.address, other.address) && + java.util.Objects.deepEquals(this.port, other.port) && + java.util.Objects.deepEquals(this.machineIdentifier, other.machineIdentifier) && + java.util.Objects.deepEquals(this.version, other.version) && + java.util.Objects.deepEquals(this.protocol, other.protocol) && + java.util.Objects.deepEquals(this.product, other.product) && + java.util.Objects.deepEquals(this.deviceClass, other.deviceClass) && + java.util.Objects.deepEquals(this.protocolVersion, other.protocolVersion) && + java.util.Objects.deepEquals(this.protocolCapabilities, other.protocolCapabilities); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + name, + host, + address, + port, + machineIdentifier, + version, + protocol, + product, + deviceClass, + protocolVersion, + protocolCapabilities); + } + + @Override + public String toString() { + return Utils.toString(Server.class, + "name", name, + "host", host, + "address", address, + "port", port, + "machineIdentifier", machineIdentifier, + "version", version, + "protocol", protocol, + "product", product, + "deviceClass", deviceClass, + "protocolVersion", protocolVersion, + "protocolCapabilities", protocolCapabilities); + } + + public final static class Builder { + + private Optional name = Optional.empty(); + + private Optional host = Optional.empty(); + + private Optional address = Optional.empty(); + + private Optional port = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional deviceClass = Optional.empty(); + + private Optional protocolVersion = Optional.empty(); + + private Optional protocolCapabilities = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder host(String host) { + Utils.checkNotNull(host, "host"); + this.host = Optional.ofNullable(host); + return this; + } + + public Builder host(Optional host) { + Utils.checkNotNull(host, "host"); + this.host = host; + return this; + } + + public Builder address(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + public Builder address(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + public Builder port(double port) { + Utils.checkNotNull(port, "port"); + this.port = Optional.ofNullable(port); + return this; + } + + public Builder port(Optional port) { + Utils.checkNotNull(port, "port"); + this.port = port; + return this; + } + + public Builder machineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + public Builder deviceClass(String deviceClass) { + Utils.checkNotNull(deviceClass, "deviceClass"); + this.deviceClass = Optional.ofNullable(deviceClass); + return this; + } + + public Builder deviceClass(Optional deviceClass) { + Utils.checkNotNull(deviceClass, "deviceClass"); + this.deviceClass = deviceClass; + return this; + } + + public Builder protocolVersion(double protocolVersion) { + Utils.checkNotNull(protocolVersion, "protocolVersion"); + this.protocolVersion = Optional.ofNullable(protocolVersion); + return this; + } + + public Builder protocolVersion(Optional protocolVersion) { + Utils.checkNotNull(protocolVersion, "protocolVersion"); + this.protocolVersion = protocolVersion; + return this; + } + + public Builder protocolCapabilities(String protocolCapabilities) { + Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); + this.protocolCapabilities = Optional.ofNullable(protocolCapabilities); + return this; + } + + public Builder protocolCapabilities(Optional protocolCapabilities) { + Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); + this.protocolCapabilities = protocolCapabilities; + return this; + } + + public Server build() { + return new Server( + name, + host, + address, + port, + machineIdentifier, + version, + protocol, + product, + deviceClass, + protocolVersion, + protocolCapabilities); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Session.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Session.java new file mode 100644 index 00000000..b04f65e0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Session.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Session { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bandwidth") + private Optional bandwidth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + public Session( + @JsonProperty("id") Optional id, + @JsonProperty("bandwidth") Optional bandwidth, + @JsonProperty("location") Optional location) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(bandwidth, "bandwidth"); + Utils.checkNotNull(location, "location"); + this.id = id; + this.bandwidth = bandwidth; + this.location = location; + } + + public Optional id() { + return id; + } + + public Optional bandwidth() { + return bandwidth; + } + + public Optional location() { + return location; + } + + public final static Builder builder() { + return new Builder(); + } + + public Session withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Session withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Session withBandwidth(int bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + public Session withBandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + public Session withLocation(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Session withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Session other = (Session) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.bandwidth, other.bandwidth) && + java.util.Objects.deepEquals(this.location, other.location); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + bandwidth, + location); + } + + @Override + public String toString() { + return Utils.toString(Session.class, + "id", id, + "bandwidth", bandwidth, + "location", location); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional bandwidth = Optional.empty(); + + private Optional location = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder bandwidth(int bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + public Builder bandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + public Builder location(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public Session build() { + return new Session( + id, + bandwidth, + location); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Setting.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Setting.java new file mode 100644 index 00000000..002a3603 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Setting.java @@ -0,0 +1,472 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Setting { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("label") + private Optional label; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("value") + private Optional value; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hidden") + private Optional hidden; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("advanced") + private Optional advanced; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("group") + private Optional group; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enumValues") + private Optional enumValues; + + public Setting( + @JsonProperty("id") Optional id, + @JsonProperty("label") Optional label, + @JsonProperty("summary") Optional summary, + @JsonProperty("type") Optional type, + @JsonProperty("default") Optional default_, + @JsonProperty("value") Optional value, + @JsonProperty("hidden") Optional hidden, + @JsonProperty("advanced") Optional advanced, + @JsonProperty("group") Optional group, + @JsonProperty("enumValues") Optional enumValues) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(label, "label"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(value, "value"); + Utils.checkNotNull(hidden, "hidden"); + Utils.checkNotNull(advanced, "advanced"); + Utils.checkNotNull(group, "group"); + Utils.checkNotNull(enumValues, "enumValues"); + this.id = id; + this.label = label; + this.summary = summary; + this.type = type; + this.default_ = default_; + this.value = value; + this.hidden = hidden; + this.advanced = advanced; + this.group = group; + this.enumValues = enumValues; + } + + public Optional id() { + return id; + } + + public Optional label() { + return label; + } + + public Optional summary() { + return summary; + } + + public Optional type() { + return type; + } + + public Optional default_() { + return default_; + } + + public Optional value() { + return value; + } + + public Optional hidden() { + return hidden; + } + + public Optional advanced() { + return advanced; + } + + public Optional group() { + return group; + } + + public Optional enumValues() { + return enumValues; + } + + public final static Builder builder() { + return new Builder(); + } + + public Setting withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Setting withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Setting withLabel(String label) { + Utils.checkNotNull(label, "label"); + this.label = Optional.ofNullable(label); + return this; + } + + public Setting withLabel(Optional label) { + Utils.checkNotNull(label, "label"); + this.label = label; + return this; + } + + public Setting withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Setting withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Setting withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Setting withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Setting withDefault(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public Setting withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Setting withValue(boolean value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + public Setting withValue(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public Setting withHidden(boolean hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + public Setting withHidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + return this; + } + + public Setting withAdvanced(boolean advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = Optional.ofNullable(advanced); + return this; + } + + public Setting withAdvanced(Optional advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = advanced; + return this; + } + + public Setting withGroup(String group) { + Utils.checkNotNull(group, "group"); + this.group = Optional.ofNullable(group); + return this; + } + + public Setting withGroup(Optional group) { + Utils.checkNotNull(group, "group"); + this.group = group; + return this; + } + + public Setting withEnumValues(String enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = Optional.ofNullable(enumValues); + return this; + } + + public Setting withEnumValues(Optional enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = enumValues; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Setting other = (Setting) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.label, other.label) && + java.util.Objects.deepEquals(this.summary, other.summary) && + java.util.Objects.deepEquals(this.type, other.type) && + java.util.Objects.deepEquals(this.default_, other.default_) && + java.util.Objects.deepEquals(this.value, other.value) && + java.util.Objects.deepEquals(this.hidden, other.hidden) && + java.util.Objects.deepEquals(this.advanced, other.advanced) && + java.util.Objects.deepEquals(this.group, other.group) && + java.util.Objects.deepEquals(this.enumValues, other.enumValues); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + label, + summary, + type, + default_, + value, + hidden, + advanced, + group, + enumValues); + } + + @Override + public String toString() { + return Utils.toString(Setting.class, + "id", id, + "label", label, + "summary", summary, + "type", type, + "default_", default_, + "value", value, + "hidden", hidden, + "advanced", advanced, + "group", group, + "enumValues", enumValues); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional value = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional advanced = Optional.empty(); + + private Optional group = Optional.empty(); + + private Optional enumValues = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder label(String label) { + Utils.checkNotNull(label, "label"); + this.label = Optional.ofNullable(label); + return this; + } + + public Builder label(Optional label) { + Utils.checkNotNull(label, "label"); + this.label = label; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder default_(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public Builder default_(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Builder value(boolean value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + public Builder value(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public Builder hidden(boolean hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + public Builder hidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + return this; + } + + public Builder advanced(boolean advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = Optional.ofNullable(advanced); + return this; + } + + public Builder advanced(Optional advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = advanced; + return this; + } + + public Builder group(String group) { + Utils.checkNotNull(group, "group"); + this.group = Optional.ofNullable(group); + return this; + } + + public Builder group(Optional group) { + Utils.checkNotNull(group, "group"); + this.group = group; + return this; + } + + public Builder enumValues(String enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = Optional.ofNullable(enumValues); + return this; + } + + public Builder enumValues(Optional enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = enumValues; + return this; + } + + public Setting build() { + return new Setting( + id, + label, + summary, + type, + default_, + value, + hidden, + advanced, + group, + enumValues); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Skip.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Skip.java new file mode 100644 index 00000000..d871b46a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Skip.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Skip - Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ +public enum Skip { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private Skip(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Smart.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Smart.java new file mode 100644 index 00000000..83fd3851 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Smart.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Smart - whether the playlist is smart or not + */ +public enum Smart { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private Smart(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Sort.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Sort.java new file mode 100644 index 00000000..5646e794 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Sort.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Sort { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("defaultDirection") + private Optional defaultDirection; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("descKey") + private Optional descKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("firstCharacterKey") + private Optional firstCharacterKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + public Sort( + @JsonProperty("default") Optional default_, + @JsonProperty("defaultDirection") Optional defaultDirection, + @JsonProperty("descKey") Optional descKey, + @JsonProperty("firstCharacterKey") Optional firstCharacterKey, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(defaultDirection, "defaultDirection"); + Utils.checkNotNull(descKey, "descKey"); + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.default_ = default_; + this.defaultDirection = defaultDirection; + this.descKey = descKey; + this.firstCharacterKey = firstCharacterKey; + this.key = key; + this.title = title; + } + + public Optional default_() { + return default_; + } + + public Optional defaultDirection() { + return defaultDirection; + } + + public Optional descKey() { + return descKey; + } + + public Optional firstCharacterKey() { + return firstCharacterKey; + } + + public Optional key() { + return key; + } + + public Optional title() { + return title; + } + + public final static Builder builder() { + return new Builder(); + } + + public Sort withDefault(String default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public Sort withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Sort withDefaultDirection(String defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = Optional.ofNullable(defaultDirection); + return this; + } + + public Sort withDefaultDirection(Optional defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = defaultDirection; + return this; + } + + public Sort withDescKey(String descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = Optional.ofNullable(descKey); + return this; + } + + public Sort withDescKey(Optional descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = descKey; + return this; + } + + public Sort withFirstCharacterKey(String firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); + return this; + } + + public Sort withFirstCharacterKey(Optional firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = firstCharacterKey; + return this; + } + + public Sort withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Sort withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Sort withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Sort withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Sort other = (Sort) o; + return + java.util.Objects.deepEquals(this.default_, other.default_) && + java.util.Objects.deepEquals(this.defaultDirection, other.defaultDirection) && + java.util.Objects.deepEquals(this.descKey, other.descKey) && + java.util.Objects.deepEquals(this.firstCharacterKey, other.firstCharacterKey) && + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + default_, + defaultDirection, + descKey, + firstCharacterKey, + key, + title); + } + + @Override + public String toString() { + return Utils.toString(Sort.class, + "default_", default_, + "defaultDirection", defaultDirection, + "descKey", descKey, + "firstCharacterKey", firstCharacterKey, + "key", key, + "title", title); + } + + public final static class Builder { + + private Optional default_ = Optional.empty(); + + private Optional defaultDirection = Optional.empty(); + + private Optional descKey = Optional.empty(); + + private Optional firstCharacterKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder default_(String default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public Builder default_(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Builder defaultDirection(String defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = Optional.ofNullable(defaultDirection); + return this; + } + + public Builder defaultDirection(Optional defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = defaultDirection; + return this; + } + + public Builder descKey(String descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = Optional.ofNullable(descKey); + return this; + } + + public Builder descKey(Optional descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = descKey; + return this; + } + + public Builder firstCharacterKey(String firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); + return this; + } + + public Builder firstCharacterKey(Optional firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = firstCharacterKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Sort build() { + return new Sort( + default_, + defaultDirection, + descKey, + firstCharacterKey, + key, + title); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksErrors.java new file mode 100644 index 00000000..5c6e861e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartAllTasksErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public StartAllTasksErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public StartAllTasksErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public StartAllTasksErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public StartAllTasksErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public StartAllTasksErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public StartAllTasksErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public StartAllTasksErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartAllTasksErrors other = (StartAllTasksErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StartAllTasksErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public StartAllTasksErrors build() { + return new StartAllTasksErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksRequestBuilder.java new file mode 100644 index 00000000..9e43f360 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class StartAllTasksRequestBuilder { + + private final SDKMethodInterfaces.MethodCallStartAllTasks sdk; + + public StartAllTasksRequestBuilder(SDKMethodInterfaces.MethodCallStartAllTasks sdk) { + this.sdk = sdk; + } + + public StartAllTasksResponse call() throws Exception { + + return sdk.startAllTasksDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponse.java new file mode 100644 index 00000000..c6459315 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartAllTasksResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public StartAllTasksResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public StartAllTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartAllTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartAllTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StartAllTasksResponse withObject(StartAllTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StartAllTasksResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartAllTasksResponse other = (StartAllTasksResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(StartAllTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(StartAllTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public StartAllTasksResponse build() { + return new StartAllTasksResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponseBody.java new file mode 100644 index 00000000..02a70d6a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartAllTasksResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * StartAllTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class StartAllTasksResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public StartAllTasksResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public StartAllTasksResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public StartAllTasksResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartAllTasksResponseBody other = (StartAllTasksResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(StartAllTasksResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public StartAllTasksResponseBody build() { + return new StartAllTasksResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskErrors.java new file mode 100644 index 00000000..44e81089 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartTaskErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public StartTaskErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public StartTaskErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public StartTaskErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public StartTaskErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public StartTaskErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public StartTaskErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public StartTaskErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTaskErrors other = (StartTaskErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StartTaskErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public StartTaskErrors build() { + return new StartTaskErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequest.java new file mode 100644 index 00000000..bcd08a42 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartTaskRequest { + + /** + * the name of the task to be started. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=taskName") + private TaskName taskName; + + public StartTaskRequest( + TaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + } + + /** + * the name of the task to be started. + */ + public TaskName taskName() { + return taskName; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the name of the task to be started. + */ + public StartTaskRequest withTaskName(TaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTaskRequest other = (StartTaskRequest) o; + return + java.util.Objects.deepEquals(this.taskName, other.taskName); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + taskName); + } + + @Override + public String toString() { + return Utils.toString(StartTaskRequest.class, + "taskName", taskName); + } + + public final static class Builder { + + private TaskName taskName; + + private Builder() { + // force use of static builder() method + } + + /** + * the name of the task to be started. + */ + public Builder taskName(TaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + return this; + } + + public StartTaskRequest build() { + return new StartTaskRequest( + taskName); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequestBuilder.java new file mode 100644 index 00000000..eac06aa7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class StartTaskRequestBuilder { + + private TaskName taskName; + private final SDKMethodInterfaces.MethodCallStartTask sdk; + + public StartTaskRequestBuilder(SDKMethodInterfaces.MethodCallStartTask sdk) { + this.sdk = sdk; + } + + public StartTaskRequestBuilder taskName(TaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + return this; + } + + public StartTaskResponse call() throws Exception { + + return sdk.startTask( + taskName); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponse.java new file mode 100644 index 00000000..06b653ca --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartTaskResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public StartTaskResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public StartTaskResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartTaskResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartTaskResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StartTaskResponse withObject(StartTaskResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StartTaskResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTaskResponse other = (StartTaskResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(StartTaskResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(StartTaskResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public StartTaskResponse build() { + return new StartTaskResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponseBody.java new file mode 100644 index 00000000..1dd7f864 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartTaskResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * StartTaskResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class StartTaskResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public StartTaskResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public StartTaskResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public StartTaskResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTaskResponseBody other = (StartTaskResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(StartTaskResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public StartTaskResponseBody build() { + return new StartTaskResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeErrors.java new file mode 100644 index 00000000..243a7ecc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartUniversalTranscodeErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public StartUniversalTranscodeErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public StartUniversalTranscodeErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public StartUniversalTranscodeErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public StartUniversalTranscodeErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public StartUniversalTranscodeErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public StartUniversalTranscodeErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public StartUniversalTranscodeErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartUniversalTranscodeErrors other = (StartUniversalTranscodeErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StartUniversalTranscodeErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public StartUniversalTranscodeErrors build() { + return new StartUniversalTranscodeErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequest.java new file mode 100644 index 00000000..09d7df7c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequest.java @@ -0,0 +1,898 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartUniversalTranscodeRequest { + + /** + * Whether the media item has MDE + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") + private double hasMDE; + + /** + * The path to the media item to transcode + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private String path; + + /** + * The index of the media item to transcode + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaIndex") + private double mediaIndex; + + /** + * The index of the part to transcode + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=partIndex") + private double partIndex; + + /** + * The protocol to use for the transcode session + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=protocol") + private String protocol; + + /** + * Whether to use fast seek or not + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fastSeek") + private Optional fastSeek; + + /** + * Whether to use direct play or not + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directPlay") + private Optional directPlay; + + /** + * Whether to use direct stream or not + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStream") + private Optional directStream; + + /** + * The size of the subtitles + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitleSize") + private Optional subtitleSize; + + /** + * The subtitles + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtites") + private Optional subtites; + + /** + * The audio boost + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioBoost") + private Optional audioBoost; + + /** + * The location of the transcode session + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=location") + private Optional location; + + /** + * The size of the media buffer + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaBufferSize") + private Optional mediaBufferSize; + + /** + * The session ID + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=session") + private Optional session; + + /** + * Whether to add a debug overlay or not + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=addDebugOverlay") + private Optional addDebugOverlay; + + /** + * Whether to auto adjust quality or not + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustQuality") + private Optional autoAdjustQuality; + + public StartUniversalTranscodeRequest( + double hasMDE, + String path, + double mediaIndex, + double partIndex, + String protocol, + Optional fastSeek, + Optional directPlay, + Optional directStream, + Optional subtitleSize, + Optional subtites, + Optional audioBoost, + Optional location, + Optional mediaBufferSize, + Optional session, + Optional addDebugOverlay, + Optional autoAdjustQuality) { + Utils.checkNotNull(hasMDE, "hasMDE"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(mediaIndex, "mediaIndex"); + Utils.checkNotNull(partIndex, "partIndex"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(fastSeek, "fastSeek"); + Utils.checkNotNull(directPlay, "directPlay"); + Utils.checkNotNull(directStream, "directStream"); + Utils.checkNotNull(subtitleSize, "subtitleSize"); + Utils.checkNotNull(subtites, "subtites"); + Utils.checkNotNull(audioBoost, "audioBoost"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + Utils.checkNotNull(session, "session"); + Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.hasMDE = hasMDE; + this.path = path; + this.mediaIndex = mediaIndex; + this.partIndex = partIndex; + this.protocol = protocol; + this.fastSeek = fastSeek; + this.directPlay = directPlay; + this.directStream = directStream; + this.subtitleSize = subtitleSize; + this.subtites = subtites; + this.audioBoost = audioBoost; + this.location = location; + this.mediaBufferSize = mediaBufferSize; + this.session = session; + this.addDebugOverlay = addDebugOverlay; + this.autoAdjustQuality = autoAdjustQuality; + } + + /** + * Whether the media item has MDE + */ + public double hasMDE() { + return hasMDE; + } + + /** + * The path to the media item to transcode + */ + public String path() { + return path; + } + + /** + * The index of the media item to transcode + */ + public double mediaIndex() { + return mediaIndex; + } + + /** + * The index of the part to transcode + */ + public double partIndex() { + return partIndex; + } + + /** + * The protocol to use for the transcode session + */ + public String protocol() { + return protocol; + } + + /** + * Whether to use fast seek or not + */ + public Optional fastSeek() { + return fastSeek; + } + + /** + * Whether to use direct play or not + */ + public Optional directPlay() { + return directPlay; + } + + /** + * Whether to use direct stream or not + */ + public Optional directStream() { + return directStream; + } + + /** + * The size of the subtitles + */ + public Optional subtitleSize() { + return subtitleSize; + } + + /** + * The subtitles + */ + public Optional subtites() { + return subtites; + } + + /** + * The audio boost + */ + public Optional audioBoost() { + return audioBoost; + } + + /** + * The location of the transcode session + */ + public Optional location() { + return location; + } + + /** + * The size of the media buffer + */ + public Optional mediaBufferSize() { + return mediaBufferSize; + } + + /** + * The session ID + */ + public Optional session() { + return session; + } + + /** + * Whether to add a debug overlay or not + */ + public Optional addDebugOverlay() { + return addDebugOverlay; + } + + /** + * Whether to auto adjust quality or not + */ + public Optional autoAdjustQuality() { + return autoAdjustQuality; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Whether the media item has MDE + */ + public StartUniversalTranscodeRequest withHasMDE(double hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * The path to the media item to transcode + */ + public StartUniversalTranscodeRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * The index of the media item to transcode + */ + public StartUniversalTranscodeRequest withMediaIndex(double mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + /** + * The index of the part to transcode + */ + public StartUniversalTranscodeRequest withPartIndex(double partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + /** + * The protocol to use for the transcode session + */ + public StartUniversalTranscodeRequest withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + /** + * Whether to use fast seek or not + */ + public StartUniversalTranscodeRequest withFastSeek(double fastSeek) { + Utils.checkNotNull(fastSeek, "fastSeek"); + this.fastSeek = Optional.ofNullable(fastSeek); + return this; + } + + /** + * Whether to use fast seek or not + */ + public StartUniversalTranscodeRequest withFastSeek(Optional fastSeek) { + Utils.checkNotNull(fastSeek, "fastSeek"); + this.fastSeek = fastSeek; + return this; + } + + /** + * Whether to use direct play or not + */ + public StartUniversalTranscodeRequest withDirectPlay(double directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + /** + * Whether to use direct play or not + */ + public StartUniversalTranscodeRequest withDirectPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + /** + * Whether to use direct stream or not + */ + public StartUniversalTranscodeRequest withDirectStream(double directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + /** + * Whether to use direct stream or not + */ + public StartUniversalTranscodeRequest withDirectStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + /** + * The size of the subtitles + */ + public StartUniversalTranscodeRequest withSubtitleSize(double subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + /** + * The size of the subtitles + */ + public StartUniversalTranscodeRequest withSubtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + /** + * The subtitles + */ + public StartUniversalTranscodeRequest withSubtites(String subtites) { + Utils.checkNotNull(subtites, "subtites"); + this.subtites = Optional.ofNullable(subtites); + return this; + } + + /** + * The subtitles + */ + public StartUniversalTranscodeRequest withSubtites(Optional subtites) { + Utils.checkNotNull(subtites, "subtites"); + this.subtites = subtites; + return this; + } + + /** + * The audio boost + */ + public StartUniversalTranscodeRequest withAudioBoost(double audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + /** + * The audio boost + */ + public StartUniversalTranscodeRequest withAudioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + /** + * The location of the transcode session + */ + public StartUniversalTranscodeRequest withLocation(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * The location of the transcode session + */ + public StartUniversalTranscodeRequest withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * The size of the media buffer + */ + public StartUniversalTranscodeRequest withMediaBufferSize(double mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + /** + * The size of the media buffer + */ + public StartUniversalTranscodeRequest withMediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + /** + * The session ID + */ + public StartUniversalTranscodeRequest withSession(String session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); + return this; + } + + /** + * The session ID + */ + public StartUniversalTranscodeRequest withSession(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; + return this; + } + + /** + * Whether to add a debug overlay or not + */ + public StartUniversalTranscodeRequest withAddDebugOverlay(double addDebugOverlay) { + Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); + this.addDebugOverlay = Optional.ofNullable(addDebugOverlay); + return this; + } + + /** + * Whether to add a debug overlay or not + */ + public StartUniversalTranscodeRequest withAddDebugOverlay(Optional addDebugOverlay) { + Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); + this.addDebugOverlay = addDebugOverlay; + return this; + } + + /** + * Whether to auto adjust quality or not + */ + public StartUniversalTranscodeRequest withAutoAdjustQuality(double autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + /** + * Whether to auto adjust quality or not + */ + public StartUniversalTranscodeRequest withAutoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartUniversalTranscodeRequest other = (StartUniversalTranscodeRequest) o; + return + java.util.Objects.deepEquals(this.hasMDE, other.hasMDE) && + java.util.Objects.deepEquals(this.path, other.path) && + java.util.Objects.deepEquals(this.mediaIndex, other.mediaIndex) && + java.util.Objects.deepEquals(this.partIndex, other.partIndex) && + java.util.Objects.deepEquals(this.protocol, other.protocol) && + java.util.Objects.deepEquals(this.fastSeek, other.fastSeek) && + java.util.Objects.deepEquals(this.directPlay, other.directPlay) && + java.util.Objects.deepEquals(this.directStream, other.directStream) && + java.util.Objects.deepEquals(this.subtitleSize, other.subtitleSize) && + java.util.Objects.deepEquals(this.subtites, other.subtites) && + java.util.Objects.deepEquals(this.audioBoost, other.audioBoost) && + java.util.Objects.deepEquals(this.location, other.location) && + java.util.Objects.deepEquals(this.mediaBufferSize, other.mediaBufferSize) && + java.util.Objects.deepEquals(this.session, other.session) && + java.util.Objects.deepEquals(this.addDebugOverlay, other.addDebugOverlay) && + java.util.Objects.deepEquals(this.autoAdjustQuality, other.autoAdjustQuality); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + hasMDE, + path, + mediaIndex, + partIndex, + protocol, + fastSeek, + directPlay, + directStream, + subtitleSize, + subtites, + audioBoost, + location, + mediaBufferSize, + session, + addDebugOverlay, + autoAdjustQuality); + } + + @Override + public String toString() { + return Utils.toString(StartUniversalTranscodeRequest.class, + "hasMDE", hasMDE, + "path", path, + "mediaIndex", mediaIndex, + "partIndex", partIndex, + "protocol", protocol, + "fastSeek", fastSeek, + "directPlay", directPlay, + "directStream", directStream, + "subtitleSize", subtitleSize, + "subtites", subtites, + "audioBoost", audioBoost, + "location", location, + "mediaBufferSize", mediaBufferSize, + "session", session, + "addDebugOverlay", addDebugOverlay, + "autoAdjustQuality", autoAdjustQuality); + } + + public final static class Builder { + + private Double hasMDE; + + private String path; + + private Double mediaIndex; + + private Double partIndex; + + private String protocol; + + private Optional fastSeek = Optional.empty(); + + private Optional directPlay = Optional.empty(); + + private Optional directStream = Optional.empty(); + + private Optional subtitleSize = Optional.empty(); + + private Optional subtites = Optional.empty(); + + private Optional audioBoost = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional mediaBufferSize = Optional.empty(); + + private Optional session = Optional.empty(); + + private Optional addDebugOverlay = Optional.empty(); + + private Optional autoAdjustQuality = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Whether the media item has MDE + */ + public Builder hasMDE(double hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * The path to the media item to transcode + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * The index of the media item to transcode + */ + public Builder mediaIndex(double mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + /** + * The index of the part to transcode + */ + public Builder partIndex(double partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + /** + * The protocol to use for the transcode session + */ + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + /** + * Whether to use fast seek or not + */ + public Builder fastSeek(double fastSeek) { + Utils.checkNotNull(fastSeek, "fastSeek"); + this.fastSeek = Optional.ofNullable(fastSeek); + return this; + } + + /** + * Whether to use fast seek or not + */ + public Builder fastSeek(Optional fastSeek) { + Utils.checkNotNull(fastSeek, "fastSeek"); + this.fastSeek = fastSeek; + return this; + } + + /** + * Whether to use direct play or not + */ + public Builder directPlay(double directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + /** + * Whether to use direct play or not + */ + public Builder directPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + /** + * Whether to use direct stream or not + */ + public Builder directStream(double directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + /** + * Whether to use direct stream or not + */ + public Builder directStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + /** + * The size of the subtitles + */ + public Builder subtitleSize(double subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + /** + * The size of the subtitles + */ + public Builder subtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + /** + * The subtitles + */ + public Builder subtites(String subtites) { + Utils.checkNotNull(subtites, "subtites"); + this.subtites = Optional.ofNullable(subtites); + return this; + } + + /** + * The subtitles + */ + public Builder subtites(Optional subtites) { + Utils.checkNotNull(subtites, "subtites"); + this.subtites = subtites; + return this; + } + + /** + * The audio boost + */ + public Builder audioBoost(double audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + /** + * The audio boost + */ + public Builder audioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + /** + * The location of the transcode session + */ + public Builder location(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * The location of the transcode session + */ + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * The size of the media buffer + */ + public Builder mediaBufferSize(double mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + /** + * The size of the media buffer + */ + public Builder mediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + /** + * The session ID + */ + public Builder session(String session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); + return this; + } + + /** + * The session ID + */ + public Builder session(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; + return this; + } + + /** + * Whether to add a debug overlay or not + */ + public Builder addDebugOverlay(double addDebugOverlay) { + Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); + this.addDebugOverlay = Optional.ofNullable(addDebugOverlay); + return this; + } + + /** + * Whether to add a debug overlay or not + */ + public Builder addDebugOverlay(Optional addDebugOverlay) { + Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); + this.addDebugOverlay = addDebugOverlay; + return this; + } + + /** + * Whether to auto adjust quality or not + */ + public Builder autoAdjustQuality(double autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + /** + * Whether to auto adjust quality or not + */ + public Builder autoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + public StartUniversalTranscodeRequest build() { + return new StartUniversalTranscodeRequest( + hasMDE, + path, + mediaIndex, + partIndex, + protocol, + fastSeek, + directPlay, + directStream, + subtitleSize, + subtites, + audioBoost, + location, + mediaBufferSize, + session, + addDebugOverlay, + autoAdjustQuality); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequestBuilder.java new file mode 100644 index 00000000..d35de5d3 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class StartUniversalTranscodeRequestBuilder { + + private StartUniversalTranscodeRequest request; + private final SDKMethodInterfaces.MethodCallStartUniversalTranscode sdk; + + public StartUniversalTranscodeRequestBuilder(SDKMethodInterfaces.MethodCallStartUniversalTranscode sdk) { + this.sdk = sdk; + } + + public StartUniversalTranscodeRequestBuilder request(StartUniversalTranscodeRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public StartUniversalTranscodeResponse call() throws Exception { + + return sdk.startUniversalTranscode( + request); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponse.java new file mode 100644 index 00000000..af4ff8a5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StartUniversalTranscodeResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public StartUniversalTranscodeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public StartUniversalTranscodeResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartUniversalTranscodeResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartUniversalTranscodeResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StartUniversalTranscodeResponse withObject(StartUniversalTranscodeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StartUniversalTranscodeResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartUniversalTranscodeResponse other = (StartUniversalTranscodeResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(StartUniversalTranscodeResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(StartUniversalTranscodeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public StartUniversalTranscodeResponse build() { + return new StartUniversalTranscodeResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponseBody.java new file mode 100644 index 00000000..fc04315c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StartUniversalTranscodeResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * StartUniversalTranscodeResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class StartUniversalTranscodeResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public StartUniversalTranscodeResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public StartUniversalTranscodeResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public StartUniversalTranscodeResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartUniversalTranscodeResponseBody other = (StartUniversalTranscodeResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(StartUniversalTranscodeResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public StartUniversalTranscodeResponseBody build() { + return new StartUniversalTranscodeResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/State.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/State.java new file mode 100644 index 00000000..f5dc0e14 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/State.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * State - The state of the media item + */ +public enum State { + PLAYING("playing"), + PAUSED("paused"), + STOPPED("stopped"); + + @JsonValue + private final String value; + + private State(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StatisticsMedia.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StatisticsMedia.java new file mode 100644 index 00000000..8bd739b2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StatisticsMedia.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StatisticsMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accountID") + private Optional accountID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deviceID") + private Optional deviceID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("timespan") + private Optional timespan; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("at") + private Optional at; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("metadataType") + private Optional metadataType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("count") + private Optional count; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + public StatisticsMedia( + @JsonProperty("accountID") Optional accountID, + @JsonProperty("deviceID") Optional deviceID, + @JsonProperty("timespan") Optional timespan, + @JsonProperty("at") Optional at, + @JsonProperty("metadataType") Optional metadataType, + @JsonProperty("count") Optional count, + @JsonProperty("duration") Optional duration) { + Utils.checkNotNull(accountID, "accountID"); + Utils.checkNotNull(deviceID, "deviceID"); + Utils.checkNotNull(timespan, "timespan"); + Utils.checkNotNull(at, "at"); + Utils.checkNotNull(metadataType, "metadataType"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(duration, "duration"); + this.accountID = accountID; + this.deviceID = deviceID; + this.timespan = timespan; + this.at = at; + this.metadataType = metadataType; + this.count = count; + this.duration = duration; + } + + public Optional accountID() { + return accountID; + } + + public Optional deviceID() { + return deviceID; + } + + public Optional timespan() { + return timespan; + } + + public Optional at() { + return at; + } + + public Optional metadataType() { + return metadataType; + } + + public Optional count() { + return count; + } + + public Optional duration() { + return duration; + } + + public final static Builder builder() { + return new Builder(); + } + + public StatisticsMedia withAccountID(int accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + public StatisticsMedia withAccountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + public StatisticsMedia withDeviceID(int deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + public StatisticsMedia withDeviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + public StatisticsMedia withTimespan(int timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = Optional.ofNullable(timespan); + return this; + } + + public StatisticsMedia withTimespan(Optional timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = timespan; + return this; + } + + public StatisticsMedia withAt(int at) { + Utils.checkNotNull(at, "at"); + this.at = Optional.ofNullable(at); + return this; + } + + public StatisticsMedia withAt(Optional at) { + Utils.checkNotNull(at, "at"); + this.at = at; + return this; + } + + public StatisticsMedia withMetadataType(int metadataType) { + Utils.checkNotNull(metadataType, "metadataType"); + this.metadataType = Optional.ofNullable(metadataType); + return this; + } + + public StatisticsMedia withMetadataType(Optional metadataType) { + Utils.checkNotNull(metadataType, "metadataType"); + this.metadataType = metadataType; + return this; + } + + public StatisticsMedia withCount(int count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + public StatisticsMedia withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public StatisticsMedia withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public StatisticsMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatisticsMedia other = (StatisticsMedia) o; + return + java.util.Objects.deepEquals(this.accountID, other.accountID) && + java.util.Objects.deepEquals(this.deviceID, other.deviceID) && + java.util.Objects.deepEquals(this.timespan, other.timespan) && + java.util.Objects.deepEquals(this.at, other.at) && + java.util.Objects.deepEquals(this.metadataType, other.metadataType) && + java.util.Objects.deepEquals(this.count, other.count) && + java.util.Objects.deepEquals(this.duration, other.duration); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + accountID, + deviceID, + timespan, + at, + metadataType, + count, + duration); + } + + @Override + public String toString() { + return Utils.toString(StatisticsMedia.class, + "accountID", accountID, + "deviceID", deviceID, + "timespan", timespan, + "at", at, + "metadataType", metadataType, + "count", count, + "duration", duration); + } + + public final static class Builder { + + private Optional accountID = Optional.empty(); + + private Optional deviceID = Optional.empty(); + + private Optional timespan = Optional.empty(); + + private Optional at = Optional.empty(); + + private Optional metadataType = Optional.empty(); + + private Optional count = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder accountID(int accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + public Builder accountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + public Builder deviceID(int deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + public Builder deviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + public Builder timespan(int timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = Optional.ofNullable(timespan); + return this; + } + + public Builder timespan(Optional timespan) { + Utils.checkNotNull(timespan, "timespan"); + this.timespan = timespan; + return this; + } + + public Builder at(int at) { + Utils.checkNotNull(at, "at"); + this.at = Optional.ofNullable(at); + return this; + } + + public Builder at(Optional at) { + Utils.checkNotNull(at, "at"); + this.at = at; + return this; + } + + public Builder metadataType(int metadataType) { + Utils.checkNotNull(metadataType, "metadataType"); + this.metadataType = Optional.ofNullable(metadataType); + return this; + } + + public Builder metadataType(Optional metadataType) { + Utils.checkNotNull(metadataType, "metadataType"); + this.metadataType = metadataType; + return this; + } + + public Builder count(int count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public StatisticsMedia build() { + return new StatisticsMedia( + accountID, + deviceID, + timespan, + at, + metadataType, + count, + duration); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksErrors.java new file mode 100644 index 00000000..f791b5f6 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopAllTasksErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public StopAllTasksErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public StopAllTasksErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public StopAllTasksErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public StopAllTasksErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public StopAllTasksErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public StopAllTasksErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public StopAllTasksErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopAllTasksErrors other = (StopAllTasksErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StopAllTasksErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public StopAllTasksErrors build() { + return new StopAllTasksErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksRequestBuilder.java new file mode 100644 index 00000000..40bef1a0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class StopAllTasksRequestBuilder { + + private final SDKMethodInterfaces.MethodCallStopAllTasks sdk; + + public StopAllTasksRequestBuilder(SDKMethodInterfaces.MethodCallStopAllTasks sdk) { + this.sdk = sdk; + } + + public StopAllTasksResponse call() throws Exception { + + return sdk.stopAllTasksDirect(); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponse.java new file mode 100644 index 00000000..79d671dc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopAllTasksResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public StopAllTasksResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public StopAllTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopAllTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopAllTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StopAllTasksResponse withObject(StopAllTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StopAllTasksResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopAllTasksResponse other = (StopAllTasksResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(StopAllTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(StopAllTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public StopAllTasksResponse build() { + return new StopAllTasksResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponseBody.java new file mode 100644 index 00000000..34cf9de5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopAllTasksResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * StopAllTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class StopAllTasksResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public StopAllTasksResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public StopAllTasksResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public StopAllTasksResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopAllTasksResponseBody other = (StopAllTasksResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(StopAllTasksResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public StopAllTasksResponseBody build() { + return new StopAllTasksResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskErrors.java new file mode 100644 index 00000000..cb67f783 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopTaskErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public StopTaskErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public StopTaskErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public StopTaskErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public StopTaskErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public StopTaskErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public StopTaskErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public StopTaskErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTaskErrors other = (StopTaskErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StopTaskErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public StopTaskErrors build() { + return new StopTaskErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequest.java new file mode 100644 index 00000000..5ad81cc5 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopTaskRequest { + + /** + * The name of the task to be started. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=taskName") + private PathParamTaskName taskName; + + public StopTaskRequest( + PathParamTaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + } + + /** + * The name of the task to be started. + */ + public PathParamTaskName taskName() { + return taskName; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The name of the task to be started. + */ + public StopTaskRequest withTaskName(PathParamTaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTaskRequest other = (StopTaskRequest) o; + return + java.util.Objects.deepEquals(this.taskName, other.taskName); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + taskName); + } + + @Override + public String toString() { + return Utils.toString(StopTaskRequest.class, + "taskName", taskName); + } + + public final static class Builder { + + private PathParamTaskName taskName; + + private Builder() { + // force use of static builder() method + } + + /** + * The name of the task to be started. + */ + public Builder taskName(PathParamTaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + return this; + } + + public StopTaskRequest build() { + return new StopTaskRequest( + taskName); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequestBuilder.java new file mode 100644 index 00000000..eb99c49c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class StopTaskRequestBuilder { + + private PathParamTaskName taskName; + private final SDKMethodInterfaces.MethodCallStopTask sdk; + + public StopTaskRequestBuilder(SDKMethodInterfaces.MethodCallStopTask sdk) { + this.sdk = sdk; + } + + public StopTaskRequestBuilder taskName(PathParamTaskName taskName) { + Utils.checkNotNull(taskName, "taskName"); + this.taskName = taskName; + return this; + } + + public StopTaskResponse call() throws Exception { + + return sdk.stopTask( + taskName); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponse.java new file mode 100644 index 00000000..83011b79 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopTaskResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public StopTaskResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public StopTaskResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopTaskResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopTaskResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StopTaskResponse withObject(StopTaskResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StopTaskResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTaskResponse other = (StopTaskResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(StopTaskResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(StopTaskResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public StopTaskResponse build() { + return new StopTaskResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponseBody.java new file mode 100644 index 00000000..bf488e3e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTaskResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * StopTaskResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class StopTaskResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public StopTaskResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public StopTaskResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public StopTaskResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTaskResponseBody other = (StopTaskResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(StopTaskResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public StopTaskResponseBody build() { + return new StopTaskResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionErrors.java new file mode 100644 index 00000000..e8a30128 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopTranscodeSessionErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public StopTranscodeSessionErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public StopTranscodeSessionErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public StopTranscodeSessionErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public StopTranscodeSessionErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public StopTranscodeSessionErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public StopTranscodeSessionErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public StopTranscodeSessionErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTranscodeSessionErrors other = (StopTranscodeSessionErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(StopTranscodeSessionErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public StopTranscodeSessionErrors build() { + return new StopTranscodeSessionErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequest.java new file mode 100644 index 00000000..dfc6f9d2 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequest.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopTranscodeSessionRequest { + + /** + * the Key of the transcode session to stop + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sessionKey") + private String sessionKey; + + public StopTranscodeSessionRequest( + String sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = sessionKey; + } + + /** + * the Key of the transcode session to stop + */ + public String sessionKey() { + return sessionKey; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the Key of the transcode session to stop + */ + public StopTranscodeSessionRequest withSessionKey(String sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = sessionKey; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTranscodeSessionRequest other = (StopTranscodeSessionRequest) o; + return + java.util.Objects.deepEquals(this.sessionKey, other.sessionKey); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + sessionKey); + } + + @Override + public String toString() { + return Utils.toString(StopTranscodeSessionRequest.class, + "sessionKey", sessionKey); + } + + public final static class Builder { + + private String sessionKey; + + private Builder() { + // force use of static builder() method + } + + /** + * the Key of the transcode session to stop + */ + public Builder sessionKey(String sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = sessionKey; + return this; + } + + public StopTranscodeSessionRequest build() { + return new StopTranscodeSessionRequest( + sessionKey); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequestBuilder.java new file mode 100644 index 00000000..e1c65faf --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class StopTranscodeSessionRequestBuilder { + + private String sessionKey; + private final SDKMethodInterfaces.MethodCallStopTranscodeSession sdk; + + public StopTranscodeSessionRequestBuilder(SDKMethodInterfaces.MethodCallStopTranscodeSession sdk) { + this.sdk = sdk; + } + + public StopTranscodeSessionRequestBuilder sessionKey(String sessionKey) { + Utils.checkNotNull(sessionKey, "sessionKey"); + this.sessionKey = sessionKey; + return this; + } + + public StopTranscodeSessionResponse call() throws Exception { + + return sdk.stopTranscodeSession( + sessionKey); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponse.java new file mode 100644 index 00000000..c00ad4e8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class StopTranscodeSessionResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public StopTranscodeSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public StopTranscodeSessionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopTranscodeSessionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopTranscodeSessionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StopTranscodeSessionResponse withObject(StopTranscodeSessionResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public StopTranscodeSessionResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTranscodeSessionResponse other = (StopTranscodeSessionResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(StopTranscodeSessionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(StopTranscodeSessionResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public StopTranscodeSessionResponse build() { + return new StopTranscodeSessionResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponseBody.java new file mode 100644 index 00000000..b2c8b0dc --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/StopTranscodeSessionResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * StopTranscodeSessionResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class StopTranscodeSessionResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public StopTranscodeSessionResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public StopTranscodeSessionResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public StopTranscodeSessionResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTranscodeSessionResponseBody other = (StopTranscodeSessionResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(StopTranscodeSessionResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public StopTranscodeSessionResponseBody build() { + return new StopTranscodeSessionResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Stream.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Stream.java new file mode 100644 index 00000000..5bdeefae --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Stream.java @@ -0,0 +1,1374 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Stream { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamType") + private Optional streamType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codec") + private Optional codec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitDepth") + private Optional bitDepth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaLocation") + private Optional chromaLocation; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaSubsampling") + private Optional chromaSubsampling; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codedHeight") + private Optional codedHeight; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codedWidth") + private Optional codedWidth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorPrimaries") + private Optional colorPrimaries; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorRange") + private Optional colorRange; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorSpace") + private Optional colorSpace; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorTrc") + private Optional colorTrc; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("frameRate") + private Optional frameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasScalingMatrix") + private Optional hasScalingMatrix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("level") + private Optional level; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("profile") + private Optional profile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("refFrames") + private Optional refFrames; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scanType") + private Optional scanType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamIdentifier") + private Optional streamIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayTitle") + private Optional displayTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("extendedDisplayTitle") + private Optional extendedDisplayTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channels") + private Optional channels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageTag") + private Optional languageTag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageCode") + private Optional languageCode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("samplingRate") + private Optional samplingRate; + + public Stream( + @JsonProperty("id") Optional id, + @JsonProperty("streamType") Optional streamType, + @JsonProperty("default") Optional default_, + @JsonProperty("codec") Optional codec, + @JsonProperty("index") Optional index, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("bitDepth") Optional bitDepth, + @JsonProperty("chromaLocation") Optional chromaLocation, + @JsonProperty("chromaSubsampling") Optional chromaSubsampling, + @JsonProperty("codedHeight") Optional codedHeight, + @JsonProperty("codedWidth") Optional codedWidth, + @JsonProperty("colorPrimaries") Optional colorPrimaries, + @JsonProperty("colorRange") Optional colorRange, + @JsonProperty("colorSpace") Optional colorSpace, + @JsonProperty("colorTrc") Optional colorTrc, + @JsonProperty("frameRate") Optional frameRate, + @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, + @JsonProperty("height") Optional height, + @JsonProperty("level") Optional level, + @JsonProperty("profile") Optional profile, + @JsonProperty("refFrames") Optional refFrames, + @JsonProperty("scanType") Optional scanType, + @JsonProperty("streamIdentifier") Optional streamIdentifier, + @JsonProperty("width") Optional width, + @JsonProperty("displayTitle") Optional displayTitle, + @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, + @JsonProperty("selected") Optional selected, + @JsonProperty("channels") Optional channels, + @JsonProperty("language") Optional language, + @JsonProperty("languageTag") Optional languageTag, + @JsonProperty("languageCode") Optional languageCode, + @JsonProperty("samplingRate") Optional samplingRate) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(streamType, "streamType"); + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(codec, "codec"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(bitDepth, "bitDepth"); + Utils.checkNotNull(chromaLocation, "chromaLocation"); + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + Utils.checkNotNull(codedHeight, "codedHeight"); + Utils.checkNotNull(codedWidth, "codedWidth"); + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + Utils.checkNotNull(colorRange, "colorRange"); + Utils.checkNotNull(colorSpace, "colorSpace"); + Utils.checkNotNull(colorTrc, "colorTrc"); + Utils.checkNotNull(frameRate, "frameRate"); + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(profile, "profile"); + Utils.checkNotNull(refFrames, "refFrames"); + Utils.checkNotNull(scanType, "scanType"); + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(displayTitle, "displayTitle"); + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(channels, "channels"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(languageTag, "languageTag"); + Utils.checkNotNull(languageCode, "languageCode"); + Utils.checkNotNull(samplingRate, "samplingRate"); + this.id = id; + this.streamType = streamType; + this.default_ = default_; + this.codec = codec; + this.index = index; + this.bitrate = bitrate; + this.bitDepth = bitDepth; + this.chromaLocation = chromaLocation; + this.chromaSubsampling = chromaSubsampling; + this.codedHeight = codedHeight; + this.codedWidth = codedWidth; + this.colorPrimaries = colorPrimaries; + this.colorRange = colorRange; + this.colorSpace = colorSpace; + this.colorTrc = colorTrc; + this.frameRate = frameRate; + this.hasScalingMatrix = hasScalingMatrix; + this.height = height; + this.level = level; + this.profile = profile; + this.refFrames = refFrames; + this.scanType = scanType; + this.streamIdentifier = streamIdentifier; + this.width = width; + this.displayTitle = displayTitle; + this.extendedDisplayTitle = extendedDisplayTitle; + this.selected = selected; + this.channels = channels; + this.language = language; + this.languageTag = languageTag; + this.languageCode = languageCode; + this.samplingRate = samplingRate; + } + + public Optional id() { + return id; + } + + public Optional streamType() { + return streamType; + } + + public Optional default_() { + return default_; + } + + public Optional codec() { + return codec; + } + + public Optional index() { + return index; + } + + public Optional bitrate() { + return bitrate; + } + + public Optional bitDepth() { + return bitDepth; + } + + public Optional chromaLocation() { + return chromaLocation; + } + + public Optional chromaSubsampling() { + return chromaSubsampling; + } + + public Optional codedHeight() { + return codedHeight; + } + + public Optional codedWidth() { + return codedWidth; + } + + public Optional colorPrimaries() { + return colorPrimaries; + } + + public Optional colorRange() { + return colorRange; + } + + public Optional colorSpace() { + return colorSpace; + } + + public Optional colorTrc() { + return colorTrc; + } + + public Optional frameRate() { + return frameRate; + } + + public Optional hasScalingMatrix() { + return hasScalingMatrix; + } + + public Optional height() { + return height; + } + + public Optional level() { + return level; + } + + public Optional profile() { + return profile; + } + + public Optional refFrames() { + return refFrames; + } + + public Optional scanType() { + return scanType; + } + + public Optional streamIdentifier() { + return streamIdentifier; + } + + public Optional width() { + return width; + } + + public Optional displayTitle() { + return displayTitle; + } + + public Optional extendedDisplayTitle() { + return extendedDisplayTitle; + } + + public Optional selected() { + return selected; + } + + public Optional channels() { + return channels; + } + + public Optional language() { + return language; + } + + public Optional languageTag() { + return languageTag; + } + + public Optional languageCode() { + return languageCode; + } + + public Optional samplingRate() { + return samplingRate; + } + + public final static Builder builder() { + return new Builder(); + } + + public Stream withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Stream withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Stream withStreamType(int streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public Stream withStreamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public Stream withDefault(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public Stream withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Stream withCodec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public Stream withCodec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public Stream withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Stream withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Stream withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Stream withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Stream withBitDepth(int bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public Stream withBitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public Stream withChromaLocation(String chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + public Stream withChromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + public Stream withChromaSubsampling(String chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + public Stream withChromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + public Stream withCodedHeight(int codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = Optional.ofNullable(codedHeight); + return this; + } + + public Stream withCodedHeight(Optional codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = codedHeight; + return this; + } + + public Stream withCodedWidth(int codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = Optional.ofNullable(codedWidth); + return this; + } + + public Stream withCodedWidth(Optional codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = codedWidth; + return this; + } + + public Stream withColorPrimaries(String colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = Optional.ofNullable(colorPrimaries); + return this; + } + + public Stream withColorPrimaries(Optional colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = colorPrimaries; + return this; + } + + public Stream withColorRange(String colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + public Stream withColorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + public Stream withColorSpace(String colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = Optional.ofNullable(colorSpace); + return this; + } + + public Stream withColorSpace(Optional colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = colorSpace; + return this; + } + + public Stream withColorTrc(String colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = Optional.ofNullable(colorTrc); + return this; + } + + public Stream withColorTrc(Optional colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = colorTrc; + return this; + } + + public Stream withFrameRate(int frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + public Stream withFrameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + public Stream withHasScalingMatrix(boolean hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); + return this; + } + + public Stream withHasScalingMatrix(Optional hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = hasScalingMatrix; + return this; + } + + public Stream withHeight(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Stream withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Stream withLevel(int level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public Stream withLevel(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public Stream withProfile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public Stream withProfile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public Stream withRefFrames(int refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + public Stream withRefFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + public Stream withScanType(String scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = Optional.ofNullable(scanType); + return this; + } + + public Stream withScanType(Optional scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = scanType; + return this; + } + + public Stream withStreamIdentifier(String streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = Optional.ofNullable(streamIdentifier); + return this; + } + + public Stream withStreamIdentifier(Optional streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = streamIdentifier; + return this; + } + + public Stream withWidth(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Stream withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Stream withDisplayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public Stream withDisplayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public Stream withExtendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public Stream withExtendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + public Stream withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public Stream withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public Stream withChannels(int channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = Optional.ofNullable(channels); + return this; + } + + public Stream withChannels(Optional channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = channels; + return this; + } + + public Stream withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public Stream withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Stream withLanguageTag(String languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = Optional.ofNullable(languageTag); + return this; + } + + public Stream withLanguageTag(Optional languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = languageTag; + return this; + } + + public Stream withLanguageCode(String languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + public Stream withLanguageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public Stream withSamplingRate(int samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + public Stream withSamplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Stream other = (Stream) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.streamType, other.streamType) && + java.util.Objects.deepEquals(this.default_, other.default_) && + java.util.Objects.deepEquals(this.codec, other.codec) && + java.util.Objects.deepEquals(this.index, other.index) && + java.util.Objects.deepEquals(this.bitrate, other.bitrate) && + java.util.Objects.deepEquals(this.bitDepth, other.bitDepth) && + java.util.Objects.deepEquals(this.chromaLocation, other.chromaLocation) && + java.util.Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) && + java.util.Objects.deepEquals(this.codedHeight, other.codedHeight) && + java.util.Objects.deepEquals(this.codedWidth, other.codedWidth) && + java.util.Objects.deepEquals(this.colorPrimaries, other.colorPrimaries) && + java.util.Objects.deepEquals(this.colorRange, other.colorRange) && + java.util.Objects.deepEquals(this.colorSpace, other.colorSpace) && + java.util.Objects.deepEquals(this.colorTrc, other.colorTrc) && + java.util.Objects.deepEquals(this.frameRate, other.frameRate) && + java.util.Objects.deepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && + java.util.Objects.deepEquals(this.height, other.height) && + java.util.Objects.deepEquals(this.level, other.level) && + java.util.Objects.deepEquals(this.profile, other.profile) && + java.util.Objects.deepEquals(this.refFrames, other.refFrames) && + java.util.Objects.deepEquals(this.scanType, other.scanType) && + java.util.Objects.deepEquals(this.streamIdentifier, other.streamIdentifier) && + java.util.Objects.deepEquals(this.width, other.width) && + java.util.Objects.deepEquals(this.displayTitle, other.displayTitle) && + java.util.Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && + java.util.Objects.deepEquals(this.selected, other.selected) && + java.util.Objects.deepEquals(this.channels, other.channels) && + java.util.Objects.deepEquals(this.language, other.language) && + java.util.Objects.deepEquals(this.languageTag, other.languageTag) && + java.util.Objects.deepEquals(this.languageCode, other.languageCode) && + java.util.Objects.deepEquals(this.samplingRate, other.samplingRate); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + streamType, + default_, + codec, + index, + bitrate, + bitDepth, + chromaLocation, + chromaSubsampling, + codedHeight, + codedWidth, + colorPrimaries, + colorRange, + colorSpace, + colorTrc, + frameRate, + hasScalingMatrix, + height, + level, + profile, + refFrames, + scanType, + streamIdentifier, + width, + displayTitle, + extendedDisplayTitle, + selected, + channels, + language, + languageTag, + languageCode, + samplingRate); + } + + @Override + public String toString() { + return Utils.toString(Stream.class, + "id", id, + "streamType", streamType, + "default_", default_, + "codec", codec, + "index", index, + "bitrate", bitrate, + "bitDepth", bitDepth, + "chromaLocation", chromaLocation, + "chromaSubsampling", chromaSubsampling, + "codedHeight", codedHeight, + "codedWidth", codedWidth, + "colorPrimaries", colorPrimaries, + "colorRange", colorRange, + "colorSpace", colorSpace, + "colorTrc", colorTrc, + "frameRate", frameRate, + "hasScalingMatrix", hasScalingMatrix, + "height", height, + "level", level, + "profile", profile, + "refFrames", refFrames, + "scanType", scanType, + "streamIdentifier", streamIdentifier, + "width", width, + "displayTitle", displayTitle, + "extendedDisplayTitle", extendedDisplayTitle, + "selected", selected, + "channels", channels, + "language", language, + "languageTag", languageTag, + "languageCode", languageCode, + "samplingRate", samplingRate); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional streamType = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional codec = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional bitDepth = Optional.empty(); + + private Optional chromaLocation = Optional.empty(); + + private Optional chromaSubsampling = Optional.empty(); + + private Optional codedHeight = Optional.empty(); + + private Optional codedWidth = Optional.empty(); + + private Optional colorPrimaries = Optional.empty(); + + private Optional colorRange = Optional.empty(); + + private Optional colorSpace = Optional.empty(); + + private Optional colorTrc = Optional.empty(); + + private Optional frameRate = Optional.empty(); + + private Optional hasScalingMatrix = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional level = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional refFrames = Optional.empty(); + + private Optional scanType = Optional.empty(); + + private Optional streamIdentifier = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional displayTitle = Optional.empty(); + + private Optional extendedDisplayTitle = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Optional channels = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional languageTag = Optional.empty(); + + private Optional languageCode = Optional.empty(); + + private Optional samplingRate = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder streamType(int streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public Builder streamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public Builder default_(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public Builder default_(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Builder codec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public Builder codec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public Builder index(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public Builder bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder bitDepth(int bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public Builder bitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public Builder chromaLocation(String chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + public Builder chromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + public Builder chromaSubsampling(String chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + public Builder chromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + public Builder codedHeight(int codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = Optional.ofNullable(codedHeight); + return this; + } + + public Builder codedHeight(Optional codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = codedHeight; + return this; + } + + public Builder codedWidth(int codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = Optional.ofNullable(codedWidth); + return this; + } + + public Builder codedWidth(Optional codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = codedWidth; + return this; + } + + public Builder colorPrimaries(String colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = Optional.ofNullable(colorPrimaries); + return this; + } + + public Builder colorPrimaries(Optional colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = colorPrimaries; + return this; + } + + public Builder colorRange(String colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + public Builder colorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + public Builder colorSpace(String colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = Optional.ofNullable(colorSpace); + return this; + } + + public Builder colorSpace(Optional colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = colorSpace; + return this; + } + + public Builder colorTrc(String colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = Optional.ofNullable(colorTrc); + return this; + } + + public Builder colorTrc(Optional colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = colorTrc; + return this; + } + + public Builder frameRate(int frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + public Builder frameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + public Builder hasScalingMatrix(boolean hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); + return this; + } + + public Builder hasScalingMatrix(Optional hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = hasScalingMatrix; + return this; + } + + public Builder height(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder level(int level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public Builder level(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public Builder profile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public Builder profile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public Builder refFrames(int refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + public Builder refFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + public Builder scanType(String scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = Optional.ofNullable(scanType); + return this; + } + + public Builder scanType(Optional scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = scanType; + return this; + } + + public Builder streamIdentifier(String streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = Optional.ofNullable(streamIdentifier); + return this; + } + + public Builder streamIdentifier(Optional streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = streamIdentifier; + return this; + } + + public Builder width(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder displayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public Builder displayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public Builder extendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + public Builder selected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public Builder selected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public Builder channels(int channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = Optional.ofNullable(channels); + return this; + } + + public Builder channels(Optional channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = channels; + return this; + } + + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public Builder language(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Builder languageTag(String languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = Optional.ofNullable(languageTag); + return this; + } + + public Builder languageTag(Optional languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = languageTag; + return this; + } + + public Builder languageCode(String languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + public Builder languageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public Builder samplingRate(int samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + public Builder samplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + public Stream build() { + return new Stream( + id, + streamType, + default_, + codec, + index, + bitrate, + bitDepth, + chromaLocation, + chromaSubsampling, + codedHeight, + codedWidth, + colorPrimaries, + colorRange, + colorSpace, + colorTrc, + frameRate, + hasScalingMatrix, + height, + level, + profile, + refFrames, + scanType, + streamIdentifier, + width, + displayTitle, + extendedDisplayTitle, + selected, + channels, + language, + languageTag, + languageCode, + samplingRate); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Tag.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Tag.java new file mode 100644 index 00000000..ed1af032 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Tag.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Tag - A key representing a specific tag within the section. + */ +public enum Tag { + ALL("all"), + UNWATCHED("unwatched"), + NEWEST("newest"), + RECENTLY_ADDED("recentlyAdded"), + RECENTLY_VIEWED("recentlyViewed"), + ON_DECK("onDeck"), + COLLECTION("collection"), + EDITION("edition"), + GENRE("genre"), + YEAR("year"), + DECADE("decade"), + DIRECTOR("director"), + ACTOR("actor"), + COUNTRY("country"), + CONTENT_RATING("contentRating"), + RATING("rating"), + RESOLUTION("resolution"), + FIRST_CHARACTER("firstCharacter"), + FOLDER("folder"); + + @JsonValue + private final String value; + + private Tag(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/TaskName.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/TaskName.java new file mode 100644 index 00000000..a54cdf1f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/TaskName.java @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * TaskName - the name of the task to be started. + */ +public enum TaskName { + BACKUP_DATABASE("BackupDatabase"), + BUILD_GRACENOTE_COLLECTIONS("BuildGracenoteCollections"), + CHECK_FOR_UPDATES("CheckForUpdates"), + CLEAN_OLD_BUNDLES("CleanOldBundles"), + CLEAN_OLD_CACHE_FILES("CleanOldCacheFiles"), + DEEP_MEDIA_ANALYSIS("DeepMediaAnalysis"), + GENERATE_AUTO_TAGS("GenerateAutoTags"), + GENERATE_CHAPTER_THUMBS("GenerateChapterThumbs"), + GENERATE_MEDIA_INDEX_FILES("GenerateMediaIndexFiles"), + OPTIMIZE_DATABASE("OptimizeDatabase"), + REFRESH_LIBRARIES("RefreshLibraries"), + REFRESH_LOCAL_MEDIA("RefreshLocalMedia"), + REFRESH_PERIODIC_METADATA("RefreshPeriodicMetadata"), + UPGRADE_MEDIA_ANALYSIS("UpgradeMediaAnalysis"); + + @JsonValue + private final String value; + + private TaskName(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Tonight.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Tonight.java new file mode 100644 index 00000000..60823a83 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Tonight.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Tonight - Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ +public enum Tonight { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private Tonight(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/TranscodeSession.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/TranscodeSession.java new file mode 100644 index 00000000..e510c03f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/TranscodeSession.java @@ -0,0 +1,1046 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class TranscodeSession { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("throttled") + private Optional throttled; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("complete") + private Optional complete; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("progress") + private Optional progress; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("speed") + private Optional speed; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private Optional error; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("remaining") + private Optional remaining; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceVideoCodec") + private Optional sourceVideoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceAudioCodec") + private Optional sourceAudioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoDecision") + private Optional videoDecision; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioDecision") + private Optional audioDecision; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtitleDecision") + private Optional subtitleDecision; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocol") + private Optional protocol; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeHwRequested") + private Optional transcodeHwRequested; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("timeStamp") + private Optional timeStamp; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("maxOffsetAvailable") + private Optional maxOffsetAvailable; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("minOffsetAvailable") + private Optional minOffsetAvailable; + + public TranscodeSession( + @JsonProperty("key") Optional key, + @JsonProperty("throttled") Optional throttled, + @JsonProperty("complete") Optional complete, + @JsonProperty("progress") Optional progress, + @JsonProperty("size") Optional size, + @JsonProperty("speed") Optional speed, + @JsonProperty("error") Optional error, + @JsonProperty("duration") Optional duration, + @JsonProperty("remaining") Optional remaining, + @JsonProperty("context") Optional context, + @JsonProperty("sourceVideoCodec") Optional sourceVideoCodec, + @JsonProperty("sourceAudioCodec") Optional sourceAudioCodec, + @JsonProperty("videoDecision") Optional videoDecision, + @JsonProperty("audioDecision") Optional audioDecision, + @JsonProperty("subtitleDecision") Optional subtitleDecision, + @JsonProperty("protocol") Optional protocol, + @JsonProperty("container") Optional container, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("transcodeHwRequested") Optional transcodeHwRequested, + @JsonProperty("timeStamp") Optional timeStamp, + @JsonProperty("maxOffsetAvailable") Optional maxOffsetAvailable, + @JsonProperty("minOffsetAvailable") Optional minOffsetAvailable) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(throttled, "throttled"); + Utils.checkNotNull(complete, "complete"); + Utils.checkNotNull(progress, "progress"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(speed, "speed"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(remaining, "remaining"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + Utils.checkNotNull(videoDecision, "videoDecision"); + Utils.checkNotNull(audioDecision, "audioDecision"); + Utils.checkNotNull(subtitleDecision, "subtitleDecision"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + Utils.checkNotNull(timeStamp, "timeStamp"); + Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); + Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); + this.key = key; + this.throttled = throttled; + this.complete = complete; + this.progress = progress; + this.size = size; + this.speed = speed; + this.error = error; + this.duration = duration; + this.remaining = remaining; + this.context = context; + this.sourceVideoCodec = sourceVideoCodec; + this.sourceAudioCodec = sourceAudioCodec; + this.videoDecision = videoDecision; + this.audioDecision = audioDecision; + this.subtitleDecision = subtitleDecision; + this.protocol = protocol; + this.container = container; + this.videoCodec = videoCodec; + this.audioCodec = audioCodec; + this.audioChannels = audioChannels; + this.transcodeHwRequested = transcodeHwRequested; + this.timeStamp = timeStamp; + this.maxOffsetAvailable = maxOffsetAvailable; + this.minOffsetAvailable = minOffsetAvailable; + } + + public Optional key() { + return key; + } + + public Optional throttled() { + return throttled; + } + + public Optional complete() { + return complete; + } + + public Optional progress() { + return progress; + } + + public Optional size() { + return size; + } + + public Optional speed() { + return speed; + } + + public Optional error() { + return error; + } + + public Optional duration() { + return duration; + } + + public Optional remaining() { + return remaining; + } + + public Optional context() { + return context; + } + + public Optional sourceVideoCodec() { + return sourceVideoCodec; + } + + public Optional sourceAudioCodec() { + return sourceAudioCodec; + } + + public Optional videoDecision() { + return videoDecision; + } + + public Optional audioDecision() { + return audioDecision; + } + + public Optional subtitleDecision() { + return subtitleDecision; + } + + public Optional protocol() { + return protocol; + } + + public Optional container() { + return container; + } + + public Optional videoCodec() { + return videoCodec; + } + + public Optional audioCodec() { + return audioCodec; + } + + public Optional audioChannels() { + return audioChannels; + } + + public Optional transcodeHwRequested() { + return transcodeHwRequested; + } + + public Optional timeStamp() { + return timeStamp; + } + + public Optional maxOffsetAvailable() { + return maxOffsetAvailable; + } + + public Optional minOffsetAvailable() { + return minOffsetAvailable; + } + + public final static Builder builder() { + return new Builder(); + } + + public TranscodeSession withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public TranscodeSession withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public TranscodeSession withThrottled(boolean throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = Optional.ofNullable(throttled); + return this; + } + + public TranscodeSession withThrottled(Optional throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = throttled; + return this; + } + + public TranscodeSession withComplete(boolean complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = Optional.ofNullable(complete); + return this; + } + + public TranscodeSession withComplete(Optional complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = complete; + return this; + } + + public TranscodeSession withProgress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + public TranscodeSession withProgress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + public TranscodeSession withSize(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public TranscodeSession withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public TranscodeSession withSpeed(double speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = Optional.ofNullable(speed); + return this; + } + + public TranscodeSession withSpeed(Optional speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = speed; + return this; + } + + public TranscodeSession withError(boolean error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + public TranscodeSession withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + public TranscodeSession withDuration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public TranscodeSession withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public TranscodeSession withRemaining(int remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = Optional.ofNullable(remaining); + return this; + } + + public TranscodeSession withRemaining(Optional remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = remaining; + return this; + } + + public TranscodeSession withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public TranscodeSession withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public TranscodeSession withSourceVideoCodec(String sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = Optional.ofNullable(sourceVideoCodec); + return this; + } + + public TranscodeSession withSourceVideoCodec(Optional sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = sourceVideoCodec; + return this; + } + + public TranscodeSession withSourceAudioCodec(String sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = Optional.ofNullable(sourceAudioCodec); + return this; + } + + public TranscodeSession withSourceAudioCodec(Optional sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = sourceAudioCodec; + return this; + } + + public TranscodeSession withVideoDecision(String videoDecision) { + Utils.checkNotNull(videoDecision, "videoDecision"); + this.videoDecision = Optional.ofNullable(videoDecision); + return this; + } + + public TranscodeSession withVideoDecision(Optional videoDecision) { + Utils.checkNotNull(videoDecision, "videoDecision"); + this.videoDecision = videoDecision; + return this; + } + + public TranscodeSession withAudioDecision(String audioDecision) { + Utils.checkNotNull(audioDecision, "audioDecision"); + this.audioDecision = Optional.ofNullable(audioDecision); + return this; + } + + public TranscodeSession withAudioDecision(Optional audioDecision) { + Utils.checkNotNull(audioDecision, "audioDecision"); + this.audioDecision = audioDecision; + return this; + } + + public TranscodeSession withSubtitleDecision(String subtitleDecision) { + Utils.checkNotNull(subtitleDecision, "subtitleDecision"); + this.subtitleDecision = Optional.ofNullable(subtitleDecision); + return this; + } + + public TranscodeSession withSubtitleDecision(Optional subtitleDecision) { + Utils.checkNotNull(subtitleDecision, "subtitleDecision"); + this.subtitleDecision = subtitleDecision; + return this; + } + + public TranscodeSession withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public TranscodeSession withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public TranscodeSession withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public TranscodeSession withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public TranscodeSession withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public TranscodeSession withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public TranscodeSession withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public TranscodeSession withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public TranscodeSession withAudioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public TranscodeSession withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public TranscodeSession withTranscodeHwRequested(boolean transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = Optional.ofNullable(transcodeHwRequested); + return this; + } + + public TranscodeSession withTranscodeHwRequested(Optional transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = transcodeHwRequested; + return this; + } + + public TranscodeSession withTimeStamp(double timeStamp) { + Utils.checkNotNull(timeStamp, "timeStamp"); + this.timeStamp = Optional.ofNullable(timeStamp); + return this; + } + + public TranscodeSession withTimeStamp(Optional timeStamp) { + Utils.checkNotNull(timeStamp, "timeStamp"); + this.timeStamp = timeStamp; + return this; + } + + public TranscodeSession withMaxOffsetAvailable(double maxOffsetAvailable) { + Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); + this.maxOffsetAvailable = Optional.ofNullable(maxOffsetAvailable); + return this; + } + + public TranscodeSession withMaxOffsetAvailable(Optional maxOffsetAvailable) { + Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); + this.maxOffsetAvailable = maxOffsetAvailable; + return this; + } + + public TranscodeSession withMinOffsetAvailable(double minOffsetAvailable) { + Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); + this.minOffsetAvailable = Optional.ofNullable(minOffsetAvailable); + return this; + } + + public TranscodeSession withMinOffsetAvailable(Optional minOffsetAvailable) { + Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); + this.minOffsetAvailable = minOffsetAvailable; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeSession other = (TranscodeSession) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.throttled, other.throttled) && + java.util.Objects.deepEquals(this.complete, other.complete) && + java.util.Objects.deepEquals(this.progress, other.progress) && + java.util.Objects.deepEquals(this.size, other.size) && + java.util.Objects.deepEquals(this.speed, other.speed) && + java.util.Objects.deepEquals(this.error, other.error) && + java.util.Objects.deepEquals(this.duration, other.duration) && + java.util.Objects.deepEquals(this.remaining, other.remaining) && + java.util.Objects.deepEquals(this.context, other.context) && + java.util.Objects.deepEquals(this.sourceVideoCodec, other.sourceVideoCodec) && + java.util.Objects.deepEquals(this.sourceAudioCodec, other.sourceAudioCodec) && + java.util.Objects.deepEquals(this.videoDecision, other.videoDecision) && + java.util.Objects.deepEquals(this.audioDecision, other.audioDecision) && + java.util.Objects.deepEquals(this.subtitleDecision, other.subtitleDecision) && + java.util.Objects.deepEquals(this.protocol, other.protocol) && + java.util.Objects.deepEquals(this.container, other.container) && + java.util.Objects.deepEquals(this.videoCodec, other.videoCodec) && + java.util.Objects.deepEquals(this.audioCodec, other.audioCodec) && + java.util.Objects.deepEquals(this.audioChannels, other.audioChannels) && + java.util.Objects.deepEquals(this.transcodeHwRequested, other.transcodeHwRequested) && + java.util.Objects.deepEquals(this.timeStamp, other.timeStamp) && + java.util.Objects.deepEquals(this.maxOffsetAvailable, other.maxOffsetAvailable) && + java.util.Objects.deepEquals(this.minOffsetAvailable, other.minOffsetAvailable); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + throttled, + complete, + progress, + size, + speed, + error, + duration, + remaining, + context, + sourceVideoCodec, + sourceAudioCodec, + videoDecision, + audioDecision, + subtitleDecision, + protocol, + container, + videoCodec, + audioCodec, + audioChannels, + transcodeHwRequested, + timeStamp, + maxOffsetAvailable, + minOffsetAvailable); + } + + @Override + public String toString() { + return Utils.toString(TranscodeSession.class, + "key", key, + "throttled", throttled, + "complete", complete, + "progress", progress, + "size", size, + "speed", speed, + "error", error, + "duration", duration, + "remaining", remaining, + "context", context, + "sourceVideoCodec", sourceVideoCodec, + "sourceAudioCodec", sourceAudioCodec, + "videoDecision", videoDecision, + "audioDecision", audioDecision, + "subtitleDecision", subtitleDecision, + "protocol", protocol, + "container", container, + "videoCodec", videoCodec, + "audioCodec", audioCodec, + "audioChannels", audioChannels, + "transcodeHwRequested", transcodeHwRequested, + "timeStamp", timeStamp, + "maxOffsetAvailable", maxOffsetAvailable, + "minOffsetAvailable", minOffsetAvailable); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional throttled = Optional.empty(); + + private Optional complete = Optional.empty(); + + private Optional progress = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional speed = Optional.empty(); + + private Optional error = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional remaining = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional sourceVideoCodec = Optional.empty(); + + private Optional sourceAudioCodec = Optional.empty(); + + private Optional videoDecision = Optional.empty(); + + private Optional audioDecision = Optional.empty(); + + private Optional subtitleDecision = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional transcodeHwRequested = Optional.empty(); + + private Optional timeStamp = Optional.empty(); + + private Optional maxOffsetAvailable = Optional.empty(); + + private Optional minOffsetAvailable = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder throttled(boolean throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = Optional.ofNullable(throttled); + return this; + } + + public Builder throttled(Optional throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = throttled; + return this; + } + + public Builder complete(boolean complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = Optional.ofNullable(complete); + return this; + } + + public Builder complete(Optional complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = complete; + return this; + } + + public Builder progress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + public Builder progress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + public Builder size(int size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder speed(double speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = Optional.ofNullable(speed); + return this; + } + + public Builder speed(Optional speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = speed; + return this; + } + + public Builder error(boolean error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + public Builder duration(int duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Builder remaining(int remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = Optional.ofNullable(remaining); + return this; + } + + public Builder remaining(Optional remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = remaining; + return this; + } + + public Builder context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public Builder sourceVideoCodec(String sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = Optional.ofNullable(sourceVideoCodec); + return this; + } + + public Builder sourceVideoCodec(Optional sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = sourceVideoCodec; + return this; + } + + public Builder sourceAudioCodec(String sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = Optional.ofNullable(sourceAudioCodec); + return this; + } + + public Builder sourceAudioCodec(Optional sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = sourceAudioCodec; + return this; + } + + public Builder videoDecision(String videoDecision) { + Utils.checkNotNull(videoDecision, "videoDecision"); + this.videoDecision = Optional.ofNullable(videoDecision); + return this; + } + + public Builder videoDecision(Optional videoDecision) { + Utils.checkNotNull(videoDecision, "videoDecision"); + this.videoDecision = videoDecision; + return this; + } + + public Builder audioDecision(String audioDecision) { + Utils.checkNotNull(audioDecision, "audioDecision"); + this.audioDecision = Optional.ofNullable(audioDecision); + return this; + } + + public Builder audioDecision(Optional audioDecision) { + Utils.checkNotNull(audioDecision, "audioDecision"); + this.audioDecision = audioDecision; + return this; + } + + public Builder subtitleDecision(String subtitleDecision) { + Utils.checkNotNull(subtitleDecision, "subtitleDecision"); + this.subtitleDecision = Optional.ofNullable(subtitleDecision); + return this; + } + + public Builder subtitleDecision(Optional subtitleDecision) { + Utils.checkNotNull(subtitleDecision, "subtitleDecision"); + this.subtitleDecision = subtitleDecision; + return this; + } + + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder audioChannels(int audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder transcodeHwRequested(boolean transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = Optional.ofNullable(transcodeHwRequested); + return this; + } + + public Builder transcodeHwRequested(Optional transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = transcodeHwRequested; + return this; + } + + public Builder timeStamp(double timeStamp) { + Utils.checkNotNull(timeStamp, "timeStamp"); + this.timeStamp = Optional.ofNullable(timeStamp); + return this; + } + + public Builder timeStamp(Optional timeStamp) { + Utils.checkNotNull(timeStamp, "timeStamp"); + this.timeStamp = timeStamp; + return this; + } + + public Builder maxOffsetAvailable(double maxOffsetAvailable) { + Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); + this.maxOffsetAvailable = Optional.ofNullable(maxOffsetAvailable); + return this; + } + + public Builder maxOffsetAvailable(Optional maxOffsetAvailable) { + Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); + this.maxOffsetAvailable = maxOffsetAvailable; + return this; + } + + public Builder minOffsetAvailable(double minOffsetAvailable) { + Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); + this.minOffsetAvailable = Optional.ofNullable(minOffsetAvailable); + return this; + } + + public Builder minOffsetAvailable(Optional minOffsetAvailable) { + Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); + this.minOffsetAvailable = minOffsetAvailable; + return this; + } + + public TranscodeSession build() { + return new TranscodeSession( + key, + throttled, + complete, + progress, + size, + speed, + error, + duration, + remaining, + context, + sourceVideoCodec, + sourceAudioCodec, + videoDecision, + audioDecision, + subtitleDecision, + protocol, + container, + videoCodec, + audioCodec, + audioChannels, + transcodeHwRequested, + timeStamp, + maxOffsetAvailable, + minOffsetAvailable); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Type.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Type.java new file mode 100644 index 00000000..b99db6ec --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Type.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Type - Plex content type to search for + */ +public enum Type { + ONE(1L), + TWO(2L), + THREE(3L), + FOUR(4L); + + @JsonValue + private final long value; + + private Type(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressErrors.java new file mode 100644 index 00000000..4645ea3a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UpdatePlayProgressErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public UpdatePlayProgressErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public UpdatePlayProgressErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public UpdatePlayProgressErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public UpdatePlayProgressErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public UpdatePlayProgressErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public UpdatePlayProgressErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public UpdatePlayProgressErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlayProgressErrors other = (UpdatePlayProgressErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlayProgressErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public UpdatePlayProgressErrors build() { + return new UpdatePlayProgressErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequest.java new file mode 100644 index 00000000..c0738f27 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequest.java @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UpdatePlayProgressRequest { + + /** + * the media key + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private String key; + + /** + * The time, in milliseconds, used to set the media playback progress. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=time") + private double time; + + /** + * The playback state of the media item. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=state") + private String state; + + public UpdatePlayProgressRequest( + String key, + double time, + String state) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(time, "time"); + Utils.checkNotNull(state, "state"); + this.key = key; + this.time = time; + this.state = state; + } + + /** + * the media key + */ + public String key() { + return key; + } + + /** + * The time, in milliseconds, used to set the media playback progress. + */ + public double time() { + return time; + } + + /** + * The playback state of the media item. + */ + public String state() { + return state; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the media key + */ + public UpdatePlayProgressRequest withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The time, in milliseconds, used to set the media playback progress. + */ + public UpdatePlayProgressRequest withTime(double time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + /** + * The playback state of the media item. + */ + public UpdatePlayProgressRequest withState(String state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlayProgressRequest other = (UpdatePlayProgressRequest) o; + return + java.util.Objects.deepEquals(this.key, other.key) && + java.util.Objects.deepEquals(this.time, other.time) && + java.util.Objects.deepEquals(this.state, other.state); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + key, + time, + state); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlayProgressRequest.class, + "key", key, + "time", time, + "state", state); + } + + public final static class Builder { + + private String key; + + private Double time; + + private String state; + + private Builder() { + // force use of static builder() method + } + + /** + * the media key + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The time, in milliseconds, used to set the media playback progress. + */ + public Builder time(double time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + /** + * The playback state of the media item. + */ + public Builder state(String state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public UpdatePlayProgressRequest build() { + return new UpdatePlayProgressRequest( + key, + time, + state); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequestBuilder.java new file mode 100644 index 00000000..e8b540f7 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class UpdatePlayProgressRequestBuilder { + + private String key; + private Double time; + private String state; + private final SDKMethodInterfaces.MethodCallUpdatePlayProgress sdk; + + public UpdatePlayProgressRequestBuilder(SDKMethodInterfaces.MethodCallUpdatePlayProgress sdk) { + this.sdk = sdk; + } + + public UpdatePlayProgressRequestBuilder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public UpdatePlayProgressRequestBuilder time(double time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + public UpdatePlayProgressRequestBuilder state(String state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public UpdatePlayProgressResponse call() throws Exception { + + return sdk.updatePlayProgress( + key, + time, + state); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponse.java new file mode 100644 index 00000000..e9c8fea9 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UpdatePlayProgressResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public UpdatePlayProgressResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public UpdatePlayProgressResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdatePlayProgressResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdatePlayProgressResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public UpdatePlayProgressResponse withObject(UpdatePlayProgressResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public UpdatePlayProgressResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlayProgressResponse other = (UpdatePlayProgressResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlayProgressResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(UpdatePlayProgressResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public UpdatePlayProgressResponse build() { + return new UpdatePlayProgressResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponseBody.java new file mode 100644 index 00000000..5f9f6d8d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlayProgressResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * UpdatePlayProgressResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class UpdatePlayProgressResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public UpdatePlayProgressResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public UpdatePlayProgressResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public UpdatePlayProgressResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlayProgressResponseBody other = (UpdatePlayProgressResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlayProgressResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public UpdatePlayProgressResponseBody build() { + return new UpdatePlayProgressResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistErrors.java new file mode 100644 index 00000000..518e3146 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UpdatePlaylistErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public UpdatePlaylistErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public UpdatePlaylistErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public UpdatePlaylistErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public UpdatePlaylistErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public UpdatePlaylistErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public UpdatePlaylistErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public UpdatePlaylistErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlaylistErrors other = (UpdatePlaylistErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlaylistErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public UpdatePlaylistErrors build() { + return new UpdatePlaylistErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequest.java new file mode 100644 index 00000000..de18d6aa --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequest.java @@ -0,0 +1,216 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UpdatePlaylistRequest { + + /** + * the ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") + private double playlistID; + + /** + * name of the playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") + private Optional title; + + /** + * summary description of the playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=summary") + private Optional summary; + + public UpdatePlaylistRequest( + double playlistID, + Optional title, + Optional summary) { + Utils.checkNotNull(playlistID, "playlistID"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(summary, "summary"); + this.playlistID = playlistID; + this.title = title; + this.summary = summary; + } + + /** + * the ID of the playlist + */ + public double playlistID() { + return playlistID; + } + + /** + * name of the playlist + */ + public Optional title() { + return title; + } + + /** + * summary description of the playlist + */ + public Optional summary() { + return summary; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * the ID of the playlist + */ + public UpdatePlaylistRequest withPlaylistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * name of the playlist + */ + public UpdatePlaylistRequest withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * name of the playlist + */ + public UpdatePlaylistRequest withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * summary description of the playlist + */ + public UpdatePlaylistRequest withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * summary description of the playlist + */ + public UpdatePlaylistRequest withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlaylistRequest other = (UpdatePlaylistRequest) o; + return + java.util.Objects.deepEquals(this.playlistID, other.playlistID) && + java.util.Objects.deepEquals(this.title, other.title) && + java.util.Objects.deepEquals(this.summary, other.summary); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + playlistID, + title, + summary); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlaylistRequest.class, + "playlistID", playlistID, + "title", title, + "summary", summary); + } + + public final static class Builder { + + private Double playlistID; + + private Optional title = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * the ID of the playlist + */ + public Builder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * name of the playlist + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * name of the playlist + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * summary description of the playlist + */ + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * summary description of the playlist + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public UpdatePlaylistRequest build() { + return new UpdatePlaylistRequest( + playlistID, + title, + summary); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequestBuilder.java new file mode 100644 index 00000000..fba32e3c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistRequestBuilder.java @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class UpdatePlaylistRequestBuilder { + + private Double playlistID; + private Optional title = Optional.empty(); + private Optional summary = Optional.empty(); + private final SDKMethodInterfaces.MethodCallUpdatePlaylist sdk; + + public UpdatePlaylistRequestBuilder(SDKMethodInterfaces.MethodCallUpdatePlaylist sdk) { + this.sdk = sdk; + } + + public UpdatePlaylistRequestBuilder playlistID(double playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + public UpdatePlaylistRequestBuilder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.of(title); + return this; + } + + public UpdatePlaylistRequestBuilder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public UpdatePlaylistRequestBuilder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.of(summary); + return this; + } + + public UpdatePlaylistRequestBuilder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public UpdatePlaylistResponse call() throws Exception { + + return sdk.updatePlaylist( + playlistID, + title, + summary); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponse.java new file mode 100644 index 00000000..f2e81062 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UpdatePlaylistResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public UpdatePlaylistResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public UpdatePlaylistResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdatePlaylistResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdatePlaylistResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public UpdatePlaylistResponse withObject(UpdatePlaylistResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public UpdatePlaylistResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlaylistResponse other = (UpdatePlaylistResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlaylistResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(UpdatePlaylistResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public UpdatePlaylistResponse build() { + return new UpdatePlaylistResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponseBody.java new file mode 100644 index 00000000..7cd27b21 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UpdatePlaylistResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * UpdatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class UpdatePlaylistResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public UpdatePlaylistResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public UpdatePlaylistResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public UpdatePlaylistResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePlaylistResponseBody other = (UpdatePlaylistResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(UpdatePlaylistResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public UpdatePlaylistResponseBody build() { + return new UpdatePlaylistResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistErrors.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistErrors.java new file mode 100644 index 00000000..6fd1de9f --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistErrors.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UploadPlaylistErrors { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + public UploadPlaylistErrors( + @JsonProperty("code") Optional code, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.code = code; + this.message = message; + this.status = status; + } + + public Optional code() { + return code; + } + + public Optional message() { + return message; + } + + public Optional status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public UploadPlaylistErrors withCode(double code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public UploadPlaylistErrors withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public UploadPlaylistErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public UploadPlaylistErrors withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public UploadPlaylistErrors withStatus(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public UploadPlaylistErrors withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadPlaylistErrors other = (UploadPlaylistErrors) o; + return + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + code, + message, + status); + } + + @Override + public String toString() { + return Utils.toString(UploadPlaylistErrors.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(double 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(double status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public UploadPlaylistErrors build() { + return new UploadPlaylistErrors( + code, + message, + status); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequest.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequest.java new file mode 100644 index 00000000..c7fbf91e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequest.java @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UploadPlaylistRequest { + + /** + * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private String path; + + /** + * Force overwriting of duplicate playlists. + * By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * The `force` argument is used to disable overwriting. + * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Force force; + + public UploadPlaylistRequest( + String path, + Force force) { + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(force, "force"); + this.path = path; + this.force = force; + } + + /** + * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * + */ + public String path() { + return path; + } + + /** + * Force overwriting of duplicate playlists. + * By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * The `force` argument is used to disable overwriting. + * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * + */ + public Force force() { + return force; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * + */ + public UploadPlaylistRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Force overwriting of duplicate playlists. + * By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * The `force` argument is used to disable overwriting. + * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * + */ + public UploadPlaylistRequest withForce(Force force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadPlaylistRequest other = (UploadPlaylistRequest) o; + return + java.util.Objects.deepEquals(this.path, other.path) && + java.util.Objects.deepEquals(this.force, other.force); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + path, + force); + } + + @Override + public String toString() { + return Utils.toString(UploadPlaylistRequest.class, + "path", path, + "force", force); + } + + public final static class Builder { + + private String path; + + private Force force; + + private Builder() { + // force use of static builder() method + } + + /** + * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Force overwriting of duplicate playlists. + * By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * The `force` argument is used to disable overwriting. + * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * + */ + public Builder force(Force force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + public UploadPlaylistRequest build() { + return new UploadPlaylistRequest( + path, + force); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequestBuilder.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequestBuilder.java new file mode 100644 index 00000000..49ed049d --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import lukehagar.plexapi.plexapi.models.errors.SDKError; +import lukehagar.plexapi.plexapi.utils.LazySingletonValue; +import lukehagar.plexapi.plexapi.utils.Utils; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class UploadPlaylistRequestBuilder { + + private String path; + private Force force; + private final SDKMethodInterfaces.MethodCallUploadPlaylist sdk; + + public UploadPlaylistRequestBuilder(SDKMethodInterfaces.MethodCallUploadPlaylist sdk) { + this.sdk = sdk; + } + + public UploadPlaylistRequestBuilder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + public UploadPlaylistRequestBuilder force(Force force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + public UploadPlaylistResponse call() throws Exception { + + return sdk.uploadPlaylist( + path, + force); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponse.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponse.java new file mode 100644 index 00000000..dddb3935 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponse.java @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class UploadPlaylistResponse implements lukehagar.plexapi.plexapi.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + private Optional object; + + public UploadPlaylistResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Optional object() { + return object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public UploadPlaylistResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UploadPlaylistResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UploadPlaylistResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public UploadPlaylistResponse withObject(UploadPlaylistResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public UploadPlaylistResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadPlaylistResponse other = (UploadPlaylistResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(UploadPlaylistResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(UploadPlaylistResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public UploadPlaylistResponse build() { + return new UploadPlaylistResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponseBody.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponseBody.java new file mode 100644 index 00000000..fb70b085 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/UploadPlaylistResponseBody.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * UploadPlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ + +public class UploadPlaylistResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional> errors; + + public UploadPlaylistResponseBody( + @JsonProperty("errors") Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Optional> errors() { + return errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public UploadPlaylistResponseBody withErrors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public UploadPlaylistResponseBody withErrors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadPlaylistResponseBody other = (UploadPlaylistResponseBody) o; + return + java.util.Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(UploadPlaylistResponseBody.class, + "errors", errors); + } + + public final static class Builder { + + private Optional> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(java.util.List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public UploadPlaylistResponseBody build() { + return new UploadPlaylistResponseBody( + errors); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Upscale.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Upscale.java new file mode 100644 index 00000000..75a2a997 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Upscale.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Upscale - allow images to be resized beyond native dimensions. + */ +public enum Upscale { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + private Upscale(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/User.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/User.java new file mode 100644 index 00000000..5487b55e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/User.java @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class User { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + public User( + @JsonProperty("id") Optional id, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title, "title"); + this.id = id; + this.thumb = thumb; + this.title = title; + } + + public Optional id() { + return id; + } + + public Optional thumb() { + return thumb; + } + + public Optional title() { + return title; + } + + public final static Builder builder() { + return new Builder(); + } + + public User withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public User withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public User withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public User withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public User withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public User withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User other = (User) o; + return + java.util.Objects.deepEquals(this.id, other.id) && + java.util.Objects.deepEquals(this.thumb, other.thumb) && + java.util.Objects.deepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + id, + thumb, + title); + } + + @Override + public String toString() { + return Utils.toString(User.class, + "id", id, + "thumb", thumb, + "title", title); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public User build() { + return new User( + id, + thumb, + title); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/operations/Writer.java b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Writer.java new file mode 100644 index 00000000..4862a13b --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/operations/Writer.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.operations; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Writer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + public Writer( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public Writer withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Writer withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Writer other = (Writer) o; + return + java.util.Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(Writer.class, + "tag", tag); + } + + public final static class Builder { + + private Optional tag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + public Writer build() { + return new Writer( + tag); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/models/shared/Security.java b/src/main/java/lukehagar/plexapi/plexapi/models/shared/Security.java new file mode 100644 index 00000000..610b2e1e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/models/shared/Security.java @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.models.shared; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import lukehagar.plexapi.plexapi.utils.SpeakeasyMetadata; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Security { + + @SpeakeasyMetadata("security:scheme=true,type=apiKey,subtype=header,name=X-Plex-Token") + private String accessToken; + + public Security( + String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + } + + public String accessToken() { + return accessToken; + } + + public final static Builder builder() { + return new Builder(); + } + + public Security withAccessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Security other = (Security) o; + return + java.util.Objects.deepEquals(this.accessToken, other.accessToken); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + accessToken); + } + + @Override + public String toString() { + return Utils.toString(Security.class, + "accessToken", accessToken); + } + + public final static class Builder { + + private String accessToken; + + private Builder() { + // force use of static builder() method + } + + public Builder accessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + public Security build() { + return new Security( + accessToken); + } + } +} + diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/BackoffStrategy.java b/src/main/java/lukehagar/plexapi/plexapi/utils/BackoffStrategy.java new file mode 100644 index 00000000..d44a3841 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/BackoffStrategy.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.util.concurrent.TimeUnit; +import lukehagar.plexapi.plexapi.utils.Utils; + +/** + * Exponential Backoff Strategy with Jitter + * + * The duration between consecutive attempts is calculated as follows: + * intervalMs = min(maxIntervalMs, initialIntervalMs*(baseFactor^attempts) +/- r) + * where baseFactor is the base factor and r a random value between 0 and jitterFactor*intervalMs. + */ +public class BackoffStrategy { + + private static final long DEFAULT_INITIAL_INTERVAL_MS = 500L; + private static final long DEFAULT_MAX_INTERVAL_MS = 60000L; + private static final long DEFAULT_MAX_ELAPSED_TIME_MS = 3600000L; + private static final double DEFAULT_EXPONENT = 1.5; + private static final double DEFAULT_JITTER_FACTOR = 0.5; + private static final boolean DEFAULT_RETRY_CONNECT_ERROR = false; + private static final boolean DEFAULT_RETRY_READ_TIMEOUT_ERROR = false; + + private final long initialIntervalMs; + private final long maxIntervalMs; + private final long maxElapsedTimeMs; + private final double baseFactor; + private final double jitterFactor; + private final boolean retryConnectError; + private final boolean retryReadTimeoutError; + + private BackoffStrategy(long initialIntervalMs, + long maxIntervalMs, + long maxElapsedTimeMs, + double baseFactor, + double jitterFactor, + boolean retryConnectError, + boolean retryReadTimeoutError) { + this.initialIntervalMs = initialIntervalMs; + this.maxIntervalMs = maxIntervalMs; + this.maxElapsedTimeMs = maxElapsedTimeMs; + this.baseFactor = baseFactor; + this.jitterFactor = jitterFactor; + this.retryConnectError = retryConnectError; + this.retryReadTimeoutError = retryReadTimeoutError; + } + + public static BackoffStrategy withDefaults() { + return BackoffStrategy.builder().build(); + } + + public long initialIntervalMs() { + return initialIntervalMs; + } + + public long maxIntervalMs() { + return maxIntervalMs; + } + + public double baseFactor() { + return baseFactor; + } + + /** + * @deprecated use baseFactor instead. + */ + @Deprecated + public double exponent() { + return baseFactor; + } + + public long maxElapsedTimeMs() { + return maxElapsedTimeMs; + } + + public double jitterFactor() { + return jitterFactor; + } + + public boolean retryConnectError() { + return retryConnectError; + } + + public boolean retryReadTimeoutError() { + return retryReadTimeoutError; + } + + public final static Builder builder() { + return new Builder(); + } + + public final static class Builder { + + private long initialIntervalMs = DEFAULT_INITIAL_INTERVAL_MS; + private long maxIntervalMs = DEFAULT_MAX_INTERVAL_MS; + private long maxElapsedTimeMs = DEFAULT_MAX_ELAPSED_TIME_MS; + private double baseFactor = DEFAULT_EXPONENT; + private double jitterFactor = DEFAULT_JITTER_FACTOR; + private boolean retryConnectError = DEFAULT_RETRY_CONNECT_ERROR; + private boolean retryReadTimeoutError = DEFAULT_RETRY_READ_TIMEOUT_ERROR; + + private Builder() {} + + /** + * Sets the initial interval + * + * @param duration The initial interval. + * @param unit The time unit associated with duration. + * @return The builder instance. + */ + public Builder initialInterval(long duration, TimeUnit unit) { + Utils.checkNotNull(unit, "unit"); + if (duration < 0) { + throw new IllegalArgumentException("initialInterval must be positive"); + } + this.initialIntervalMs = unit.toMillis(duration); + return this; + } + + /** + * Sets the maximum interval + * + * @param duration The maximum interval. + * @param unit The time unit associated with duration. + * @return The builder instance. + */ + public Builder maxInterval(long duration, TimeUnit unit) { + Utils.checkNotNull(unit, "unit"); + if (duration <= 0) { + throw new IllegalArgumentException("maxInterval must be strictly positive"); + } + this.maxIntervalMs = unit.toMillis(duration); + return this; + } + + /** + * Sets the maximum elapsed time + * + * @param duration The maximum elapsed time. + * @param unit The time unit associated with duration. + * @return The builder instance. + */ + public Builder maxElapsedTime(long duration, TimeUnit unit) { + Utils.checkNotNull(unit, "unit"); + if (duration < 0) { + throw new IllegalArgumentException("maxElapsedTime must be positive"); + } + this.maxElapsedTimeMs = unit.toMillis(duration); + return this; + } + + /** + * Sets the backoff base factor. + * + * @param baseFactor The base factor to use. + * @return The builder instance. + */ + public Builder baseFactor(double baseFactor) { + if (baseFactor <= 0 ) { + throw new IllegalArgumentException("baseFactor must be strictly positive"); + } + this.baseFactor = baseFactor; + return this; + } + + /** + * Sets the backoff base factor. + * + * @deprecated use baseFactor instead. + * @param exponent The base factor to use. + * @return The builder instance. + */ + @Deprecated + public Builder exponent(double baseFactor) { + if (baseFactor <= 0 ) { + throw new IllegalArgumentException("baseFactor must be strictly positive"); + } + this.baseFactor = baseFactor; + return this; + } + + /** + * Sets the jitter factor used to randomize the backoff interval. + * + * @param jitterFactor The jitter factor to use (default is 0.5f). + * @return The builder instance. + */ + public Builder jitterFactor(double jitterFactor) { + if (jitterFactor < 0 || jitterFactor > 1) { + throw new IllegalArgumentException("jitterFactor must be between 0 and 1"); + } + this.jitterFactor = jitterFactor; + return this; + } + + /** + * Specifies whether connection errors should be retried. + * + * @param retry Whether to retry on connection error. + * @return The builder instance. + */ + public Builder retryConnectError(boolean retry) { + this.retryConnectError = retry; + return this; + } + + /** + * Do not retry on connection error. + * + * @return The builder instance. + */ + public Builder throwConnectError() { + this.retryConnectError = false; + return this; + } + + /** + * Specifies whether Read Timeout errors should be retried. + * + * @param retry Whether to retry on Read Timeout error. + * @return The builder instance. + */ + public Builder retryReadTimeoutError(boolean retry) { + this.retryReadTimeoutError = retry; + return this; + } + + /** + * Do not retry on Read Timeout error. + * + * @return The builder instance. + */ + public Builder throwReadTimeoutError() { + this.retryReadTimeoutError = false; + return this; + } + + public BackoffStrategy build() { + return new BackoffStrategy(initialIntervalMs, + maxIntervalMs, + maxElapsedTimeMs, + baseFactor, + jitterFactor, + retryConnectError, + retryReadTimeoutError); + } + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/BigDecimalString.java b/src/main/java/lukehagar/plexapi/plexapi/utils/BigDecimalString.java new file mode 100644 index 00000000..745938bd --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/BigDecimalString.java @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Objects; + +import com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + +// Internal API only + +// Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use +// a custom serializer/deserializer + +@JsonSerialize(using = BigDecimalString.BigDecimalStringSerializer.class) +@JsonDeserialize(using = BigDecimalString.BigDecimalStringDeserializer.class) +public class BigDecimalString { + + private final BigDecimal value; + + public BigDecimalString(BigDecimal value) { + this.value = value; + } + + public BigDecimalString(String value) { + this(new BigDecimal(value)); + } + + public BigDecimal value() { + return value; + } + + @Override + public String toString() { + return value.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BigDecimalString other = (BigDecimalString) obj; + return Objects.equals(value, other.value); + } + + public static final class BigDecimalStringSerializer extends StdSerializer { + + private static final long serialVersionUID = -3828937716095008071L; + + public BigDecimalStringSerializer() { + this(null); + } + + public BigDecimalStringSerializer(Class t) { + super(t); + } + + @Override + public void serialize(BigDecimalString value, JsonGenerator g, SerializerProvider provider) + throws IOException, JsonProcessingException { + g.writeString(value.value.toString()); + } + } + + public static final class BigDecimalStringDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2474225842945673085L; + + public BigDecimalStringDeserializer() { + this(null); + } + + public BigDecimalStringDeserializer(Class t) { + super(t); + } + + @Override + public BigDecimalString deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + String s = p.readValueAs(String.class); + return new BigDecimalString(new BigDecimal(s)); + } + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/BigIntegerString.java b/src/main/java/lukehagar/plexapi/plexapi/utils/BigIntegerString.java new file mode 100644 index 00000000..6418958a --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/BigIntegerString.java @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.io.IOException; +import java.math.BigInteger; +import java.util.Objects; + +import com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + +// Internal API only + +// Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use +// a custom serializer/deserializer + +@JsonSerialize(using = BigIntegerString.BigIntegerStringSerializer.class) +@JsonDeserialize(using = BigIntegerString.BigIntegerStringDeserializer.class) +public class BigIntegerString { + + private final BigInteger value; + + public BigIntegerString(BigInteger value) { + this.value = value; + } + + public BigIntegerString(String value) { + this(new BigInteger(value)); + } + + public BigInteger value() { + return value; + } + + @Override + public String toString() { + return value.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BigIntegerString other = (BigIntegerString) obj; + return Objects.equals(value, other.value); + } + + public static final class BigIntegerStringSerializer extends StdSerializer { + + private static final long serialVersionUID = -2474225842945673085L; + + public BigIntegerStringSerializer() { + this(null); + } + + public BigIntegerStringSerializer(Class t) { + super(t); + } + + @Override + public void serialize(BigIntegerString value, JsonGenerator g, SerializerProvider provider) + throws IOException, JsonProcessingException { + g.writeString(value.value.toString()); + } + } + + public static final class BigIntegerStringDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2474225842945673085L; + + public BigIntegerStringDeserializer() { + this(null); + } + + public BigIntegerStringDeserializer(Class t) { + super(t); + } + + @Override + public BigIntegerString deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + String s = p.readValueAs(String.class); + return new BigIntegerString(new BigInteger(s)); + } + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/Deserializers.java b/src/main/java/lukehagar/plexapi/plexapi/utils/Deserializers.java new file mode 100644 index 00000000..e9a53b00 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/Deserializers.java @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +import com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.Module; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; + +public final class Deserializers { + + public static final JsonDeserializer BOOLEAN_STRICT = new StrictBooleanDeserializer(); + public static final JsonDeserializer INTEGER_STRICT = new StrictIntegerDeserializer(); + public static final JsonDeserializer LONG_STRICT = new StrictLongDeserializer(); + public static final JsonDeserializer SHORT_STRICT = new StrictShortDeserializer(); + public static final JsonDeserializer FLOAT_STRICT = new StrictFloatDeserializer(); + public static final JsonDeserializer DOUBLE_STRICT = new StrictDoubleDeserializer(); + public static final JsonDeserializer LOCAL_DATE_STRICT = new StrictLocalDateDeserializer(); + public static final JsonDeserializer OFFSET_DATE_TIME_STRICT = new StrictOffsetDateTimeDeserializer(); + public static final JsonDeserializer STRING_STRICT = new StrictStringDeserializer(); + + public static final Module STRICT_DESERIALIZERS = createStrictDeserializersModule(); + + private static Module createStrictDeserializersModule() { + SimpleModule m = new SimpleModule(); + m.addDeserializer(Boolean.class, Deserializers.BOOLEAN_STRICT); + m.addDeserializer(Short.class, Deserializers.SHORT_STRICT); + m.addDeserializer(Integer.class, Deserializers.INTEGER_STRICT); + m.addDeserializer(Long.class, Deserializers.LONG_STRICT); + m.addDeserializer(Float.class, Deserializers.FLOAT_STRICT); + m.addDeserializer(Double.class, Deserializers.DOUBLE_STRICT); + m.addDeserializer(OffsetDateTime.class, Deserializers.OFFSET_DATE_TIME_STRICT); + m.addDeserializer(LocalDate.class, Deserializers.LOCAL_DATE_STRICT); + m.addDeserializer(String.class, Deserializers.STRING_STRICT); + return m; + } + + private static final class StrictBooleanDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictBooleanDeserializer() { + super(Boolean.class); + } + + @Override + public Boolean deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_TRUE) { + return true; + } else if (t == JsonToken.VALUE_FALSE) { + return false; + } else { + return (Boolean) ctxt.handleUnexpectedToken(Boolean.class, p); + } + } + } + + private static final class StrictDoubleDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 5500822592284739392L; + + StrictDoubleDeserializer() { + super(Double.class); + } + + @Override + public Double deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getDoubleValue(); + } else if (t == JsonToken.VALUE_NUMBER_FLOAT) { + return p.getDoubleValue(); + } else { + return (Double) ctxt.handleUnexpectedToken(Double.class, p); + } + } + } + + private static final class StrictFloatDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 2207323065789635630L; + + StrictFloatDeserializer() { + super(Float.class); + } + + @Override + public Float deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getFloatValue(); + } else if (t == JsonToken.VALUE_NUMBER_FLOAT) { + return p.getFloatValue(); + } else { + return (Float) ctxt.handleUnexpectedToken(Float.class, p); + } + } + } + + private static final class StrictIntegerDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6079282945607228350L; + + StrictIntegerDeserializer() { + super(Integer.class); + } + + @Override + public Integer deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getIntValue(); + } else { + return (Integer) ctxt.handleUnexpectedToken(Integer.class, p); + } + } + } + + private static final class StrictLocalDateDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictLocalDateDeserializer() { + super(LocalDate.class); + } + + @Override + public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException { + if (p.currentToken() == JsonToken.VALUE_STRING) { + String text = p.getText(); + try { + return LocalDate.parse(text, DateTimeFormatter.ISO_LOCAL_DATE); + } catch (DateTimeParseException e) { + return (LocalDate) ctxt.handleWeirdStringValue(LocalDate.class, text, e.getMessage()); + } + } else { + return (LocalDate) ctxt.handleUnexpectedToken(LocalDate.class, p); + } + } + } + + private static final class StrictLongDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2721538755854421632L; + + public StrictLongDeserializer() { + super(Long.class); + } + + @Override + public Long deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getLongValue(); + } else { + return (Long) ctxt.handleUnexpectedToken(Long.class, p); + } + } + } + + private static final class StrictOffsetDateTimeDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictOffsetDateTimeDeserializer() { + super(OffsetDateTime.class); + } + + @Override + public OffsetDateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException { + if (p.currentToken() == JsonToken.VALUE_STRING) { + String text = p.getText(); + try { + return OffsetDateTime.parse(text, DateTimeFormatter.ISO_DATE_TIME); + } catch (DateTimeParseException e) { + return (OffsetDateTime) ctxt.handleWeirdStringValue(OffsetDateTime.class, text, e.getMessage()); + } + } else { + return (OffsetDateTime) ctxt.handleUnexpectedToken(OffsetDateTime.class, p); + } + } + } + + private static final class StrictShortDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 2162877248512421L; + + StrictShortDeserializer() { + super(Short.class); + } + + @Override + public Short deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getShortValue(); + } else { + return (Short) ctxt.handleUnexpectedToken(Short.class, p); + } + } + } + + private static final class StrictStringDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictStringDeserializer() { + super(String.class); + } + + @Override + public String deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_STRING) { + return p.getText(); + } else { + return (String) ctxt.handleUnexpectedToken(String.class, p); + } + } + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/FormMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/utils/FormMetadata.java new file mode 100644 index 00000000..2baef0d1 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/FormMetadata.java @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.lang.reflect.Field; + +class FormMetadata { + + String style = "form"; + boolean explode = true; + boolean json; + String name; + + private FormMetadata() { + } + + // form:name=propName,style=spaceDelimited,explode=true + static FormMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { + return Metadata.parse("form", new FormMetadata(), field); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/HTTPClient.java b/src/main/java/lukehagar/plexapi/plexapi/utils/HTTPClient.java new file mode 100644 index 00000000..c2d306ea --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/HTTPClient.java @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URISyntaxException; +import java.net.http.HttpResponse; + +public interface HTTPClient { + public HttpResponse send(HTTPRequest request) + throws IOException, InterruptedException, URISyntaxException; +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/HTTPRequest.java b/src/main/java/lukehagar/plexapi/plexapi/utils/HTTPRequest.java new file mode 100644 index 00000000..d4e69468 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/HTTPRequest.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.net.URI; +import java.net.http.HttpRequest; +import java.net.http.HttpRequest.BodyPublisher; +import java.net.http.HttpRequest.BodyPublishers; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.http.NameValuePair; +import org.apache.http.client.utils.URLEncodedUtils; + +public class HTTPRequest { + private String baseURL; + private String method; + private SerializedBody body; + + private List queryParams = new ArrayList<>(); + private Map> headers = new HashMap<>(); + + public HTTPRequest setMethod(String method) { + this.method = method; + return this; + } + + public HTTPRequest setURL(String url) { + this.baseURL = url; + return this; + } + + public HTTPRequest setBody(SerializedBody body) { + this.body = body; + return this; + } + + public HTTPRequest addHeader(String key, String value) { + List headerValues = this.headers.get(key); + if (headerValues == null) { + headerValues = new ArrayList<>(); + } + + headerValues.add(value); + this.headers.put(key, headerValues); + return this; + } + + public HTTPRequest addQueryParam(NameValuePair param) { + this.queryParams.add(param); + return this; + } + + public HttpRequest build() { + HttpRequest.Builder requestBuilder = HttpRequest.newBuilder(); + + BodyPublisher bodyPublisher = BodyPublishers.noBody(); + if (this.body != null) { + bodyPublisher = this.body.body; + requestBuilder.header("Content-Type", this.body.contentType); + } + + requestBuilder.method(this.method, bodyPublisher); + requestBuilder.uri(resolveURL()); + + for (Map.Entry> entry : this.headers.entrySet()) { + for (String value : entry.getValue()) { + requestBuilder.header(entry.getKey(), value); + } + } + + return requestBuilder.build(); + } + + private URI resolveURL() { + String url = this.baseURL; + if (this.queryParams != null && this.queryParams.size() > 0) { + url += "?" + URLEncodedUtils.format(this.queryParams, StandardCharsets.UTF_8); + } + return URI.create(url); + } +} \ No newline at end of file diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/HeaderMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/utils/HeaderMetadata.java new file mode 100644 index 00000000..fac187f0 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/HeaderMetadata.java @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.lang.reflect.Field; + +class HeaderMetadata { + + String style = "simple"; + boolean explode; + String name; + + private HeaderMetadata() { + } + + // headerParam:style=simple,explode=false,name=apiID + static HeaderMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { + return Metadata.parse("header", new HeaderMetadata(), field); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/JSON.java b/src/main/java/lukehagar/plexapi/plexapi/utils/JSON.java new file mode 100644 index 00000000..610f355e --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/JSON.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import org.openapitools.jackson.nullable.JsonNullableModule; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class JSON { + public static ObjectMapper getMapper() { + return new ObjectMapper() + .registerModule(new JavaTimeModule()) + .registerModule(new Jdk8Module()) + .registerModule(new JsonNullableModule()) + .registerModule(Deserializers.STRICT_DESERIALIZERS) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES); + } +} \ No newline at end of file diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/LazySingletonValue.java b/src/main/java/lukehagar/plexapi/plexapi/utils/LazySingletonValue.java new file mode 100644 index 00000000..fbe54bb8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/LazySingletonValue.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import com.fasterxml.jackson.core.type.TypeReference; + +public final class LazySingletonValue { + + private static final Object NOT_SET = new Object(); + + private final String name; + private final String json; + private final TypeReference typeReference; + private Object value = NOT_SET; + + public LazySingletonValue(String name, String json, TypeReference typeReference) { + this.name = name; + this.json = json; + this.typeReference = typeReference; + } + + @SuppressWarnings("unchecked") + public T value() { + if (value == NOT_SET) { + value = Utils.readDefaultOrConstValue(name, json, typeReference); + } + return (T) value; + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/Metadata.java b/src/main/java/lukehagar/plexapi/plexapi/utils/Metadata.java new file mode 100644 index 00000000..59aefbf8 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/Metadata.java @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; + +final class Metadata { + + private Metadata() { + // prevent instantiation + } + + static T parse(String name, T metadata, Field field) + throws IllegalArgumentException, IllegalAccessException { + SpeakeasyMetadata md = field.getAnnotation(SpeakeasyMetadata.class); + if (md == null) { + return null; + } + + String mdValue = md.value(); + + if (mdValue == null || mdValue.isBlank()) { + return null; + } + + String[] groups = mdValue.split(" "); + + boolean handled = false; + + for (String group : groups) { + String[] parts = group.split(":"); + if (parts.length != 2) { + return null; + } + + if (!parts[0].equals(name)) { + continue; + } + + Map values = new HashMap<>(); + + String[] pairs = parts[1].split(","); + for (String pair : pairs) { + String[] keyVal = pair.split("="); + String key = keyVal[0]; + + String val = ""; + if (keyVal.length > 1) { + val = keyVal[1]; + } + + values.put(key, val); + } + + Field[] fields = metadata.getClass().getDeclaredFields(); + + for (Field f : fields) { + f.setAccessible(true); + if (values.containsKey(f.getName())) { + String val = values.get(f.getName()); + + if (f.getType().equals(boolean.class) || f.getType().equals(Boolean.class)) { + f.set(metadata, val.equals("true") || val.isBlank()); + } else { + f.set(metadata, val); + } + } + } + + handled = true; + } + + if (!handled) { + return null; + } + + return (T) metadata; + } +} \ No newline at end of file diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/MultipartFormMetadata.java b/src/main/java/lukehagar/plexapi/plexapi/utils/MultipartFormMetadata.java new file mode 100644 index 00000000..73bb1c40 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/MultipartFormMetadata.java @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.lang.reflect.Field; + +class MultipartFormMetadata { + + boolean file; + boolean content; + boolean json; + String name; + + private MultipartFormMetadata() { + } + + // multipartForm:name=file + static MultipartFormMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { + return Metadata.parse("multipartForm", new MultipartFormMetadata(), field); + } +} diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/OneOfDeserializer.java b/src/main/java/lukehagar/plexapi/plexapi/utils/OneOfDeserializer.java new file mode 100644 index 00000000..95c5af30 --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/OneOfDeserializer.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import lukehagar.plexapi.plexapi.utils.Utils.TypeReferenceWithShape; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.TreeNode; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DatabindException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + + +public class OneOfDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -1; + + private final List typeReferences; // oneOf subschemas + private final Class cls; + private final ObjectMapper mapper; + + protected OneOfDeserializer(Class cls, TypeReferenceWithShape... typeReferences) { + super(cls); + this.typeReferences= Arrays.asList(typeReferences); + this.cls = cls; + this.mapper = JSON.getMapper(); + } + + @Override + public T deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return deserializeOneOf(mapper, p, ctxt, typeReferences, cls); + } + + private static T deserializeOneOf(ObjectMapper mapper, JsonParser p, DeserializationContext ctxt, + List typeReferences, Class cls) throws IOException { + TreeNode tree = p.getCodec().readTree(p); + // TODO don't have to generate json because can use tree.traverse to get a + // parser to read value, perf advantage and can stop plugging in ObjectMapper + String json = mapper.writeValueAsString(tree); + return deserializeOneOf(mapper, json, typeReferences, cls, ctxt); + } + + private static T deserializeOneOf(ObjectMapper mapper, String json, List typeReferences, Class cls, + DeserializationContext ctxt) throws JsonProcessingException { + List> matches = new ArrayList<>(); + for (TypeReferenceWithShape c : typeReferences) { + // try to deserialize with each of the member classes + // @formatter:off + try { + JavaType jt = Utils.convertToShape(mapper.getTypeFactory(), c.typeReference(), c.shape()); + // Jackson very permissive with readValue so we will tighten things up a bit + if (matchPossible(jt, json)) { + Object o = mapper.readValue(json, jt); + o = Utils.convertToShapeInverse(o, c.shape(), jt); + @SuppressWarnings("unchecked") + TypedObject typed = TypedObject.of(o, c.shape(), (TypeReference) c.typeReference()); + T v = newInstance(cls, typed); + matches.add(new Match<>(c, v)); + } + } catch (DatabindException e) {} // NOPMD + // @formatter:on + } + matches = applyMatchPreferences(matches, json); + if (matches.size() == 1) { + return matches.get(0).value; + } else if (matches.size() > 1) { + throw JsonMappingException.from(ctxt, + "json matched more than one of the possible type references, matches are: " + typeNames(matches) + " - json=\n" + json); + } else { + throw JsonMappingException.from(ctxt, + "json did not match any of the possible type references: " + typeReferenceNames(typeReferences) + ", json=\n" + json); + } + } + + private static final class Match { + final TypeReferenceWithShape typeReference; + final T value; + + Match(TypeReferenceWithShape typeReference, T value) { + this.typeReference = typeReference; + this.value = value; + } + } + + private static final Set NUMERIC_CLASSES = Set.of( + Integer.class.getCanonicalName(), + Long.class.getCanonicalName(), + BigInteger.class.getCanonicalName(), + Float.class.getCanonicalName(), + Double.class.getCanonicalName(), + BigDecimal.class.getCanonicalName()); + + private static final Set DECIMAL_CLASSES = Set.of( + Float.class.getCanonicalName(), + Double.class.getCanonicalName(), + BigDecimal.class.getCanonicalName()); + + private static final Set INTEGER_CLASSES = Set.of( + Integer.class.getCanonicalName(), + Long.class.getCanonicalName(), + BigInteger.class.getCanonicalName()); + + private static final Set DATE_TIME_CLASSES = Set.of( + OffsetDateTime.class.getCanonicalName(), + LocalDate.class.getCanonicalName()); + + // VisibleForTesting + public static boolean matchPossible(JavaType type, String json) { + // situations we want to AVOID that can happen with Jackson ObjectMapper: + // * json numeric considered as valid for deserialization to OffsetDateTime, LocalDate + // * non-double-quoted json string considered as valid string + // * json numeric can be parsed as a Boolean + // * double-quoted numerics can be parsed as numerics + + // We make important assumptions about matching json with types + if (typeIs(type, String.class) || typeIs(type, BigIntegerString.class) || typeIs(type, BigDecimalString.class)) { + // string must be double quoted + return isDoubleQuoted(json); + } else if (typeIs(type, Boolean.class)) { + // boolean can only have false or true values + return json.equals("true") || json.equals("false"); + } else if (NUMERIC_CLASSES.contains(type.getTypeName())) { + return !json.contains("\""); + } else if (typeIs(type, OffsetDateTime.class) || typeIs(type, LocalDate.class)) { + // only json schema datetime format accepted, not epoch ms/s etc. + return isDoubleQuoted(json) && !isNumeric(json.substring(1, json.length() - 1)); + } else { + return true; + } + } + + private static boolean isDoubleQuoted(String s) { + return s.length() >=2 && s.startsWith("\"") && s.endsWith("\""); + } + + // VisibleForTesting + public static List> applyMatchPreferences(List> matches, String json) { + if (matches.size() <= 1) { + return matches; + } else if (allNumeric(matches)) { + List> decimalMatches = decimalMatches(matches); + List> integerMatches = integerMatches(matches); + if (!decimalMatches.isEmpty() && !integerMatches.isEmpty()) { + if (json.contains("e")|| json.contains(".")) { + return decimalMatches; + } else { + return integerMatches; + } + } else if (!decimalMatches.isEmpty()) { + return decimalMatches; + } else { + return integerMatches; + } + } if (allDateTime(matches)) { + if (json.contains("T")) { + return filter(matches, OffsetDateTime.class); + } else { + return filter(matches, LocalDate.class); + } + } else { + return matches; + } + } + + private static List> filter(List> matches, Class filterByClass) { + return matches // + .stream() // + .filter(x -> x.typeReference.typeReference().getType().getTypeName().equals(filterByClass.getCanonicalName())) // + .collect(Collectors.toList()); + } + + private static boolean allDateTime(List> matches) { + return matches.stream().allMatch(x -> DATE_TIME_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())); + } + + private static boolean allNumeric(List> matches) { + return matches.stream().allMatch(x -> NUMERIC_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())); + } + + private static List> decimalMatches(List> matches) { + return matches // + .stream() // + .filter(x -> DECIMAL_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())) // + .collect(Collectors.toList()); + } + + private static List> integerMatches(List> matches) { + return matches // + .stream() // + .filter(x -> INTEGER_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())) // + .collect(Collectors.toList()); + } + + private static boolean isNumeric(String s) { + try { + Double.parseDouble(s); + return true; + } catch (NumberFormatException e) { + return false; + } + } + + private static boolean typeIs(JavaType type, Class cls) { + return type.getRawClass().equals(cls); + } + + private static String typeNames(List> matches) { + return "[" + matches + .stream() + .map(x -> x.typeReference.typeReference().getType().getTypeName()) + .collect(Collectors.joining(", ")) + "]"; + } + + private static String typeReferenceNames(List list) { + return "[" + list + .stream() + .map(x -> x.typeReference().getType().getTypeName()) + .collect(Collectors.joining(", ")) + "]"; + } + + private static T newInstance(Class cls, Object parameter) { + try { + Constructor con = cls.getDeclaredConstructor(TypedObject.class); + con.setAccessible(true); + return con.newInstance(parameter); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException + | NoSuchMethodException | SecurityException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/src/main/java/lukehagar/plexapi/plexapi/utils/Options.java b/src/main/java/lukehagar/plexapi/plexapi/utils/Options.java new file mode 100644 index 00000000..1d8d1f6c --- /dev/null +++ b/src/main/java/lukehagar/plexapi/plexapi/utils/Options.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package lukehagar.plexapi.plexapi.utils; + +import java.util.Optional; +import java.util.List; +import lukehagar.plexapi.plexapi.utils.Utils; + + +public class Options { + + public enum Option { + RETRY_CONFIG; + } + + private Optional retryConfig = Optional.empty(); + + private Options(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + } + + public Optional retryConfig() { + return retryConfig; + } + + public final void validate(List