From 6b54deac029b8e089b36891131b4aaa10714d8de Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 16 Sep 2024 18:44:33 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.2 --- .speakeasy/gen.lock | 2295 +++++++++++++---- .speakeasy/gen.yaml | 2 +- CONTRIBUTING.md | 26 + README.md | 180 +- RELEASES.md | 12 +- Sources/Plexswift/Client.swift | 12 +- Sources/Plexswift/Plexswift.docc/Plexswift.md | 564 ++-- .../configuration/GlobalParameters.swift | 3 +- .../configuration/GlobalServer.swift | 5 +- .../internal/api/_ActivitiesAPI.swift | 26 +- .../internal/api/_AuthenticationAPI.swift | 125 +- .../Plexswift/internal/api/_ButlerAPI.swift | 62 +- Sources/Plexswift/internal/api/_HubsAPI.swift | 26 +- .../Plexswift/internal/api/_LibraryAPI.swift | 228 +- Sources/Plexswift/internal/api/_LogAPI.swift | 38 +- .../Plexswift/internal/api/_MediaAPI.swift | 128 +- .../internal/api/_PlaylistsAPI.swift | 110 +- Sources/Plexswift/internal/api/_PlexAPI.swift | 240 +- .../Plexswift/internal/api/_SearchAPI.swift | 38 +- .../Plexswift/internal/api/_ServerAPI.swift | 142 +- .../Plexswift/internal/api/_SessionsAPI.swift | 50 +- .../internal/api/_StatisticsAPI.swift | 38 +- .../Plexswift/internal/api/_UpdaterAPI.swift | 38 +- .../Plexswift/internal/api/_VideoAPI.swift | 26 +- .../internal/api/_WatchlistAPI.swift | 26 +- ...laylistContentsRequest+Serialization.swift | 2 +- .../ApplyUpdatesRequest+Serialization.swift | 2 +- ...=> AutoSelectSubtitle+Serialization.swift} | 4 +- ...erverActivitiesRequest+Serialization.swift | 2 +- ...CheckForUpdatesRequest+Serialization.swift | 2 +- ...laylistContentsRequest+Serialization.swift | 2 +- ...PlaylistQueryParamType+Serialization.swift | 14 + .../CreatePlaylistRequest+Serialization.swift | 2 +- ...tSubtitleAccessibility+Serialization.swift | 14 + .../DefaultSubtitleForced+Serialization.swift | 14 + .../DeleteLibraryRequest+Serialization.swift | 4 +- .../DeletePlaylistRequest+Serialization.swift | 2 +- .../models/Download+Serialization.swift | 2 +- .../models/Features+Serialization.swift | 14 + .../models/Filter+Serialization.swift | 8 +- .../internal/models/Force+Serialization.swift | 2 +- ...widthStatisticsRequest+Serialization.swift | 2 +- .../GetBannerImageRequest+Serialization.swift | 41 + .../GetFileHashRequest+Serialization.swift | 2 +- .../GetGlobalHubsRequest+Serialization.swift | 2 +- ...LibraryDetailsRequest+Serialization.swift} | 12 +- .../GetLibraryHubsRequest+Serialization.swift | 2 +- ...GetLibraryItemsRequest+Serialization.swift | 8 +- ...tMediaProvidersRequest+Serialization.swift | 27 + ...ataByRatingKeyRequest+Serialization.swift} | 10 +- ...etadataChildrenRequest+Serialization.swift | 2 +- .../models/GetPinRequest+Serialization.swift | 17 +- ...ContentsQueryParamType+Serialization.swift | 14 + ...laylistContentsRequest+Serialization.swift | 4 +- .../GetPlaylistRequest+Serialization.swift | 2 +- .../GetPlaylistsRequest+Serialization.swift | 2 +- ...etRecentlyAddedRequest+Serialization.swift | 28 + ...LibraryMetadataRequest+Serialization.swift | 37 + ...GetResizedPhotoRequest+Serialization.swift | 2 +- ...urcesStatisticsRequest+Serialization.swift | 2 +- ...tSearchLibraryRequest+Serialization.swift} | 12 +- ...etSearchResultsRequest+Serialization.swift | 2 +- ...ServerResourcesRequest+Serialization.swift | 30 + ...tSessionHistoryRequest+Serialization.swift | 2 +- ...tionInformationRequest+Serialization.swift | 2 +- .../GetStatisticsRequest+Serialization.swift | 2 +- .../GetThumbImageRequest+Serialization.swift | 41 + .../GetTimelineRequest+Serialization.swift | 2 +- ...GetTokenByPinIdRequest+Serialization.swift | 37 + ...ticationResponseStatus+Serialization.swift | 14 + ...lsAuthenticationStatus+Serialization.swift | 14 + ...etTokenDetailsFeatures+Serialization.swift | 14 + .../GetTokenDetailsStatus+Serialization.swift | 14 + .../GetTokenRequest+Serialization.swift | 33 - ...dContentQueryParamType+Serialization.swift | 14 + ...pWatchedContentRequest+Serialization.swift | 2 +- ...entTokenQueryParamType+Serialization.swift | 2 +- ...tTransientTokenRequest+Serialization.swift | 2 +- ...> GetWatchListRequest+Serialization.swift} | 10 +- .../IncludeCollections+Serialization.swift | 2 +- .../models/IncludeDetails+Serialization.swift | 2 +- .../IncludeExternalMedia+Serialization.swift | 2 +- .../models/IncludeGuids+Serialization.swift | 14 + .../models/IncludeHttps+Serialization.swift | 14 + .../models/IncludeIPv6+Serialization.swift | 14 + .../models/IncludeMeta+Serialization.swift | 14 + .../models/IncludeRelay+Serialization.swift | 14 + .../InternalPaymentMethod+Serialization.swift | 10 + .../internal/models/Level+Serialization.swift | 2 +- .../LibrarySectionID+Serialization.swift | 2 +- .../models/Libtype+Serialization.swift | 2 +- .../models/LogLineRequest+Serialization.swift | 2 +- .../MailingListStatus+Serialization.swift | 14 + .../MarkPlayedRequest+Serialization.swift | 2 +- .../MarkUnplayedRequest+Serialization.swift | 2 +- ...MediaReviewsVisibility+Serialization.swift | 14 + .../models/MinSize+Serialization.swift | 2 +- .../models/OnlyTransient+Serialization.swift | 2 +- .../PathParamTaskName+Serialization.swift | 2 +- .../PerformSearchRequest+Serialization.swift | 2 +- ...formVoiceSearchRequest+Serialization.swift | 2 +- .../models/PlaylistType+Serialization.swift | 2 +- ...AuthenticationFeatures+Serialization.swift | 14 + ...ticationResponseStatus+Serialization.swift | 14 + ...taAuthenticationStatus+Serialization.swift | 14 + ...DataAutoSelectSubtitle+Serialization.swift | 14 + ...tSubtitleAccessibility+Serialization.swift | 14 + ...aDefaultSubtitleForced+Serialization.swift | 14 + ...sersSignInDataFeatures+Serialization.swift | 14 + ...nDataMailingListStatus+Serialization.swift | 14 + ...MediaReviewsVisibility+Serialization.swift | 14 + ...UsersSignInDataRequest+Serialization.swift | 27 + ...sSignInDataRequestBody+Serialization.swift | 26 + ...stUsersSignInDataState+Serialization.swift | 14 + ...tUsersSignInDataStatus+Serialization.swift | 14 + ...InDataWatchedIndicator+Serialization.swift | 14 + .../QueryParamFilter+Serialization.swift | 10 + .../QueryParamForce+Serialization.swift | 14 + ...ueryParamOnlyTransient+Serialization.swift | 2 +- .../QueryParamSmart+Serialization.swift | 2 +- .../models/QueryParamType+Serialization.swift | 2 +- .../RefreshLibraryRequest+Serialization.swift | 23 - .../internal/models/Scope+Serialization.swift | 2 +- .../models/Security+Serialization.swift | 2 +- .../models/SharedServers+Serialization.swift | 10 + .../models/SharedSources+Serialization.swift | 10 + .../internal/models/Skip+Serialization.swift | 2 +- .../internal/models/Smart+Serialization.swift | 2 +- .../StartTaskRequest+Serialization.swift | 2 +- ...versalTranscodeRequest+Serialization.swift | 2 +- .../internal/models/State+Serialization.swift | 2 +- .../models/Status+Serialization.swift | 14 + .../StopTaskRequest+Serialization.swift | 2 +- ...ranscodeSessionRequest+Serialization.swift | 2 +- .../internal/models/Tag+Serialization.swift | 2 +- .../models/TaskName+Serialization.swift | 2 +- .../models/Tonight+Serialization.swift | 2 +- .../models/Trials+Serialization.swift | 10 + .../models/TypeModel+Serialization.swift | 2 +- ...atePlayProgressRequest+Serialization.swift | 2 +- .../UpdatePlaylistRequest+Serialization.swift | 2 +- .../UploadPlaylistRequest+Serialization.swift | 2 +- .../models/Upscale+Serialization.swift | 2 +- .../WatchedIndicator+Serialization.swift | 14 + Sources/Plexswift/models/ModelScopes.swift | 2 +- .../Plexswift/models/operations/Account.swift | 5 +- .../models/operations/Activity.swift | 5 +- .../AddPlaylistContentsBadRequest.swift | 23 + .../AddPlaylistContentsErrors.swift | 43 +- .../AddPlaylistContentsMediaContainer.swift | 5 +- .../AddPlaylistContentsMetadata.swift | 5 +- .../AddPlaylistContentsPlaylistsErrors.swift | 29 + ...laylistContentsPlaylistsResponseBody.swift | 24 - .../AddPlaylistContentsRequest.swift | 5 +- .../AddPlaylistContentsResponse.swift | 25 +- .../AddPlaylistContentsResponseBody.swift | 5 +- .../AddPlaylistContentsUnauthorized.swift | 23 + .../operations/ApplyUpdatesBadRequest.swift | 23 + .../operations/ApplyUpdatesErrors.swift | 43 +- .../operations/ApplyUpdatesRequest.swift | 9 +- .../operations/ApplyUpdatesResponse.swift | 19 +- ...y.swift => ApplyUpdatesUnauthorized.swift} | 13 +- .../ApplyUpdatesUpdaterErrors.swift | 29 + .../operations/AutoSelectSubtitle.swift | 10 + .../Plexswift/models/operations/Billing.swift | 26 + .../models/operations/ButlerTask.swift | 5 +- .../models/operations/ButlerTasks.swift | 5 +- ...ncelServerActivitiesActivitiesErrors.swift | 29 + .../CancelServerActivitiesBadRequest.swift | 23 + .../CancelServerActivitiesErrors.swift | 43 +- .../CancelServerActivitiesRequest.swift | 5 +- .../CancelServerActivitiesResponse.swift | 19 +- .../CancelServerActivitiesUnauthorized.swift | 23 + .../CheckForUpdatesBadRequest.swift | 23 + .../operations/CheckForUpdatesErrors.swift | 43 +- .../operations/CheckForUpdatesRequest.swift | 5 +- .../operations/CheckForUpdatesResponse.swift | 19 +- ...wift => CheckForUpdatesUnauthorized.swift} | 13 +- .../CheckForUpdatesUpdaterErrors.swift | 29 + .../ClearPlaylistContentsBadRequest.swift | 23 + .../ClearPlaylistContentsErrors.swift | 43 +- ...ClearPlaylistContentsPlaylistsErrors.swift | 29 + .../ClearPlaylistContentsRequest.swift | 5 +- .../ClearPlaylistContentsResponse.swift | 19 +- .../ClearPlaylistContentsUnauthorized.swift | 23 + .../models/operations/Connections.swift | 69 + .../Plexswift/models/operations/Context.swift | 5 +- .../Plexswift/models/operations/Country.swift | 5 +- .../operations/CreatePlaylistBadRequest.swift | 23 + .../operations/CreatePlaylistErrors.swift | 43 +- .../CreatePlaylistMediaContainer.swift | 5 +- .../operations/CreatePlaylistMetadata.swift | 5 +- .../CreatePlaylistPlaylistsErrors.swift | 29 + .../CreatePlaylistPlaylistsResponseBody.swift | 24 - .../CreatePlaylistQueryParamType.swift | 11 + .../operations/CreatePlaylistRequest.swift | 9 +- .../operations/CreatePlaylistResponse.swift | 25 +- .../CreatePlaylistResponseBody.swift | 5 +- ...swift => CreatePlaylistUnauthorized.swift} | 13 +- .../DefaultSubtitleAccessibility.swift | 10 + .../operations/DefaultSubtitleForced.swift | 10 + .../operations/DeleteLibraryBadRequest.swift | 23 + .../operations/DeleteLibraryErrors.swift | 43 +- .../DeleteLibraryLibraryErrors.swift | 29 + .../operations/DeleteLibraryRequest.swift | 25 +- .../operations/DeleteLibraryResponse.swift | 19 +- ....swift => DeleteLibraryUnauthorized.swift} | 13 +- .../operations/DeletePlaylistBadRequest.swift | 23 + .../operations/DeletePlaylistErrors.swift | 43 +- .../DeletePlaylistPlaylistsErrors.swift | 29 + .../operations/DeletePlaylistRequest.swift | 5 +- .../operations/DeletePlaylistResponse.swift | 19 +- .../DeletePlaylistUnauthorized.swift | 23 + .../Plexswift/models/operations/Device.swift | 5 +- .../models/operations/Director.swift | 5 +- .../models/operations/Directory.swift | 5 +- .../models/operations/Download.swift | 5 +- .../EnablePaperTrailBadRequest.swift | 23 + .../operations/EnablePaperTrailErrors.swift | 43 +- .../EnablePaperTrailLogErrors.swift | 29 + .../operations/EnablePaperTrailResponse.swift | 19 +- ...ift => EnablePaperTrailUnauthorized.swift} | 13 +- .../Plexswift/models/operations/Errors.swift | 43 +- .../Plexswift/models/operations/Feature.swift | 29 + .../models/operations/Features.swift | 66 + .../Plexswift/models/operations/Field.swift | 5 +- .../models/operations/FieldType.swift | 5 +- .../Plexswift/models/operations/Filter.swift | 24 +- .../Plexswift/models/operations/Force.swift | 11 +- .../Plexswift/models/operations/Friend.swift | 76 + .../Plexswift/models/operations/Genre.swift | 5 +- .../Plexswift/models/operations/GeoData.swift | 75 + .../GetAllLibrariesBadRequest.swift | 23 + ...y.swift => GetAllLibrariesDirectory.swift} | 19 +- .../operations/GetAllLibrariesErrors.swift | 29 + .../GetAllLibrariesLibraryErrors.swift | 29 + .../GetAllLibrariesMediaContainer.swift | 32 + .../operations/GetAllLibrariesResponse.swift | 41 + .../GetAllLibrariesResponseBody.swift | 23 + ...wift => GetAllLibrariesUnauthorized.swift} | 13 +- .../GetAvailableClientsBadRequest.swift | 23 + .../GetAvailableClientsErrors.swift | 43 +- .../GetAvailableClientsMediaContainer.swift | 5 +- .../GetAvailableClientsResponse.swift | 25 +- .../GetAvailableClientsResponseBody.swift | 5 +- .../GetAvailableClientsServerErrors.swift | 29 + .../GetAvailableClientsUnauthorized.swift | 23 + .../GetBandwidthStatisticsAccount.swift | 5 +- .../GetBandwidthStatisticsBadRequest.swift | 23 + .../GetBandwidthStatisticsDevice.swift | 5 +- .../GetBandwidthStatisticsErrors.swift | 43 +- ...GetBandwidthStatisticsMediaContainer.swift | 5 +- .../GetBandwidthStatisticsRequest.swift | 5 +- .../GetBandwidthStatisticsResponse.swift | 25 +- .../GetBandwidthStatisticsResponseBody.swift | 5 +- ...tBandwidthStatisticsStatisticsErrors.swift | 29 + .../GetBandwidthStatisticsUnauthorized.swift | 23 + .../operations/GetBannerImageBadRequest.swift | 23 + .../operations/GetBannerImageErrors.swift | 29 + .../GetBannerImageMediaErrors.swift | 29 + .../operations/GetBannerImageRequest.swift | 30 + .../operations/GetBannerImageResponse.swift | 41 + .../GetBannerImageUnauthorized.swift | 23 + .../operations/GetButlerTasksBadRequest.swift | 23 + .../GetButlerTasksButlerErrors.swift | 29 + .../GetButlerTasksButlerResponseBody.swift | 24 - .../operations/GetButlerTasksErrors.swift | 43 +- .../operations/GetButlerTasksResponse.swift | 25 +- .../GetButlerTasksResponseBody.swift | 5 +- ...swift => GetButlerTasksUnauthorized.swift} | 13 +- .../GetCompanionsDataBadRequest.swift | 23 + .../operations/GetCompanionsDataErrors.swift | 29 + .../GetCompanionsDataPlexErrors.swift | 29 + .../GetCompanionsDataResponse.swift | 41 + .../GetCompanionsDataUnauthorized.swift | 23 + .../operations/GetDevicesBadRequest.swift | 23 + .../models/operations/GetDevicesErrors.swift | 43 +- .../operations/GetDevicesMediaContainer.swift | 5 +- .../operations/GetDevicesResponse.swift | 25 +- .../operations/GetDevicesResponseBody.swift | 5 +- .../operations/GetDevicesServerErrors.swift | 29 + ...ody.swift => GetDevicesUnauthorized.swift} | 13 +- .../operations/GetFileHashBadRequest.swift | 23 + .../models/operations/GetFileHashErrors.swift | 43 +- .../operations/GetFileHashLibraryErrors.swift | 29 + .../operations/GetFileHashRequest.swift | 5 +- .../operations/GetFileHashResponse.swift | 19 +- ...dy.swift => GetFileHashUnauthorized.swift} | 13 +- .../operations/GetGeoDataBadRequest.swift | 23 + .../models/operations/GetGeoDataErrors.swift | 29 + .../models/operations/GetGeoDataGeoData.swift | 75 + .../operations/GetGeoDataPlexErrors.swift | 29 + .../operations/GetGeoDataResponse.swift | 41 + ...ody.swift => GetGeoDataUnauthorized.swift} | 13 +- .../operations/GetGlobalHubsBadRequest.swift | 23 + .../operations/GetGlobalHubsErrors.swift | 43 +- .../operations/GetGlobalHubsHubsErrors.swift | 29 + .../GetGlobalHubsHubsResponseBody.swift | 24 - .../GetGlobalHubsMediaContainer.swift | 5 +- .../operations/GetGlobalHubsMetadata.swift | 5 +- .../operations/GetGlobalHubsRequest.swift | 5 +- .../operations/GetGlobalHubsResponse.swift | 25 +- .../GetGlobalHubsResponseBody.swift | 5 +- ....swift => GetGlobalHubsUnauthorized.swift} | 13 +- .../operations/GetHomeDataBadRequest.swift | 23 + .../models/operations/GetHomeDataErrors.swift | 43 +- .../operations/GetHomeDataPlexErrors.swift | 29 + .../GetHomeDataPlexResponseBody.swift | 24 - .../operations/GetHomeDataResponse.swift | 25 +- .../operations/GetHomeDataResponseBody.swift | 5 +- ...dy.swift => GetHomeDataUnauthorized.swift} | 13 +- .../operations/GetLibrariesErrors.swift | 58 - .../GetLibrariesLibraryResponseBody.swift | 24 - .../operations/GetLibrariesLocation.swift | 27 - .../GetLibrariesMediaContainer.swift | 33 - .../operations/GetLibrariesResponse.swift | 34 - .../operations/GetLibrariesResponseBody.swift | 24 - .../GetLibraryDetailsBadRequest.swift | 23 + ...swift => GetLibraryDetailsDirectory.swift} | 9 +- .../operations/GetLibraryDetailsErrors.swift | 29 + ...er.swift => GetLibraryDetailsFilter.swift} | 9 +- .../GetLibraryDetailsLibraryErrors.swift | 29 + ... => GetLibraryDetailsMediaContainer.swift} | 15 +- ...t.swift => GetLibraryDetailsRequest.swift} | 27 +- .../GetLibraryDetailsResponse.swift | 41 + .../GetLibraryDetailsResponseBody.swift | 23 + ...Type.swift => GetLibraryDetailsType.swift} | 13 +- .../GetLibraryDetailsUnauthorized.swift | 23 + .../models/operations/GetLibraryErrors.swift | 58 - .../operations/GetLibraryHubsBadRequest.swift | 23 + .../operations/GetLibraryHubsCountry.swift | 5 +- .../operations/GetLibraryHubsDirector.swift | 5 +- .../operations/GetLibraryHubsErrors.swift | 43 +- .../operations/GetLibraryHubsGenre.swift | 5 +- .../models/operations/GetLibraryHubsHub.swift | 5 +- .../operations/GetLibraryHubsHubsErrors.swift | 29 + .../GetLibraryHubsHubsResponseBody.swift | 24 - .../operations/GetLibraryHubsMedia.swift | 5 +- .../GetLibraryHubsMediaContainer.swift | 5 +- .../operations/GetLibraryHubsMetadata.swift | 5 +- .../operations/GetLibraryHubsPart.swift | 5 +- .../operations/GetLibraryHubsRequest.swift | 5 +- .../operations/GetLibraryHubsResponse.swift | 25 +- .../GetLibraryHubsResponseBody.swift | 5 +- .../operations/GetLibraryHubsRole.swift | 5 +- ...swift => GetLibraryHubsUnauthorized.swift} | 13 +- .../operations/GetLibraryHubsWriter.swift | 5 +- .../GetLibraryItemsBadRequest.swift | 23 + .../operations/GetLibraryItemsCountry.swift | 5 +- .../operations/GetLibraryItemsDirector.swift | 5 +- .../operations/GetLibraryItemsErrors.swift | 43 +- .../operations/GetLibraryItemsGenre.swift | 5 +- .../GetLibraryItemsLibraryErrors.swift | 29 + .../GetLibraryItemsLibraryResponseBody.swift | 24 - .../operations/GetLibraryItemsMedia.swift | 5 +- .../GetLibraryItemsMediaContainer.swift | 5 +- .../operations/GetLibraryItemsMetadata.swift | 5 +- .../operations/GetLibraryItemsPart.swift | 5 +- .../operations/GetLibraryItemsRequest.swift | 63 +- .../operations/GetLibraryItemsResponse.swift | 25 +- .../GetLibraryItemsResponseBody.swift | 5 +- .../operations/GetLibraryItemsRole.swift | 5 +- ...wift => GetLibraryItemsUnauthorized.swift} | 13 +- .../operations/GetLibraryItemsWriter.swift | 5 +- .../GetLibraryLibraryResponseBody.swift | 24 - .../operations/GetLibraryResponse.swift | 34 - .../operations/GetLibraryResponseBody.swift | 24 - .../GetMediaProvidersBadRequest.swift | 23 + .../GetMediaProvidersDirectory.swift | 62 + .../operations/GetMediaProvidersErrors.swift | 29 + .../GetMediaProvidersMediaContainer.swift | 152 ++ .../operations/GetMediaProvidersRequest.swift | 18 + .../GetMediaProvidersResponse.swift | 41 + .../GetMediaProvidersResponseBody.swift | 23 + .../GetMediaProvidersServerErrors.swift | 29 + .../GetMediaProvidersUnauthorized.swift | 23 + .../GetMetaDataByRatingKeyBadRequest.swift | 23 + ...ft => GetMetaDataByRatingKeyCountry.swift} | 9 +- ...t => GetMetaDataByRatingKeyDirector.swift} | 9 +- .../GetMetaDataByRatingKeyErrors.swift | 29 + ...wift => GetMetaDataByRatingKeyGenre.swift} | 9 +- .../GetMetaDataByRatingKeyLibraryErrors.swift | 29 + ...wift => GetMetaDataByRatingKeyMedia.swift} | 17 +- ...etMetaDataByRatingKeyMediaContainer.swift} | 13 +- ...t => GetMetaDataByRatingKeyMetadata.swift} | 37 +- ...swift => GetMetaDataByRatingKeyPart.swift} | 9 +- .../GetMetaDataByRatingKeyRequest.swift | 18 + .../GetMetaDataByRatingKeyResponse.swift | 41 + .../GetMetaDataByRatingKeyResponseBody.swift | 23 + ...swift => GetMetaDataByRatingKeyRole.swift} | 9 +- .../GetMetaDataByRatingKeyUnauthorized.swift | 23 + ...ift => GetMetaDataByRatingKeyWriter.swift} | 9 +- .../GetMetadataChildrenBadRequest.swift | 23 + .../GetMetadataChildrenDirectory.swift | 5 +- .../GetMetadataChildrenErrors.swift | 43 +- .../GetMetadataChildrenLibraryErrors.swift | 29 + .../GetMetadataChildrenMediaContainer.swift | 5 +- .../GetMetadataChildrenMetadata.swift | 5 +- .../GetMetadataChildrenRequest.swift | 5 +- .../GetMetadataChildrenResponse.swift | 25 +- .../GetMetadataChildrenResponseBody.swift | 5 +- .../GetMetadataChildrenUnauthorized.swift | 23 + .../models/operations/GetMetadataErrors.swift | 58 - .../GetMetadataLibraryResponseBody.swift | 24 - .../operations/GetMetadataRequest.swift | 25 - .../operations/GetMetadataResponse.swift | 34 - .../operations/GetMetadataResponseBody.swift | 24 - .../GetMyPlexAccountBadRequest.swift | 23 + .../operations/GetMyPlexAccountErrors.swift | 43 +- .../operations/GetMyPlexAccountResponse.swift | 25 +- .../GetMyPlexAccountResponseBody.swift | 5 +- .../GetMyPlexAccountServerErrors.swift | 29 + .../GetMyPlexAccountServerResponseBody.swift | 24 - .../GetMyPlexAccountUnauthorized.swift | 23 + .../operations/GetOnDeckBadRequest.swift | 23 + .../models/operations/GetOnDeckErrors.swift | 43 +- .../models/operations/GetOnDeckGuids.swift | 5 +- .../operations/GetOnDeckLibraryErrors.swift | 29 + .../models/operations/GetOnDeckMedia.swift | 5 +- .../operations/GetOnDeckMediaContainer.swift | 5 +- .../models/operations/GetOnDeckMetadata.swift | 5 +- .../models/operations/GetOnDeckPart.swift | 5 +- .../models/operations/GetOnDeckResponse.swift | 25 +- .../operations/GetOnDeckResponseBody.swift | 5 +- .../models/operations/GetOnDeckStream.swift | 5 +- ...Body.swift => GetOnDeckUnauthorized.swift} | 13 +- .../operations/GetPinAuthPinContainer.swift | 104 + .../models/operations/GetPinBadRequest.swift | 23 + .../models/operations/GetPinErrors.swift | 43 +- .../operations/GetPinPlexResponseBody.swift | 24 - .../models/operations/GetPinRequest.swift | 15 +- .../models/operations/GetPinResponse.swift | 17 +- .../operations/GetPinResponseBody.swift | 125 - .../operations/GetPlaylistBadRequest.swift | 23 + .../GetPlaylistContentsBadRequest.swift | 23 + .../GetPlaylistContentsCountry.swift | 5 +- .../GetPlaylistContentsDirector.swift | 5 +- .../GetPlaylistContentsErrors.swift | 43 +- .../operations/GetPlaylistContentsGenre.swift | 5 +- .../operations/GetPlaylistContentsMedia.swift | 5 +- .../GetPlaylistContentsMediaContainer.swift | 5 +- .../GetPlaylistContentsMetadata.swift | 5 +- .../operations/GetPlaylistContentsPart.swift | 5 +- .../GetPlaylistContentsPlaylistsErrors.swift | 29 + ...laylistContentsPlaylistsResponseBody.swift | 24 - .../GetPlaylistContentsQueryParamType.swift | 18 + .../GetPlaylistContentsRequest.swift | 31 +- .../GetPlaylistContentsResponse.swift | 25 +- .../GetPlaylistContentsResponseBody.swift | 5 +- .../operations/GetPlaylistContentsRole.swift | 5 +- .../GetPlaylistContentsUnauthorized.swift | 23 + .../GetPlaylistContentsWriter.swift | 5 +- .../models/operations/GetPlaylistErrors.swift | 43 +- .../GetPlaylistMediaContainer.swift | 5 +- .../operations/GetPlaylistMetadata.swift | 5 +- .../GetPlaylistPlaylistsErrors.swift | 29 + .../GetPlaylistPlaylistsResponseBody.swift | 24 - .../operations/GetPlaylistRequest.swift | 5 +- .../operations/GetPlaylistResponse.swift | 25 +- .../operations/GetPlaylistResponseBody.swift | 5 +- .../operations/GetPlaylistUnauthorized.swift | 23 + .../operations/GetPlaylistsBadRequest.swift | 23 + .../operations/GetPlaylistsErrors.swift | 43 +- .../GetPlaylistsMediaContainer.swift | 5 +- .../operations/GetPlaylistsMetadata.swift | 5 +- .../GetPlaylistsPlaylistsErrors.swift | 29 + .../GetPlaylistsPlaylistsResponseBody.swift | 24 - .../operations/GetPlaylistsRequest.swift | 5 +- .../operations/GetPlaylistsResponse.swift | 25 +- .../operations/GetPlaylistsResponseBody.swift | 5 +- .../operations/GetPlaylistsUnauthorized.swift | 23 + .../GetRecentlyAddedBadRequest.swift | 23 + .../operations/GetRecentlyAddedErrors.swift | 43 +- .../GetRecentlyAddedLibraryErrors.swift | 29 + .../GetRecentlyAddedLibraryResponseBody.swift | 24 - .../GetRecentlyAddedMediaContainer.swift | 5 +- .../operations/GetRecentlyAddedMetadata.swift | 5 +- .../operations/GetRecentlyAddedRequest.swift | 34 + .../operations/GetRecentlyAddedResponse.swift | 25 +- .../GetRecentlyAddedResponseBody.swift | 5 +- .../GetRecentlyAddedUnauthorized.swift | 23 + .../GetRefreshLibraryMetadataBadRequest.swift | 23 + .../GetRefreshLibraryMetadataErrors.swift | 29 + ...tRefreshLibraryMetadataLibraryErrors.swift | 29 + .../GetRefreshLibraryMetadataRequest.swift | 26 + .../GetRefreshLibraryMetadataResponse.swift | 33 + ...etRefreshLibraryMetadataUnauthorized.swift | 23 + .../GetResizedPhotoBadRequest.swift | 23 + .../operations/GetResizedPhotoErrors.swift | 43 +- .../operations/GetResizedPhotoRequest.swift | 5 +- .../operations/GetResizedPhotoResponse.swift | 19 +- .../GetResizedPhotoServerErrors.swift | 29 + .../GetResizedPhotoUnauthorized.swift | 23 + .../GetResourcesStatisticsBadRequest.swift | 23 + .../GetResourcesStatisticsErrors.swift | 43 +- ...GetResourcesStatisticsMediaContainer.swift | 5 +- .../GetResourcesStatisticsRequest.swift | 5 +- .../GetResourcesStatisticsResponse.swift | 25 +- .../GetResourcesStatisticsResponseBody.swift | 5 +- ...tResourcesStatisticsStatisticsErrors.swift | 29 + .../GetResourcesStatisticsUnauthorized.swift | 23 + .../GetSearchLibraryBadRequest.swift | 23 + .../operations/GetSearchLibraryErrors.swift | 29 + .../GetSearchLibraryLibraryErrors.swift | 29 + ...t => GetSearchLibraryMediaContainer.swift} | 13 +- ...a.swift => GetSearchLibraryMetadata.swift} | 9 +- .../operations/GetSearchLibraryRequest.swift | 38 + .../operations/GetSearchLibraryResponse.swift | 41 + .../GetSearchLibraryResponseBody.swift | 23 + .../GetSearchLibraryUnauthorized.swift | 23 + .../GetSearchResultsBadRequest.swift | 23 + .../operations/GetSearchResultsCountry.swift | 5 +- .../operations/GetSearchResultsDirector.swift | 5 +- .../operations/GetSearchResultsErrors.swift | 43 +- .../operations/GetSearchResultsGenre.swift | 5 +- .../operations/GetSearchResultsMedia.swift | 5 +- .../GetSearchResultsMediaContainer.swift | 5 +- .../operations/GetSearchResultsMetadata.swift | 5 +- .../operations/GetSearchResultsPart.swift | 5 +- .../operations/GetSearchResultsRequest.swift | 5 +- .../operations/GetSearchResultsResponse.swift | 25 +- .../GetSearchResultsResponseBody.swift | 5 +- .../operations/GetSearchResultsRole.swift | 5 +- .../GetSearchResultsSearchErrors.swift | 29 + .../GetSearchResultsSearchResponseBody.swift | 24 - .../GetSearchResultsUnauthorized.swift | 23 + .../operations/GetSearchResultsWriter.swift | 5 +- .../GetServerActivitiesActivitiesErrors.swift | 29 + ...rverActivitiesActivitiesResponseBody.swift | 24 - .../GetServerActivitiesBadRequest.swift | 23 + .../GetServerActivitiesErrors.swift | 43 +- .../GetServerActivitiesMediaContainer.swift | 5 +- .../GetServerActivitiesResponse.swift | 25 +- .../GetServerActivitiesResponseBody.swift | 5 +- .../GetServerActivitiesUnauthorized.swift | 23 + .../GetServerCapabilitiesBadRequest.swift | 23 + .../GetServerCapabilitiesErrors.swift | 29 + .../GetServerCapabilitiesResponse.swift | 25 +- .../GetServerCapabilitiesResponseBody.swift | 5 +- ...ServerCapabilitiesServerResponseBody.swift | 24 - ...> GetServerCapabilitiesUnauthorized.swift} | 13 +- .../operations/GetServerIdentityErrors.swift | 58 - .../GetServerIdentityMediaContainer.swift | 5 +- .../GetServerIdentityRequestTimeout.swift | 26 + .../GetServerIdentityResponse.swift | 17 +- .../GetServerIdentityResponseBody.swift | 5 +- .../GetServerIdentityServerResponseBody.swift | 24 - .../operations/GetServerListBadRequest.swift | 23 + .../operations/GetServerListErrors.swift | 43 +- .../GetServerListMediaContainer.swift | 5 +- .../operations/GetServerListResponse.swift | 25 +- .../GetServerListResponseBody.swift | 5 +- .../operations/GetServerListServer.swift | 5 +- .../GetServerListServerErrors.swift | 29 + .../GetServerListServerResponseBody.swift | 24 - .../GetServerListUnauthorized.swift | 23 + .../GetServerPreferencesBadRequest.swift | 23 + .../GetServerPreferencesErrors.swift | 43 +- .../GetServerPreferencesMediaContainer.swift | 5 +- .../GetServerPreferencesResponse.swift | 25 +- .../GetServerPreferencesResponseBody.swift | 5 +- .../GetServerPreferencesServerErrors.swift | 29 + .../GetServerPreferencesUnauthorized.swift | 23 + .../GetServerResourcesBadRequest.swift | 23 + .../operations/GetServerResourcesErrors.swift | 29 + .../GetServerResourcesPlexErrors.swift | 29 + .../GetServerResourcesRequest.swift | 40 + .../GetServerResourcesResponse.swift | 41 + .../GetServerResourcesUnauthorized.swift | 23 + .../GetSessionHistoryBadRequest.swift | 23 + .../operations/GetSessionHistoryErrors.swift | 43 +- .../GetSessionHistoryMediaContainer.swift | 5 +- .../GetSessionHistoryMetadata.swift | 5 +- .../operations/GetSessionHistoryRequest.swift | 9 +- .../GetSessionHistoryResponse.swift | 25 +- .../GetSessionHistoryResponseBody.swift | 5 +- .../GetSessionHistorySessionsErrors.swift | 29 + ...etSessionHistorySessionsResponseBody.swift | 24 - .../GetSessionHistoryUnauthorized.swift | 23 + .../operations/GetSessionsBadRequest.swift | 23 + .../models/operations/GetSessionsErrors.swift | 43 +- .../models/operations/GetSessionsMedia.swift | 5 +- .../GetSessionsMediaContainer.swift | 5 +- .../operations/GetSessionsMetadata.swift | 5 +- .../models/operations/GetSessionsPart.swift | 5 +- .../operations/GetSessionsResponse.swift | 25 +- .../operations/GetSessionsResponseBody.swift | 5 +- .../GetSessionsSessionsErrors.swift | 29 + .../GetSessionsSessionsResponseBody.swift | 24 - .../models/operations/GetSessionsStream.swift | 5 +- ...dy.swift => GetSessionsUnauthorized.swift} | 13 +- .../models/operations/GetSessionsUser.swift | 5 +- ...ctionInformationAuthenticationErrors.swift | 29 + ...ourceConnectionInformationBadRequest.swift | 23 + ...GetSourceConnectionInformationErrors.swift | 43 +- ...etSourceConnectionInformationRequest.swift | 5 +- ...tSourceConnectionInformationResponse.swift | 19 +- ...ceConnectionInformationUnauthorized.swift} | 13 +- .../operations/GetStatisticsBadRequest.swift | 23 + .../operations/GetStatisticsDevice.swift | 5 +- .../operations/GetStatisticsErrors.swift | 43 +- .../GetStatisticsMediaContainer.swift | 5 +- .../operations/GetStatisticsRequest.swift | 5 +- .../operations/GetStatisticsResponse.swift | 25 +- .../GetStatisticsResponseBody.swift | 5 +- .../GetStatisticsStatisticsErrors.swift | 29 + .../GetStatisticsStatisticsResponseBody.swift | 24 - .../GetStatisticsUnauthorized.swift | 23 + .../operations/GetThumbImageBadRequest.swift | 23 + .../operations/GetThumbImageErrors.swift | 29 + .../operations/GetThumbImageMediaErrors.swift | 29 + .../operations/GetThumbImageRequest.swift | 30 + .../operations/GetThumbImageResponse.swift | 41 + .../GetThumbImageUnauthorized.swift | 23 + .../operations/GetTimelineBadRequest.swift | 23 + .../models/operations/GetTimelineErrors.swift | 43 +- .../operations/GetTimelineRequest.swift | 5 +- .../operations/GetTimelineResponse.swift | 19 +- ...dy.swift => GetTimelineUnauthorized.swift} | 13 +- .../operations/GetTimelineVideoErrors.swift | 29 + .../GetTokenByPinIdAuthPinContainer.swift | 104 + .../GetTokenByPinIdBadRequest.swift | 23 + .../operations/GetTokenByPinIdErrors.swift | 29 + .../operations/GetTokenByPinIdGeoData.swift | 75 + .../GetTokenByPinIdPlexErrors.swift | 26 + ...est.swift => GetTokenByPinIdRequest.swift} | 11 +- .../operations/GetTokenByPinIdResponse.swift | 41 + .../GetTokenByPinIdResponseBody.swift | 23 + .../GetTokenDetailsAuthenticationErrors.swift | 29 + ...nDetailsAuthenticationResponseStatus.swift | 10 + .../GetTokenDetailsAuthenticationStatus.swift | 10 + .../GetTokenDetailsBadRequest.swift | 23 + .../operations/GetTokenDetailsErrors.swift | 29 + .../operations/GetTokenDetailsFeatures.swift | 66 + .../operations/GetTokenDetailsResponse.swift | 41 + .../operations/GetTokenDetailsStatus.swift | 9 + .../GetTokenDetailsSubscription.swift | 50 + .../GetTokenDetailsUnauthorized.swift | 23 + .../GetTokenDetailsUserPlexAccount.swift | 314 +++ .../models/operations/GetTokenErrors.swift | 58 - .../models/operations/GetTokenLocation.swift | 51 - .../operations/GetTokenPlexResponseBody.swift | 24 - .../models/operations/GetTokenResponse.swift | 34 - .../operations/GetTokenResponseBody.swift | 125 - .../GetTopWatchedContentBadRequest.swift | 23 + .../GetTopWatchedContentCountry.swift | 5 +- .../GetTopWatchedContentErrors.swift | 29 + .../GetTopWatchedContentGenre.swift | 5 +- .../GetTopWatchedContentGuids.swift | 5 +- .../GetTopWatchedContentLibraryErrors.swift | 29 + .../GetTopWatchedContentMediaContainer.swift | 5 +- .../GetTopWatchedContentMetadata.swift | 5 +- .../GetTopWatchedContentQueryParamType.swift | 18 + .../GetTopWatchedContentRequest.swift | 25 +- .../GetTopWatchedContentResponse.swift | 21 +- .../GetTopWatchedContentResponseBody.swift | 5 +- .../operations/GetTopWatchedContentRole.swift | 5 +- .../GetTopWatchedContentUnauthorized.swift | 23 + .../GetTranscodeSessionsBadRequest.swift | 23 + .../GetTranscodeSessionsErrors.swift | 43 +- .../GetTranscodeSessionsMediaContainer.swift | 5 +- .../GetTranscodeSessionsResponse.swift | 25 +- .../GetTranscodeSessionsResponseBody.swift | 5 +- .../GetTranscodeSessionsSessionsErrors.swift | 29 + ...ranscodeSessionsSessionsResponseBody.swift | 24 - .../GetTranscodeSessionsUnauthorized.swift | 23 + ...etTransientTokenAuthenticationErrors.swift | 29 + .../GetTransientTokenBadRequest.swift | 23 + .../operations/GetTransientTokenErrors.swift | 43 +- .../GetTransientTokenQueryParamType.swift | 5 +- .../operations/GetTransientTokenRequest.swift | 5 +- .../GetTransientTokenResponse.swift | 19 +- .../GetTransientTokenUnauthorized.swift | 23 + .../GetUpdateStatusBadRequest.swift | 23 + .../operations/GetUpdateStatusErrors.swift | 43 +- .../GetUpdateStatusMediaContainer.swift | 5 +- .../operations/GetUpdateStatusResponse.swift | 25 +- .../GetUpdateStatusResponseBody.swift | 5 +- .../GetUpdateStatusUnauthorized.swift | 23 + .../GetUpdateStatusUpdaterErrors.swift | 29 + .../GetUpdateStatusUpdaterResponseBody.swift | 24 - .../operations/GetUserFriendsBadRequest.swift | 23 + .../operations/GetUserFriendsErrors.swift | 29 + .../operations/GetUserFriendsPlexErrors.swift | 29 + .../operations/GetUserFriendsResponse.swift | 41 + .../GetUserFriendsUnauthorized.swift | 23 + .../operations/GetWatchListBadRequest.swift | 23 + .../operations/GetWatchListErrors.swift | 29 + ...equest.swift => GetWatchListRequest.swift} | 19 +- .../operations/GetWatchListResponse.swift | 41 + ...y.swift => GetWatchListResponseBody.swift} | 9 +- .../operations/GetWatchListUnauthorized.swift | 23 + .../GetWatchListWatchlistErrors.swift | 29 + .../operations/GetWatchlistErrors.swift | 58 - .../operations/GetWatchlistResponse.swift | 34 - .../GetWatchlistWatchlistResponseBody.swift | 24 - .../Plexswift/models/operations/Guids.swift | 5 +- Sources/Plexswift/models/operations/Hub.swift | 5 +- .../Plexswift/models/operations/Image.swift | 5 +- .../operations/IncludeCollections.swift | 5 +- .../models/operations/IncludeDetails.swift | 5 +- .../operations/IncludeExternalMedia.swift | 5 +- .../models/operations/IncludeGuids.swift | 11 + .../models/operations/IncludeHttps.swift | 10 + .../models/operations/IncludeIPv6.swift | 10 + .../models/operations/IncludeMeta.swift | 11 + .../models/operations/IncludeRelay.swift | 12 + .../operations/InternalPaymentMethod.swift | 18 + .../Plexswift/models/operations/Level.swift | 5 +- .../models/operations/LibrarySectionID.swift | 5 +- .../Plexswift/models/operations/Libtype.swift | 5 +- .../models/operations/Location.swift | 43 +- .../models/operations/LogLineBadRequest.swift | 23 + .../models/operations/LogLineErrors.swift | 43 +- .../models/operations/LogLineLogErrors.swift | 29 + .../models/operations/LogLineRequest.swift | 5 +- .../models/operations/LogLineResponse.swift | 19 +- ...seBody.swift => LogLineUnauthorized.swift} | 13 +- .../operations/LogMultiLineBadRequest.swift | 23 + .../operations/LogMultiLineErrors.swift | 43 +- .../operations/LogMultiLineLogErrors.swift | 29 + .../operations/LogMultiLineResponse.swift | 19 +- .../operations/LogMultiLineResponseBody.swift | 24 - ...y.swift => LogMultiLineUnauthorized.swift} | 13 +- .../models/operations/MailingListStatus.swift | 10 + .../operations/MarkPlayedBadRequest.swift | 23 + .../models/operations/MarkPlayedErrors.swift | 43 +- .../operations/MarkPlayedMediaErrors.swift | 29 + .../models/operations/MarkPlayedRequest.swift | 5 +- .../operations/MarkPlayedResponse.swift | 19 +- .../operations/MarkPlayedResponseBody.swift | 24 - .../operations/MarkPlayedUnauthorized.swift | 23 + .../operations/MarkUnplayedBadRequest.swift | 23 + .../operations/MarkUnplayedErrors.swift | 43 +- .../operations/MarkUnplayedMediaErrors.swift | 29 + .../operations/MarkUnplayedRequest.swift | 5 +- .../operations/MarkUnplayedResponse.swift | 19 +- .../operations/MarkUnplayedResponseBody.swift | 24 - ...y.swift => MarkUnplayedUnauthorized.swift} | 13 +- .../Plexswift/models/operations/Media.swift | 5 +- .../models/operations/MediaContainer.swift | 5 +- .../models/operations/MediaProvider.swift | 35 + .../operations/MediaReviewsVisibility.swift | 9 + .../models/operations/Metadata.swift | 5 +- .../Plexswift/models/operations/MinSize.swift | 5 +- .../Plexswift/models/operations/MyPlex.swift | 5 +- .../models/operations/OnlyTransient.swift | 5 +- .../models/operations/Operator.swift | 5 +- .../Plexswift/models/operations/Part.swift | 5 +- .../models/operations/PastSubscription.swift | 65 + .../models/operations/PathParamFilter.swift | 12 - .../models/operations/PathParamTaskName.swift | 5 +- .../operations/PerformSearchBadRequest.swift | 23 + .../operations/PerformSearchErrors.swift | 43 +- .../operations/PerformSearchRequest.swift | 5 +- .../operations/PerformSearchResponse.swift | 19 +- .../PerformSearchResponseBody.swift | 24 - .../PerformSearchSearchErrors.swift | 29 + .../PerformSearchUnauthorized.swift | 23 + .../PerformVoiceSearchBadRequest.swift | 23 + .../operations/PerformVoiceSearchErrors.swift | 43 +- .../PerformVoiceSearchRequest.swift | 5 +- .../PerformVoiceSearchResponse.swift | 19 +- .../PerformVoiceSearchSearchErrors.swift | 29 + .../PerformVoiceSearchUnauthorized.swift | 23 + .../Plexswift/models/operations/Pivot.swift | 38 + .../Plexswift/models/operations/Player.swift | 5 +- .../models/operations/PlaylistType.swift | 5 +- .../models/operations/PlexDevice.swift | 160 ++ ...tUsersSignInDataAuthenticationErrors.swift | 29 + ...sersSignInDataAuthenticationFeatures.swift | 66 + ...gnInDataAuthenticationResponseStatus.swift | 10 + ...tUsersSignInDataAuthenticationStatus.swift | 10 + ...SignInDataAuthenticationSubscription.swift | 50 + ...ostUsersSignInDataAutoSelectSubtitle.swift | 10 + .../PostUsersSignInDataBadRequest.swift | 23 + ...gnInDataDefaultSubtitleAccessibility.swift | 10 + ...UsersSignInDataDefaultSubtitleForced.swift | 10 + .../PostUsersSignInDataErrors.swift | 29 + .../PostUsersSignInDataFeatures.swift | 66 + ...PostUsersSignInDataMailingListStatus.swift | 10 + ...sersSignInDataMediaReviewsVisibility.swift | 9 + .../PostUsersSignInDataRequest.swift | 28 + .../PostUsersSignInDataRequestBody.swift | 22 + .../PostUsersSignInDataResponse.swift | 41 + .../PostUsersSignInDataServices.swift | 35 + .../operations/PostUsersSignInDataState.swift | 8 + .../PostUsersSignInDataStatus.swift | 9 + .../PostUsersSignInDataSubscription.swift | 50 + .../PostUsersSignInDataUnauthorized.swift | 23 + .../PostUsersSignInDataUserPlexAccount.swift | 324 +++ .../PostUsersSignInDataUserProfile.swift | 56 + .../PostUsersSignInDataWatchedIndicator.swift | 9 + .../models/operations/Producer.swift | 5 +- .../models/operations/Provider.swift | 5 +- .../models/operations/QueryParamFilter.swift | 20 + .../models/operations/QueryParamForce.swift | 14 + .../operations/QueryParamOnlyTransient.swift | 5 +- .../models/operations/QueryParamSmart.swift | 5 +- .../models/operations/QueryParamType.swift | 22 +- .../Plexswift/models/operations/Ratings.swift | 5 +- .../operations/RefreshLibraryErrors.swift | 58 - .../operations/RefreshLibraryRequest.swift | 25 - .../operations/RefreshLibraryResponse.swift | 26 - .../RefreshLibraryResponseBody.swift | 24 - .../Plexswift/models/operations/Release.swift | 5 +- .../models/operations/ResponseBody.swift | 40 + .../Plexswift/models/operations/Role.swift | 5 +- .../Plexswift/models/operations/Scope.swift | 5 +- .../operations/SearchLibraryErrors.swift | 58 - .../SearchLibraryLibraryResponseBody.swift | 24 - .../operations/SearchLibraryRequest.swift | 23 - .../operations/SearchLibraryResponse.swift | 34 - .../SearchLibraryResponseBody.swift | 24 - .../Plexswift/models/operations/Server.swift | 5 +- .../models/operations/Services.swift | 35 + .../Plexswift/models/operations/Session.swift | 5 +- .../Plexswift/models/operations/Setting.swift | 5 +- .../models/operations/SharedServers.swift | 18 + .../models/operations/SharedSources.swift | 18 + .../Plexswift/models/operations/Skip.swift | 7 +- .../Plexswift/models/operations/Smart.swift | 5 +- .../Plexswift/models/operations/Sort.swift | 5 +- .../operations/StartAllTasksBadRequest.swift | 23 + .../StartAllTasksButlerErrors.swift | 29 + .../operations/StartAllTasksErrors.swift | 43 +- .../operations/StartAllTasksResponse.swift | 19 +- .../StartAllTasksResponseBody.swift | 24 - .../StartAllTasksUnauthorized.swift | 23 + .../operations/StartTaskBadRequest.swift | 23 + .../operations/StartTaskButlerErrors.swift | 29 + .../models/operations/StartTaskErrors.swift | 43 +- .../models/operations/StartTaskRequest.swift | 5 +- .../models/operations/StartTaskResponse.swift | 19 +- ...Body.swift => StartTaskUnauthorized.swift} | 13 +- .../StartUniversalTranscodeBadRequest.swift | 23 + .../StartUniversalTranscodeErrors.swift | 43 +- .../StartUniversalTranscodeRequest.swift | 5 +- .../StartUniversalTranscodeResponse.swift | 19 +- .../StartUniversalTranscodeUnauthorized.swift | 23 + .../StartUniversalTranscodeVideoErrors.swift | 29 + .../Plexswift/models/operations/State.swift | 5 +- .../operations/StatisticsBandwidth.swift | 5 +- .../models/operations/StatisticsMedia.swift | 5 +- .../operations/StatisticsResources.swift | 5 +- .../Plexswift/models/operations/Status.swift | 9 + .../operations/StopAllTasksBadRequest.swift | 23 + .../operations/StopAllTasksButlerErrors.swift | 29 + .../operations/StopAllTasksErrors.swift | 43 +- .../operations/StopAllTasksResponse.swift | 19 +- .../operations/StopAllTasksResponseBody.swift | 24 - ...y.swift => StopAllTasksUnauthorized.swift} | 13 +- .../operations/StopTaskBadRequest.swift | 23 + .../operations/StopTaskButlerErrors.swift | 29 + .../models/operations/StopTaskErrors.swift | 43 +- .../models/operations/StopTaskRequest.swift | 5 +- .../models/operations/StopTaskResponse.swift | 19 +- .../operations/StopTaskResponseBody.swift | 24 - ...eBody.swift => StopTaskUnauthorized.swift} | 13 +- .../StopTranscodeSessionBadRequest.swift | 23 + .../StopTranscodeSessionErrors.swift | 43 +- .../StopTranscodeSessionRequest.swift | 5 +- .../StopTranscodeSessionResponse.swift | 19 +- .../StopTranscodeSessionSessionsErrors.swift | 29 + .../StopTranscodeSessionUnauthorized.swift | 23 + .../Plexswift/models/operations/Stream.swift | 5 +- .../models/operations/Subscription.swift | 50 + Sources/Plexswift/models/operations/Tag.swift | 5 +- .../models/operations/TaskName.swift | 5 +- .../Plexswift/models/operations/Tonight.swift | 5 +- .../models/operations/TranscodeSession.swift | 5 +- .../Plexswift/models/operations/Trials.swift | 18 + .../models/operations/TypeModel.swift | 13 +- .../UpdatePlayProgressBadRequest.swift | 23 + .../operations/UpdatePlayProgressErrors.swift | 43 +- .../UpdatePlayProgressMediaErrors.swift | 29 + .../UpdatePlayProgressRequest.swift | 5 +- .../UpdatePlayProgressResponse.swift | 19 +- .../UpdatePlayProgressUnauthorized.swift | 23 + .../operations/UpdatePlaylistBadRequest.swift | 23 + .../operations/UpdatePlaylistErrors.swift | 43 +- .../UpdatePlaylistPlaylistsErrors.swift | 29 + .../operations/UpdatePlaylistRequest.swift | 5 +- .../operations/UpdatePlaylistResponse.swift | 19 +- .../UpdatePlaylistResponseBody.swift | 24 - .../UpdatePlaylistUnauthorized.swift | 23 + .../operations/UploadPlaylistBadRequest.swift | 23 + .../operations/UploadPlaylistErrors.swift | 43 +- .../UploadPlaylistPlaylistsErrors.swift | 29 + .../operations/UploadPlaylistRequest.swift | 9 +- .../operations/UploadPlaylistResponse.swift | 19 +- .../UploadPlaylistResponseBody.swift | 24 - .../UploadPlaylistUnauthorized.swift | 23 + .../Plexswift/models/operations/Upscale.swift | 5 +- .../Plexswift/models/operations/User.swift | 5 +- .../models/operations/UserProfile.swift | 56 + .../models/operations/WatchedIndicator.swift | 9 + .../Plexswift/models/operations/Writer.swift | 5 +- .../Plexswift/models/shared/Security.swift | 5 +- Sources/plexswift/AnyValue.swift | 2 +- Sources/plexswift/PlexswiftAPI.swift | 497 +++- Sources/plexswift/PlexswiftError.swift | 2 +- .../internal/api/Client+PlexswiftAPI.swift | 10 +- .../plexswift/internal/client/Response.swift | 2 +- .../plexswift/internal/client/Servers.swift | 2 +- .../internal/client/URLRequestBuilder.swift | 4 +- .../client/URLRequestConfiguration.swift | 2 +- .../HTTPURLResponse+ContentType.swift | 2 +- .../extensions/String+ContentType.swift | 2 +- .../String+ParameterSubstitution.swift | 2 +- .../internal/serialization/Form.swift | 2 +- .../internal/serialization/JSON.swift | 2 +- .../internal/serialization/Maps.swift | 2 +- .../internal/serialization/Parameters.swift | 2 +- .../serialization/PropertyWrappers.swift | 2 +- .../serialization/QueryParameters.swift | 2 +- .../serialization/SecurityParameters.swift | 2 +- .../internal/serialization/Serializable.swift | 2 +- USAGE.md | 7 +- 919 files changed, 16195 insertions(+), 6963 deletions(-) create mode 100644 CONTRIBUTING.md rename Sources/Plexswift/internal/models/{PathParamFilter+Serialization.swift => AutoSelectSubtitle+Serialization.swift} (72%) create mode 100644 Sources/Plexswift/internal/models/CreatePlaylistQueryParamType+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/DefaultSubtitleAccessibility+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/DefaultSubtitleForced+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/Features+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetBannerImageRequest+Serialization.swift rename Sources/Plexswift/internal/models/{GetLibraryRequest+Serialization.swift => GetLibraryDetailsRequest+Serialization.swift} (72%) create mode 100644 Sources/Plexswift/internal/models/GetMediaProvidersRequest+Serialization.swift rename Sources/Plexswift/internal/models/{GetMetadataRequest+Serialization.swift => GetMetaDataByRatingKeyRequest+Serialization.swift} (55%) create mode 100644 Sources/Plexswift/internal/models/GetPlaylistContentsQueryParamType+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetRecentlyAddedRequest+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetRefreshLibraryMetadataRequest+Serialization.swift rename Sources/Plexswift/internal/models/{SearchLibraryRequest+Serialization.swift => GetSearchLibraryRequest+Serialization.swift} (71%) create mode 100644 Sources/Plexswift/internal/models/GetServerResourcesRequest+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetThumbImageRequest+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetTokenByPinIdRequest+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationResponseStatus+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationStatus+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetTokenDetailsFeatures+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetTokenDetailsStatus+Serialization.swift delete mode 100644 Sources/Plexswift/internal/models/GetTokenRequest+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/GetTopWatchedContentQueryParamType+Serialization.swift rename Sources/Plexswift/internal/models/{GetWatchlistRequest+Serialization.swift => GetWatchListRequest+Serialization.swift} (89%) create mode 100644 Sources/Plexswift/internal/models/IncludeGuids+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/IncludeHttps+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/IncludeIPv6+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/IncludeMeta+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/IncludeRelay+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/InternalPaymentMethod+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/MailingListStatus+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/MediaReviewsVisibility+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationFeatures+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationResponseStatus+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationStatus+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataAutoSelectSubtitle+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleAccessibility+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleForced+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataFeatures+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataMailingListStatus+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataMediaReviewsVisibility+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataRequest+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataRequestBody+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataState+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataStatus+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/PostUsersSignInDataWatchedIndicator+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/QueryParamFilter+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/QueryParamForce+Serialization.swift delete mode 100644 Sources/Plexswift/internal/models/RefreshLibraryRequest+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/SharedServers+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/SharedSources+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/Status+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/Trials+Serialization.swift create mode 100644 Sources/Plexswift/internal/models/WatchedIndicator+Serialization.swift create mode 100644 Sources/Plexswift/models/operations/AddPlaylistContentsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/AddPlaylistContentsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/ApplyUpdatesBadRequest.swift rename Sources/Plexswift/models/operations/{GetAvailableClientsServerResponseBody.swift => ApplyUpdatesUnauthorized.swift} (50%) create mode 100644 Sources/Plexswift/models/operations/ApplyUpdatesUpdaterErrors.swift create mode 100644 Sources/Plexswift/models/operations/AutoSelectSubtitle.swift create mode 100644 Sources/Plexswift/models/operations/Billing.swift create mode 100644 Sources/Plexswift/models/operations/CancelServerActivitiesActivitiesErrors.swift create mode 100644 Sources/Plexswift/models/operations/CancelServerActivitiesBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/CancelServerActivitiesUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/CheckForUpdatesBadRequest.swift rename Sources/Plexswift/models/operations/{CancelServerActivitiesResponseBody.swift => CheckForUpdatesUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/CheckForUpdatesUpdaterErrors.swift create mode 100644 Sources/Plexswift/models/operations/ClearPlaylistContentsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/ClearPlaylistContentsPlaylistsErrors.swift create mode 100644 Sources/Plexswift/models/operations/ClearPlaylistContentsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/Connections.swift create mode 100644 Sources/Plexswift/models/operations/CreatePlaylistBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/CreatePlaylistPlaylistsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/CreatePlaylistPlaylistsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/CreatePlaylistQueryParamType.swift rename Sources/Plexswift/models/operations/{StartUniversalTranscodeResponseBody.swift => CreatePlaylistUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/DefaultSubtitleAccessibility.swift create mode 100644 Sources/Plexswift/models/operations/DefaultSubtitleForced.swift create mode 100644 Sources/Plexswift/models/operations/DeleteLibraryBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/DeleteLibraryLibraryErrors.swift rename Sources/Plexswift/models/operations/{StopTranscodeSessionResponseBody.swift => DeleteLibraryUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/DeletePlaylistBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/DeletePlaylistPlaylistsErrors.swift create mode 100644 Sources/Plexswift/models/operations/DeletePlaylistUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/EnablePaperTrailBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/EnablePaperTrailLogErrors.swift rename Sources/Plexswift/models/operations/{GetMetadataChildrenLibraryResponseBody.swift => EnablePaperTrailUnauthorized.swift} (50%) create mode 100644 Sources/Plexswift/models/operations/Feature.swift create mode 100644 Sources/Plexswift/models/operations/Features.swift create mode 100644 Sources/Plexswift/models/operations/Friend.swift create mode 100644 Sources/Plexswift/models/operations/GeoData.swift create mode 100644 Sources/Plexswift/models/operations/GetAllLibrariesBadRequest.swift rename Sources/Plexswift/models/operations/{GetLibrariesDirectory.swift => GetAllLibrariesDirectory.swift} (77%) create mode 100644 Sources/Plexswift/models/operations/GetAllLibrariesErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetAllLibrariesLibraryErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetAllLibrariesMediaContainer.swift create mode 100644 Sources/Plexswift/models/operations/GetAllLibrariesResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetAllLibrariesResponseBody.swift rename Sources/Plexswift/models/operations/{GetBandwidthStatisticsStatisticsResponseBody.swift => GetAllLibrariesUnauthorized.swift} (50%) create mode 100644 Sources/Plexswift/models/operations/GetAvailableClientsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetAvailableClientsServerErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetAvailableClientsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetBandwidthStatisticsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetBandwidthStatisticsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetBannerImageBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetBannerImageErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetBannerImageMediaErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetBannerImageRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetBannerImageResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetBannerImageUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetButlerTasksBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetButlerTasksButlerErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetButlerTasksButlerResponseBody.swift rename Sources/Plexswift/models/operations/{GetServerPreferencesServerResponseBody.swift => GetButlerTasksUnauthorized.swift} (50%) create mode 100644 Sources/Plexswift/models/operations/GetCompanionsDataBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetCompanionsDataErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetCompanionsDataPlexErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetCompanionsDataResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetCompanionsDataUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetDevicesBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetDevicesServerErrors.swift rename Sources/Plexswift/models/operations/{EnablePaperTrailResponseBody.swift => GetDevicesUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/GetFileHashBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetFileHashLibraryErrors.swift rename Sources/Plexswift/models/operations/{PerformVoiceSearchResponseBody.swift => GetFileHashUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/GetGeoDataBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetGeoDataErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetGeoDataGeoData.swift create mode 100644 Sources/Plexswift/models/operations/GetGeoDataPlexErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetGeoDataResponse.swift rename Sources/Plexswift/models/operations/{DeletePlaylistResponseBody.swift => GetGeoDataUnauthorized.swift} (52%) create mode 100644 Sources/Plexswift/models/operations/GetGlobalHubsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetGlobalHubsHubsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetGlobalHubsHubsResponseBody.swift rename Sources/Plexswift/models/operations/{GetTransientTokenResponseBody.swift => GetGlobalHubsUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/GetHomeDataBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetHomeDataPlexErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetHomeDataPlexResponseBody.swift rename Sources/Plexswift/models/operations/{CheckForUpdatesResponseBody.swift => GetHomeDataUnauthorized.swift} (51%) delete mode 100644 Sources/Plexswift/models/operations/GetLibrariesErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibrariesLibraryResponseBody.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibrariesLocation.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibrariesMediaContainer.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibrariesResponse.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibrariesResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetLibraryDetailsBadRequest.swift rename Sources/Plexswift/models/operations/{GetLibraryDirectory.swift => GetLibraryDetailsDirectory.swift} (81%) create mode 100644 Sources/Plexswift/models/operations/GetLibraryDetailsErrors.swift rename Sources/Plexswift/models/operations/{GetLibraryFilter.swift => GetLibraryDetailsFilter.swift} (81%) create mode 100644 Sources/Plexswift/models/operations/GetLibraryDetailsLibraryErrors.swift rename Sources/Plexswift/models/operations/{GetLibraryMediaContainer.swift => GetLibraryDetailsMediaContainer.swift} (70%) rename Sources/Plexswift/models/operations/{GetLibraryRequest.swift => GetLibraryDetailsRequest.swift} (54%) create mode 100644 Sources/Plexswift/models/operations/GetLibraryDetailsResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetLibraryDetailsResponseBody.swift rename Sources/Plexswift/models/operations/{GetLibraryType.swift => GetLibraryDetailsType.swift} (68%) create mode 100644 Sources/Plexswift/models/operations/GetLibraryDetailsUnauthorized.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibraryErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetLibraryHubsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetLibraryHubsHubsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibraryHubsHubsResponseBody.swift rename Sources/Plexswift/models/operations/{UpdatePlayProgressResponseBody.swift => GetLibraryHubsUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/GetLibraryItemsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetLibraryItemsLibraryErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibraryItemsLibraryResponseBody.swift rename Sources/Plexswift/models/operations/{GetResourcesStatisticsStatisticsResponseBody.swift => GetLibraryItemsUnauthorized.swift} (50%) delete mode 100644 Sources/Plexswift/models/operations/GetLibraryLibraryResponseBody.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibraryResponse.swift delete mode 100644 Sources/Plexswift/models/operations/GetLibraryResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersDirectory.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersMediaContainer.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersServerErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetMediaProvidersUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift rename Sources/Plexswift/models/operations/{GetMetadataCountry.swift => GetMetaDataByRatingKeyCountry.swift} (73%) rename Sources/Plexswift/models/operations/{GetMetadataDirector.swift => GetMetaDataByRatingKeyDirector.swift} (79%) create mode 100644 Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift rename Sources/Plexswift/models/operations/{GetMetadataGenre.swift => GetMetaDataByRatingKeyGenre.swift} (74%) create mode 100644 Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift rename Sources/Plexswift/models/operations/{GetMetadataMedia.swift => GetMetaDataByRatingKeyMedia.swift} (91%) rename Sources/Plexswift/models/operations/{GetMetadataMediaContainer.swift => GetMetaDataByRatingKeyMediaContainer.swift} (81%) rename Sources/Plexswift/models/operations/{GetMetadataMetadata.swift => GetMetaDataByRatingKeyMetadata.swift} (83%) rename Sources/Plexswift/models/operations/{GetMetadataPart.swift => GetMetaDataByRatingKeyPart.swift} (89%) create mode 100644 Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift rename Sources/Plexswift/models/operations/{GetMetadataRole.swift => GetMetaDataByRatingKeyRole.swift} (82%) create mode 100644 Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift rename Sources/Plexswift/models/operations/{GetMetadataWriter.swift => GetMetaDataByRatingKeyWriter.swift} (79%) create mode 100644 Sources/Plexswift/models/operations/GetMetadataChildrenBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetMetadataChildrenLibraryErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetMetadataChildrenUnauthorized.swift delete mode 100644 Sources/Plexswift/models/operations/GetMetadataErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetMetadataLibraryResponseBody.swift delete mode 100644 Sources/Plexswift/models/operations/GetMetadataRequest.swift delete mode 100644 Sources/Plexswift/models/operations/GetMetadataResponse.swift delete mode 100644 Sources/Plexswift/models/operations/GetMetadataResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetMyPlexAccountBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetMyPlexAccountServerErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetMyPlexAccountServerResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetMyPlexAccountUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetOnDeckBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetOnDeckLibraryErrors.swift rename Sources/Plexswift/models/operations/{GetTimelineResponseBody.swift => GetOnDeckUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/GetPinAuthPinContainer.swift create mode 100644 Sources/Plexswift/models/operations/GetPinBadRequest.swift delete mode 100644 Sources/Plexswift/models/operations/GetPinPlexResponseBody.swift delete mode 100644 Sources/Plexswift/models/operations/GetPinResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistContentsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistContentsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistPlaylistsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetPlaylistPlaylistsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistsPlaylistsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetPlaylistsPlaylistsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetPlaylistsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetRecentlyAddedBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetRecentlyAddedLibraryErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetRecentlyAddedLibraryResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetRecentlyAddedUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetRefreshLibraryMetadataBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetRefreshLibraryMetadataErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetRefreshLibraryMetadataLibraryErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetRefreshLibraryMetadataRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetRefreshLibraryMetadataResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetRefreshLibraryMetadataUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetResizedPhotoBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetResizedPhotoServerErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetResizedPhotoUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetResourcesStatisticsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetResourcesStatisticsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchLibraryBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchLibraryErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchLibraryLibraryErrors.swift rename Sources/Plexswift/models/operations/{SearchLibraryMediaContainer.swift => GetSearchLibraryMediaContainer.swift} (75%) rename Sources/Plexswift/models/operations/{SearchLibraryMetadata.swift => GetSearchLibraryMetadata.swift} (93%) create mode 100644 Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchLibraryResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchLibraryResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchLibraryUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchResultsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchResultsSearchErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetSearchResultsSearchResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetSearchResultsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetServerActivitiesActivitiesErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetServerActivitiesActivitiesResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetServerActivitiesBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetServerActivitiesUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetServerCapabilitiesBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetServerCapabilitiesErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetServerCapabilitiesServerResponseBody.swift rename Sources/Plexswift/models/operations/{ClearPlaylistContentsResponseBody.swift => GetServerCapabilitiesUnauthorized.swift} (51%) delete mode 100644 Sources/Plexswift/models/operations/GetServerIdentityErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetServerIdentityRequestTimeout.swift delete mode 100644 Sources/Plexswift/models/operations/GetServerIdentityServerResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetServerListBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetServerListServerErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetServerListServerResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetServerListUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetServerPreferencesBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetServerPreferencesServerErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetServerPreferencesUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetServerResourcesBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetServerResourcesErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetServerResourcesPlexErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetServerResourcesRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetServerResourcesResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetServerResourcesUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetSessionHistoryBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetSessionHistorySessionsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetSessionHistorySessionsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetSessionHistoryUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetSessionsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetSessionsSessionsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetSessionsSessionsResponseBody.swift rename Sources/Plexswift/models/operations/{GetDevicesServerResponseBody.swift => GetSessionsUnauthorized.swift} (50%) create mode 100644 Sources/Plexswift/models/operations/GetSourceConnectionInformationAuthenticationErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetSourceConnectionInformationBadRequest.swift rename Sources/Plexswift/models/operations/{GetSourceConnectionInformationResponseBody.swift => GetSourceConnectionInformationUnauthorized.swift} (63%) create mode 100644 Sources/Plexswift/models/operations/GetStatisticsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetStatisticsStatisticsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetStatisticsStatisticsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetStatisticsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetThumbImageBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetThumbImageErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetThumbImageMediaErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetThumbImageRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetThumbImageResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetThumbImageUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetTimelineBadRequest.swift rename Sources/Plexswift/models/operations/{GetOnDeckLibraryResponseBody.swift => GetTimelineUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/GetTimelineVideoErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenByPinIdAuthPinContainer.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenByPinIdBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenByPinIdErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenByPinIdGeoData.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenByPinIdPlexErrors.swift rename Sources/Plexswift/models/operations/{GetTokenRequest.swift => GetTokenByPinIdRequest.swift} (79%) create mode 100644 Sources/Plexswift/models/operations/GetTokenByPinIdResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenByPinIdResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationResponseStatus.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationStatus.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsFeatures.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsStatus.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsSubscription.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetTokenDetailsUserPlexAccount.swift delete mode 100644 Sources/Plexswift/models/operations/GetTokenErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetTokenLocation.swift delete mode 100644 Sources/Plexswift/models/operations/GetTokenPlexResponseBody.swift delete mode 100644 Sources/Plexswift/models/operations/GetTokenResponse.swift delete mode 100644 Sources/Plexswift/models/operations/GetTokenResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetTopWatchedContentBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetTopWatchedContentErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetTopWatchedContentLibraryErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift create mode 100644 Sources/Plexswift/models/operations/GetTopWatchedContentUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetTranscodeSessionsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetTranscodeSessionsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetTransientTokenAuthenticationErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetTransientTokenBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetTransientTokenUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetUpdateStatusBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetUpdateStatusUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetUpdateStatusUpdaterErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetUpdateStatusUpdaterResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/GetUserFriendsBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetUserFriendsErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetUserFriendsPlexErrors.swift create mode 100644 Sources/Plexswift/models/operations/GetUserFriendsResponse.swift create mode 100644 Sources/Plexswift/models/operations/GetUserFriendsUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetWatchListBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/GetWatchListErrors.swift rename Sources/Plexswift/models/operations/{GetWatchlistRequest.swift => GetWatchListRequest.swift} (81%) create mode 100644 Sources/Plexswift/models/operations/GetWatchListResponse.swift rename Sources/Plexswift/models/operations/{GetWatchlistResponseBody.swift => GetWatchListResponseBody.swift} (86%) create mode 100644 Sources/Plexswift/models/operations/GetWatchListUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/GetWatchListWatchlistErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetWatchlistErrors.swift delete mode 100644 Sources/Plexswift/models/operations/GetWatchlistResponse.swift delete mode 100644 Sources/Plexswift/models/operations/GetWatchlistWatchlistResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/IncludeGuids.swift create mode 100644 Sources/Plexswift/models/operations/IncludeHttps.swift create mode 100644 Sources/Plexswift/models/operations/IncludeIPv6.swift create mode 100644 Sources/Plexswift/models/operations/IncludeMeta.swift create mode 100644 Sources/Plexswift/models/operations/IncludeRelay.swift create mode 100644 Sources/Plexswift/models/operations/InternalPaymentMethod.swift create mode 100644 Sources/Plexswift/models/operations/LogLineBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/LogLineLogErrors.swift rename Sources/Plexswift/models/operations/{LogLineResponseBody.swift => LogLineUnauthorized.swift} (52%) create mode 100644 Sources/Plexswift/models/operations/LogMultiLineBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/LogMultiLineLogErrors.swift delete mode 100644 Sources/Plexswift/models/operations/LogMultiLineResponseBody.swift rename Sources/Plexswift/models/operations/{GetResizedPhotoResponseBody.swift => LogMultiLineUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/MailingListStatus.swift create mode 100644 Sources/Plexswift/models/operations/MarkPlayedBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/MarkPlayedMediaErrors.swift delete mode 100644 Sources/Plexswift/models/operations/MarkPlayedResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/MarkPlayedUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/MarkUnplayedBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/MarkUnplayedMediaErrors.swift delete mode 100644 Sources/Plexswift/models/operations/MarkUnplayedResponseBody.swift rename Sources/Plexswift/models/operations/{DeleteLibraryResponseBody.swift => MarkUnplayedUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/MediaProvider.swift create mode 100644 Sources/Plexswift/models/operations/MediaReviewsVisibility.swift create mode 100644 Sources/Plexswift/models/operations/PastSubscription.swift delete mode 100644 Sources/Plexswift/models/operations/PathParamFilter.swift create mode 100644 Sources/Plexswift/models/operations/PerformSearchBadRequest.swift delete mode 100644 Sources/Plexswift/models/operations/PerformSearchResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/PerformSearchSearchErrors.swift create mode 100644 Sources/Plexswift/models/operations/PerformSearchUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/PerformVoiceSearchBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/PerformVoiceSearchSearchErrors.swift create mode 100644 Sources/Plexswift/models/operations/PerformVoiceSearchUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/Pivot.swift create mode 100644 Sources/Plexswift/models/operations/PlexDevice.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationErrors.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationFeatures.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationResponseStatus.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationStatus.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationSubscription.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataAutoSelectSubtitle.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleForced.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataErrors.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataFeatures.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataMailingListStatus.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataMediaReviewsVisibility.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataRequest.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataRequestBody.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataResponse.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataServices.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataState.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataStatus.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataSubscription.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataUserPlexAccount.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataUserProfile.swift create mode 100644 Sources/Plexswift/models/operations/PostUsersSignInDataWatchedIndicator.swift create mode 100644 Sources/Plexswift/models/operations/QueryParamFilter.swift create mode 100644 Sources/Plexswift/models/operations/QueryParamForce.swift delete mode 100644 Sources/Plexswift/models/operations/RefreshLibraryErrors.swift delete mode 100644 Sources/Plexswift/models/operations/RefreshLibraryRequest.swift delete mode 100644 Sources/Plexswift/models/operations/RefreshLibraryResponse.swift delete mode 100644 Sources/Plexswift/models/operations/RefreshLibraryResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/ResponseBody.swift delete mode 100644 Sources/Plexswift/models/operations/SearchLibraryErrors.swift delete mode 100644 Sources/Plexswift/models/operations/SearchLibraryLibraryResponseBody.swift delete mode 100644 Sources/Plexswift/models/operations/SearchLibraryRequest.swift delete mode 100644 Sources/Plexswift/models/operations/SearchLibraryResponse.swift delete mode 100644 Sources/Plexswift/models/operations/SearchLibraryResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/Services.swift create mode 100644 Sources/Plexswift/models/operations/SharedServers.swift create mode 100644 Sources/Plexswift/models/operations/SharedSources.swift create mode 100644 Sources/Plexswift/models/operations/StartAllTasksBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/StartAllTasksButlerErrors.swift delete mode 100644 Sources/Plexswift/models/operations/StartAllTasksResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/StartAllTasksUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/StartTaskBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/StartTaskButlerErrors.swift rename Sources/Plexswift/models/operations/{GetFileHashResponseBody.swift => StartTaskUnauthorized.swift} (51%) create mode 100644 Sources/Plexswift/models/operations/StartUniversalTranscodeBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/StartUniversalTranscodeUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/StartUniversalTranscodeVideoErrors.swift create mode 100644 Sources/Plexswift/models/operations/Status.swift create mode 100644 Sources/Plexswift/models/operations/StopAllTasksBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/StopAllTasksButlerErrors.swift delete mode 100644 Sources/Plexswift/models/operations/StopAllTasksResponseBody.swift rename Sources/Plexswift/models/operations/{ApplyUpdatesResponseBody.swift => StopAllTasksUnauthorized.swift} (50%) create mode 100644 Sources/Plexswift/models/operations/StopTaskBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/StopTaskButlerErrors.swift delete mode 100644 Sources/Plexswift/models/operations/StopTaskResponseBody.swift rename Sources/Plexswift/models/operations/{StartTaskResponseBody.swift => StopTaskUnauthorized.swift} (52%) create mode 100644 Sources/Plexswift/models/operations/StopTranscodeSessionBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/StopTranscodeSessionSessionsErrors.swift create mode 100644 Sources/Plexswift/models/operations/StopTranscodeSessionUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/Subscription.swift create mode 100644 Sources/Plexswift/models/operations/Trials.swift create mode 100644 Sources/Plexswift/models/operations/UpdatePlayProgressBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/UpdatePlayProgressMediaErrors.swift create mode 100644 Sources/Plexswift/models/operations/UpdatePlayProgressUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/UpdatePlaylistBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/UpdatePlaylistPlaylistsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/UpdatePlaylistResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/UpdatePlaylistUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/UploadPlaylistBadRequest.swift create mode 100644 Sources/Plexswift/models/operations/UploadPlaylistPlaylistsErrors.swift delete mode 100644 Sources/Plexswift/models/operations/UploadPlaylistResponseBody.swift create mode 100644 Sources/Plexswift/models/operations/UploadPlaylistUnauthorized.swift create mode 100644 Sources/Plexswift/models/operations/UserProfile.swift create mode 100644 Sources/Plexswift/models/operations/WatchedIndicator.swift diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ed5b9e2..8f66049 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,45 +1,855 @@ lockVersion: 2.0.0 id: 5d77204e-e413-4fd0-a14a-bad3aee2247a management: - docChecksum: e73920abd3a55e8d249592f2e3090574 + docChecksum: a6fee1797b2da7ccbaf7743772a40b56 docVersion: 0.0.3 - speakeasyVersion: 1.314.2 - generationVersion: 2.349.6 - releaseVersion: 0.5.0 - configChecksum: 98f5e531db8f621f48c4c6e7ad476aa1 + speakeasyVersion: 1.397.2 + generationVersion: 2.415.8 + releaseVersion: 0.6.0 + configChecksum: 0897ca18bf2617121c5febd2b7e34231 repoURL: https://github.com/LukeHagar/plexswift.git features: swift: - core: 3.2.5 - globalSecurity: 2.81.5 + core: 3.2.13 + deprecations: 2.81.2 + globalSecurity: 2.81.6 globalServerURLs: 2.82.1 globals: 2.81.3 methodServerURLs: 3.0.1 nameOverrides: 2.81.2 - typeOverrides: 2.81.1 - unions: 2.81.5 + unions: 2.81.6 generatedFiles: - - Sources/Plexswift/internal/api/_ServerAPI.swift - - Sources/Plexswift/internal/api/_MediaAPI.swift - - Sources/Plexswift/internal/api/_VideoAPI.swift + - .gitattributes + - CONTRIBUTING.md + - Package.swift + - Sources/Plexswift/Client.swift + - Sources/Plexswift/Plexswift.docc/Plexswift.md + - Sources/Plexswift/configuration/GlobalParameters.swift + - Sources/Plexswift/configuration/GlobalServer.swift - Sources/Plexswift/internal/api/_ActivitiesAPI.swift + - Sources/Plexswift/internal/api/_AuthenticationAPI.swift - Sources/Plexswift/internal/api/_ButlerAPI.swift - - Sources/Plexswift/internal/api/_PlexAPI.swift - Sources/Plexswift/internal/api/_HubsAPI.swift - - Sources/Plexswift/internal/api/_SearchAPI.swift - Sources/Plexswift/internal/api/_LibraryAPI.swift - Sources/Plexswift/internal/api/_LogAPI.swift + - Sources/Plexswift/internal/api/_MediaAPI.swift - Sources/Plexswift/internal/api/_PlaylistsAPI.swift - - Sources/Plexswift/internal/api/_AuthenticationAPI.swift - - Sources/Plexswift/internal/api/_StatisticsAPI.swift + - Sources/Plexswift/internal/api/_PlexAPI.swift + - Sources/Plexswift/internal/api/_SearchAPI.swift + - Sources/Plexswift/internal/api/_ServerAPI.swift - Sources/Plexswift/internal/api/_SessionsAPI.swift + - Sources/Plexswift/internal/api/_StatisticsAPI.swift - Sources/Plexswift/internal/api/_UpdaterAPI.swift + - Sources/Plexswift/internal/api/_VideoAPI.swift - Sources/Plexswift/internal/api/_WatchlistAPI.swift - - Sources/Plexswift/configuration/GlobalServer.swift - - Sources/Plexswift/configuration/GlobalParameters.swift - - Sources/Plexswift/Client.swift - - Package.swift + - Sources/Plexswift/internal/models/AddPlaylistContentsRequest+Serialization.swift + - Sources/Plexswift/internal/models/ApplyUpdatesRequest+Serialization.swift + - Sources/Plexswift/internal/models/AutoSelectSubtitle+Serialization.swift + - Sources/Plexswift/internal/models/CancelServerActivitiesRequest+Serialization.swift + - Sources/Plexswift/internal/models/CheckForUpdatesRequest+Serialization.swift + - Sources/Plexswift/internal/models/ClearPlaylistContentsRequest+Serialization.swift + - Sources/Plexswift/internal/models/CreatePlaylistQueryParamType+Serialization.swift + - Sources/Plexswift/internal/models/CreatePlaylistRequest+Serialization.swift + - Sources/Plexswift/internal/models/DefaultSubtitleAccessibility+Serialization.swift + - Sources/Plexswift/internal/models/DefaultSubtitleForced+Serialization.swift + - Sources/Plexswift/internal/models/DeleteLibraryRequest+Serialization.swift + - Sources/Plexswift/internal/models/DeletePlaylistRequest+Serialization.swift + - Sources/Plexswift/internal/models/Download+Serialization.swift + - Sources/Plexswift/internal/models/Features+Serialization.swift + - Sources/Plexswift/internal/models/Filter+Serialization.swift + - Sources/Plexswift/internal/models/Force+Serialization.swift + - Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetBannerImageRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetFileHashRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetGlobalHubsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetLibraryDetailsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetLibraryHubsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetMediaProvidersRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetMetadataChildrenRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetPinRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetPlaylistContentsQueryParamType+Serialization.swift + - Sources/Plexswift/internal/models/GetPlaylistContentsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetPlaylistRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetPlaylistsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetRecentlyAddedRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetRefreshLibraryMetadataRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetResourcesStatisticsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetSearchLibraryRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetSearchResultsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetServerResourcesRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetSessionHistoryRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetStatisticsRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetThumbImageRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetTimelineRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetTokenByPinIdRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationResponseStatus+Serialization.swift + - Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationStatus+Serialization.swift + - Sources/Plexswift/internal/models/GetTokenDetailsFeatures+Serialization.swift + - Sources/Plexswift/internal/models/GetTokenDetailsStatus+Serialization.swift + - Sources/Plexswift/internal/models/GetTopWatchedContentQueryParamType+Serialization.swift + - Sources/Plexswift/internal/models/GetTopWatchedContentRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetTransientTokenQueryParamType+Serialization.swift + - Sources/Plexswift/internal/models/GetTransientTokenRequest+Serialization.swift + - Sources/Plexswift/internal/models/GetWatchListRequest+Serialization.swift + - Sources/Plexswift/internal/models/IncludeCollections+Serialization.swift + - Sources/Plexswift/internal/models/IncludeDetails+Serialization.swift + - Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift + - Sources/Plexswift/internal/models/IncludeGuids+Serialization.swift + - Sources/Plexswift/internal/models/IncludeHttps+Serialization.swift + - Sources/Plexswift/internal/models/IncludeIPv6+Serialization.swift + - Sources/Plexswift/internal/models/IncludeMeta+Serialization.swift + - Sources/Plexswift/internal/models/IncludeRelay+Serialization.swift + - Sources/Plexswift/internal/models/InternalPaymentMethod+Serialization.swift + - Sources/Plexswift/internal/models/Level+Serialization.swift + - Sources/Plexswift/internal/models/LibrarySectionID+Serialization.swift + - Sources/Plexswift/internal/models/Libtype+Serialization.swift + - Sources/Plexswift/internal/models/LogLineRequest+Serialization.swift + - Sources/Plexswift/internal/models/MailingListStatus+Serialization.swift + - Sources/Plexswift/internal/models/MarkPlayedRequest+Serialization.swift + - Sources/Plexswift/internal/models/MarkUnplayedRequest+Serialization.swift + - Sources/Plexswift/internal/models/MediaReviewsVisibility+Serialization.swift + - Sources/Plexswift/internal/models/MinSize+Serialization.swift + - Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift + - Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift + - Sources/Plexswift/internal/models/PerformSearchRequest+Serialization.swift + - Sources/Plexswift/internal/models/PerformVoiceSearchRequest+Serialization.swift + - Sources/Plexswift/internal/models/PlaylistType+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationFeatures+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationResponseStatus+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationStatus+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataAutoSelectSubtitle+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleAccessibility+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleForced+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataFeatures+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataMailingListStatus+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataMediaReviewsVisibility+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataRequest+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataRequestBody+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataState+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataStatus+Serialization.swift + - Sources/Plexswift/internal/models/PostUsersSignInDataWatchedIndicator+Serialization.swift + - Sources/Plexswift/internal/models/QueryParamFilter+Serialization.swift + - Sources/Plexswift/internal/models/QueryParamForce+Serialization.swift + - Sources/Plexswift/internal/models/QueryParamOnlyTransient+Serialization.swift + - Sources/Plexswift/internal/models/QueryParamSmart+Serialization.swift + - Sources/Plexswift/internal/models/QueryParamType+Serialization.swift + - Sources/Plexswift/internal/models/Scope+Serialization.swift + - Sources/Plexswift/internal/models/Security+Serialization.swift + - Sources/Plexswift/internal/models/SharedServers+Serialization.swift + - Sources/Plexswift/internal/models/SharedSources+Serialization.swift + - Sources/Plexswift/internal/models/Skip+Serialization.swift + - Sources/Plexswift/internal/models/Smart+Serialization.swift + - Sources/Plexswift/internal/models/StartTaskRequest+Serialization.swift + - Sources/Plexswift/internal/models/StartUniversalTranscodeRequest+Serialization.swift + - Sources/Plexswift/internal/models/State+Serialization.swift + - Sources/Plexswift/internal/models/Status+Serialization.swift + - Sources/Plexswift/internal/models/StopTaskRequest+Serialization.swift + - Sources/Plexswift/internal/models/StopTranscodeSessionRequest+Serialization.swift + - Sources/Plexswift/internal/models/Tag+Serialization.swift + - Sources/Plexswift/internal/models/TaskName+Serialization.swift + - Sources/Plexswift/internal/models/Tonight+Serialization.swift + - Sources/Plexswift/internal/models/Trials+Serialization.swift + - Sources/Plexswift/internal/models/TypeModel+Serialization.swift + - Sources/Plexswift/internal/models/UpdatePlayProgressRequest+Serialization.swift + - Sources/Plexswift/internal/models/UpdatePlaylistRequest+Serialization.swift + - Sources/Plexswift/internal/models/UploadPlaylistRequest+Serialization.swift + - Sources/Plexswift/internal/models/Upscale+Serialization.swift + - Sources/Plexswift/internal/models/WatchedIndicator+Serialization.swift + - Sources/Plexswift/models/ModelScopes.swift + - Sources/Plexswift/models/operations/Account.swift + - Sources/Plexswift/models/operations/Activity.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsBadRequest.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsErrors.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsMediaContainer.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsMetadata.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsErrors.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsRequest.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsResponse.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsResponseBody.swift + - Sources/Plexswift/models/operations/AddPlaylistContentsUnauthorized.swift + - Sources/Plexswift/models/operations/ApplyUpdatesBadRequest.swift + - Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift + - Sources/Plexswift/models/operations/ApplyUpdatesRequest.swift + - Sources/Plexswift/models/operations/ApplyUpdatesResponse.swift + - Sources/Plexswift/models/operations/ApplyUpdatesUnauthorized.swift + - Sources/Plexswift/models/operations/ApplyUpdatesUpdaterErrors.swift + - Sources/Plexswift/models/operations/AutoSelectSubtitle.swift + - Sources/Plexswift/models/operations/Billing.swift + - Sources/Plexswift/models/operations/ButlerTask.swift + - Sources/Plexswift/models/operations/ButlerTasks.swift + - Sources/Plexswift/models/operations/CancelServerActivitiesActivitiesErrors.swift + - Sources/Plexswift/models/operations/CancelServerActivitiesBadRequest.swift + - Sources/Plexswift/models/operations/CancelServerActivitiesErrors.swift + - Sources/Plexswift/models/operations/CancelServerActivitiesRequest.swift + - Sources/Plexswift/models/operations/CancelServerActivitiesResponse.swift + - Sources/Plexswift/models/operations/CancelServerActivitiesUnauthorized.swift + - Sources/Plexswift/models/operations/CheckForUpdatesBadRequest.swift + - Sources/Plexswift/models/operations/CheckForUpdatesErrors.swift + - Sources/Plexswift/models/operations/CheckForUpdatesRequest.swift + - Sources/Plexswift/models/operations/CheckForUpdatesResponse.swift + - Sources/Plexswift/models/operations/CheckForUpdatesUnauthorized.swift + - Sources/Plexswift/models/operations/CheckForUpdatesUpdaterErrors.swift + - Sources/Plexswift/models/operations/ClearPlaylistContentsBadRequest.swift + - Sources/Plexswift/models/operations/ClearPlaylistContentsErrors.swift + - Sources/Plexswift/models/operations/ClearPlaylistContentsPlaylistsErrors.swift + - Sources/Plexswift/models/operations/ClearPlaylistContentsRequest.swift + - Sources/Plexswift/models/operations/ClearPlaylistContentsResponse.swift + - Sources/Plexswift/models/operations/ClearPlaylistContentsUnauthorized.swift + - Sources/Plexswift/models/operations/Connections.swift + - Sources/Plexswift/models/operations/Context.swift + - Sources/Plexswift/models/operations/Country.swift + - Sources/Plexswift/models/operations/CreatePlaylistBadRequest.swift + - Sources/Plexswift/models/operations/CreatePlaylistErrors.swift + - Sources/Plexswift/models/operations/CreatePlaylistMediaContainer.swift + - Sources/Plexswift/models/operations/CreatePlaylistMetadata.swift + - Sources/Plexswift/models/operations/CreatePlaylistPlaylistsErrors.swift + - Sources/Plexswift/models/operations/CreatePlaylistQueryParamType.swift + - Sources/Plexswift/models/operations/CreatePlaylistRequest.swift + - Sources/Plexswift/models/operations/CreatePlaylistResponse.swift + - Sources/Plexswift/models/operations/CreatePlaylistResponseBody.swift + - Sources/Plexswift/models/operations/CreatePlaylistUnauthorized.swift + - Sources/Plexswift/models/operations/DefaultSubtitleAccessibility.swift + - Sources/Plexswift/models/operations/DefaultSubtitleForced.swift + - Sources/Plexswift/models/operations/DeleteLibraryBadRequest.swift + - Sources/Plexswift/models/operations/DeleteLibraryErrors.swift + - Sources/Plexswift/models/operations/DeleteLibraryLibraryErrors.swift + - Sources/Plexswift/models/operations/DeleteLibraryRequest.swift + - Sources/Plexswift/models/operations/DeleteLibraryResponse.swift + - Sources/Plexswift/models/operations/DeleteLibraryUnauthorized.swift + - Sources/Plexswift/models/operations/DeletePlaylistBadRequest.swift + - Sources/Plexswift/models/operations/DeletePlaylistErrors.swift + - Sources/Plexswift/models/operations/DeletePlaylistPlaylistsErrors.swift + - Sources/Plexswift/models/operations/DeletePlaylistRequest.swift + - Sources/Plexswift/models/operations/DeletePlaylistResponse.swift + - Sources/Plexswift/models/operations/DeletePlaylistUnauthorized.swift + - Sources/Plexswift/models/operations/Device.swift + - Sources/Plexswift/models/operations/Director.swift + - Sources/Plexswift/models/operations/Directory.swift + - Sources/Plexswift/models/operations/Download.swift + - Sources/Plexswift/models/operations/EnablePaperTrailBadRequest.swift + - Sources/Plexswift/models/operations/EnablePaperTrailErrors.swift + - Sources/Plexswift/models/operations/EnablePaperTrailLogErrors.swift + - Sources/Plexswift/models/operations/EnablePaperTrailResponse.swift + - Sources/Plexswift/models/operations/EnablePaperTrailUnauthorized.swift + - Sources/Plexswift/models/operations/Errors.swift + - Sources/Plexswift/models/operations/Feature.swift + - Sources/Plexswift/models/operations/Features.swift + - Sources/Plexswift/models/operations/Field.swift + - Sources/Plexswift/models/operations/FieldType.swift + - Sources/Plexswift/models/operations/Filter.swift + - Sources/Plexswift/models/operations/Force.swift + - Sources/Plexswift/models/operations/Friend.swift + - Sources/Plexswift/models/operations/Genre.swift + - Sources/Plexswift/models/operations/GeoData.swift + - Sources/Plexswift/models/operations/GetAllLibrariesBadRequest.swift + - Sources/Plexswift/models/operations/GetAllLibrariesDirectory.swift + - Sources/Plexswift/models/operations/GetAllLibrariesErrors.swift + - Sources/Plexswift/models/operations/GetAllLibrariesLibraryErrors.swift + - Sources/Plexswift/models/operations/GetAllLibrariesMediaContainer.swift + - Sources/Plexswift/models/operations/GetAllLibrariesResponse.swift + - Sources/Plexswift/models/operations/GetAllLibrariesResponseBody.swift + - Sources/Plexswift/models/operations/GetAllLibrariesUnauthorized.swift + - Sources/Plexswift/models/operations/GetAvailableClientsBadRequest.swift + - Sources/Plexswift/models/operations/GetAvailableClientsErrors.swift + - Sources/Plexswift/models/operations/GetAvailableClientsMediaContainer.swift + - Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift + - Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift + - Sources/Plexswift/models/operations/GetAvailableClientsServerErrors.swift + - Sources/Plexswift/models/operations/GetAvailableClientsUnauthorized.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsAccount.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsBadRequest.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsDevice.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsErrors.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsMediaContainer.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsRequest.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsResponse.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsResponseBody.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsErrors.swift + - Sources/Plexswift/models/operations/GetBandwidthStatisticsUnauthorized.swift + - Sources/Plexswift/models/operations/GetBannerImageBadRequest.swift + - Sources/Plexswift/models/operations/GetBannerImageErrors.swift + - Sources/Plexswift/models/operations/GetBannerImageMediaErrors.swift + - Sources/Plexswift/models/operations/GetBannerImageRequest.swift + - Sources/Plexswift/models/operations/GetBannerImageResponse.swift + - Sources/Plexswift/models/operations/GetBannerImageUnauthorized.swift + - Sources/Plexswift/models/operations/GetButlerTasksBadRequest.swift + - Sources/Plexswift/models/operations/GetButlerTasksButlerErrors.swift + - Sources/Plexswift/models/operations/GetButlerTasksErrors.swift + - Sources/Plexswift/models/operations/GetButlerTasksResponse.swift + - Sources/Plexswift/models/operations/GetButlerTasksResponseBody.swift + - Sources/Plexswift/models/operations/GetButlerTasksUnauthorized.swift + - Sources/Plexswift/models/operations/GetCompanionsDataBadRequest.swift + - Sources/Plexswift/models/operations/GetCompanionsDataErrors.swift + - Sources/Plexswift/models/operations/GetCompanionsDataPlexErrors.swift + - Sources/Plexswift/models/operations/GetCompanionsDataResponse.swift + - Sources/Plexswift/models/operations/GetCompanionsDataUnauthorized.swift + - Sources/Plexswift/models/operations/GetDevicesBadRequest.swift + - Sources/Plexswift/models/operations/GetDevicesErrors.swift + - Sources/Plexswift/models/operations/GetDevicesMediaContainer.swift + - Sources/Plexswift/models/operations/GetDevicesResponse.swift + - Sources/Plexswift/models/operations/GetDevicesResponseBody.swift + - Sources/Plexswift/models/operations/GetDevicesServerErrors.swift + - Sources/Plexswift/models/operations/GetDevicesUnauthorized.swift + - Sources/Plexswift/models/operations/GetFileHashBadRequest.swift + - Sources/Plexswift/models/operations/GetFileHashErrors.swift + - Sources/Plexswift/models/operations/GetFileHashLibraryErrors.swift + - Sources/Plexswift/models/operations/GetFileHashRequest.swift + - Sources/Plexswift/models/operations/GetFileHashResponse.swift + - Sources/Plexswift/models/operations/GetFileHashUnauthorized.swift + - Sources/Plexswift/models/operations/GetGeoDataBadRequest.swift + - Sources/Plexswift/models/operations/GetGeoDataErrors.swift + - Sources/Plexswift/models/operations/GetGeoDataGeoData.swift + - Sources/Plexswift/models/operations/GetGeoDataPlexErrors.swift + - Sources/Plexswift/models/operations/GetGeoDataResponse.swift + - Sources/Plexswift/models/operations/GetGeoDataUnauthorized.swift + - Sources/Plexswift/models/operations/GetGlobalHubsBadRequest.swift + - Sources/Plexswift/models/operations/GetGlobalHubsErrors.swift + - Sources/Plexswift/models/operations/GetGlobalHubsHubsErrors.swift + - Sources/Plexswift/models/operations/GetGlobalHubsMediaContainer.swift + - Sources/Plexswift/models/operations/GetGlobalHubsMetadata.swift + - Sources/Plexswift/models/operations/GetGlobalHubsRequest.swift + - Sources/Plexswift/models/operations/GetGlobalHubsResponse.swift + - Sources/Plexswift/models/operations/GetGlobalHubsResponseBody.swift + - Sources/Plexswift/models/operations/GetGlobalHubsUnauthorized.swift + - Sources/Plexswift/models/operations/GetHomeDataBadRequest.swift + - Sources/Plexswift/models/operations/GetHomeDataErrors.swift + - Sources/Plexswift/models/operations/GetHomeDataPlexErrors.swift + - Sources/Plexswift/models/operations/GetHomeDataResponse.swift + - Sources/Plexswift/models/operations/GetHomeDataResponseBody.swift + - Sources/Plexswift/models/operations/GetHomeDataUnauthorized.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsBadRequest.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsDirectory.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsErrors.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsFilter.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsLibraryErrors.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsMediaContainer.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsRequest.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsResponse.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsResponseBody.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsType.swift + - Sources/Plexswift/models/operations/GetLibraryDetailsUnauthorized.swift + - Sources/Plexswift/models/operations/GetLibraryHubsBadRequest.swift + - Sources/Plexswift/models/operations/GetLibraryHubsCountry.swift + - Sources/Plexswift/models/operations/GetLibraryHubsDirector.swift + - Sources/Plexswift/models/operations/GetLibraryHubsErrors.swift + - Sources/Plexswift/models/operations/GetLibraryHubsGenre.swift + - Sources/Plexswift/models/operations/GetLibraryHubsHub.swift + - Sources/Plexswift/models/operations/GetLibraryHubsHubsErrors.swift + - Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift + - Sources/Plexswift/models/operations/GetLibraryHubsMediaContainer.swift + - Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift + - Sources/Plexswift/models/operations/GetLibraryHubsPart.swift + - Sources/Plexswift/models/operations/GetLibraryHubsRequest.swift + - Sources/Plexswift/models/operations/GetLibraryHubsResponse.swift + - Sources/Plexswift/models/operations/GetLibraryHubsResponseBody.swift + - Sources/Plexswift/models/operations/GetLibraryHubsRole.swift + - Sources/Plexswift/models/operations/GetLibraryHubsUnauthorized.swift + - Sources/Plexswift/models/operations/GetLibraryHubsWriter.swift + - Sources/Plexswift/models/operations/GetLibraryItemsBadRequest.swift + - Sources/Plexswift/models/operations/GetLibraryItemsCountry.swift + - Sources/Plexswift/models/operations/GetLibraryItemsDirector.swift + - Sources/Plexswift/models/operations/GetLibraryItemsErrors.swift + - Sources/Plexswift/models/operations/GetLibraryItemsGenre.swift + - Sources/Plexswift/models/operations/GetLibraryItemsLibraryErrors.swift + - Sources/Plexswift/models/operations/GetLibraryItemsMedia.swift + - Sources/Plexswift/models/operations/GetLibraryItemsMediaContainer.swift + - Sources/Plexswift/models/operations/GetLibraryItemsMetadata.swift + - Sources/Plexswift/models/operations/GetLibraryItemsPart.swift + - Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift + - Sources/Plexswift/models/operations/GetLibraryItemsResponse.swift + - Sources/Plexswift/models/operations/GetLibraryItemsResponseBody.swift + - Sources/Plexswift/models/operations/GetLibraryItemsRole.swift + - Sources/Plexswift/models/operations/GetLibraryItemsUnauthorized.swift + - Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift + - Sources/Plexswift/models/operations/GetMediaProvidersBadRequest.swift + - Sources/Plexswift/models/operations/GetMediaProvidersDirectory.swift + - Sources/Plexswift/models/operations/GetMediaProvidersErrors.swift + - Sources/Plexswift/models/operations/GetMediaProvidersMediaContainer.swift + - Sources/Plexswift/models/operations/GetMediaProvidersRequest.swift + - Sources/Plexswift/models/operations/GetMediaProvidersResponse.swift + - Sources/Plexswift/models/operations/GetMediaProvidersResponseBody.swift + - Sources/Plexswift/models/operations/GetMediaProvidersServerErrors.swift + - Sources/Plexswift/models/operations/GetMediaProvidersUnauthorized.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift + - Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenBadRequest.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenDirectory.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenErrors.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenLibraryErrors.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenMediaContainer.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenMetadata.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenRequest.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenResponse.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenResponseBody.swift + - Sources/Plexswift/models/operations/GetMetadataChildrenUnauthorized.swift + - Sources/Plexswift/models/operations/GetMyPlexAccountBadRequest.swift + - Sources/Plexswift/models/operations/GetMyPlexAccountErrors.swift + - Sources/Plexswift/models/operations/GetMyPlexAccountResponse.swift + - Sources/Plexswift/models/operations/GetMyPlexAccountResponseBody.swift + - Sources/Plexswift/models/operations/GetMyPlexAccountServerErrors.swift + - Sources/Plexswift/models/operations/GetMyPlexAccountUnauthorized.swift + - Sources/Plexswift/models/operations/GetOnDeckBadRequest.swift + - Sources/Plexswift/models/operations/GetOnDeckErrors.swift + - Sources/Plexswift/models/operations/GetOnDeckGuids.swift + - Sources/Plexswift/models/operations/GetOnDeckLibraryErrors.swift + - Sources/Plexswift/models/operations/GetOnDeckMedia.swift + - Sources/Plexswift/models/operations/GetOnDeckMediaContainer.swift + - Sources/Plexswift/models/operations/GetOnDeckMetadata.swift + - Sources/Plexswift/models/operations/GetOnDeckPart.swift + - Sources/Plexswift/models/operations/GetOnDeckResponse.swift + - Sources/Plexswift/models/operations/GetOnDeckResponseBody.swift + - Sources/Plexswift/models/operations/GetOnDeckStream.swift + - Sources/Plexswift/models/operations/GetOnDeckUnauthorized.swift + - Sources/Plexswift/models/operations/GetPinAuthPinContainer.swift + - Sources/Plexswift/models/operations/GetPinBadRequest.swift + - Sources/Plexswift/models/operations/GetPinErrors.swift + - Sources/Plexswift/models/operations/GetPinRequest.swift + - Sources/Plexswift/models/operations/GetPinResponse.swift + - Sources/Plexswift/models/operations/GetPlaylistBadRequest.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsBadRequest.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsCountry.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsDirector.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsErrors.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsGenre.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsMedia.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsMediaContainer.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsMetadata.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsPart.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsErrors.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsResponse.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsResponseBody.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsRole.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsUnauthorized.swift + - Sources/Plexswift/models/operations/GetPlaylistContentsWriter.swift + - Sources/Plexswift/models/operations/GetPlaylistErrors.swift + - Sources/Plexswift/models/operations/GetPlaylistMediaContainer.swift + - Sources/Plexswift/models/operations/GetPlaylistMetadata.swift + - Sources/Plexswift/models/operations/GetPlaylistPlaylistsErrors.swift + - Sources/Plexswift/models/operations/GetPlaylistRequest.swift + - Sources/Plexswift/models/operations/GetPlaylistResponse.swift + - Sources/Plexswift/models/operations/GetPlaylistResponseBody.swift + - Sources/Plexswift/models/operations/GetPlaylistUnauthorized.swift + - Sources/Plexswift/models/operations/GetPlaylistsBadRequest.swift + - Sources/Plexswift/models/operations/GetPlaylistsErrors.swift + - Sources/Plexswift/models/operations/GetPlaylistsMediaContainer.swift + - Sources/Plexswift/models/operations/GetPlaylistsMetadata.swift + - Sources/Plexswift/models/operations/GetPlaylistsPlaylistsErrors.swift + - Sources/Plexswift/models/operations/GetPlaylistsRequest.swift + - Sources/Plexswift/models/operations/GetPlaylistsResponse.swift + - Sources/Plexswift/models/operations/GetPlaylistsResponseBody.swift + - Sources/Plexswift/models/operations/GetPlaylistsUnauthorized.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedBadRequest.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedErrors.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedLibraryErrors.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedMediaContainer.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedMetadata.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedResponse.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedResponseBody.swift + - Sources/Plexswift/models/operations/GetRecentlyAddedUnauthorized.swift + - Sources/Plexswift/models/operations/GetRefreshLibraryMetadataBadRequest.swift + - Sources/Plexswift/models/operations/GetRefreshLibraryMetadataErrors.swift + - Sources/Plexswift/models/operations/GetRefreshLibraryMetadataLibraryErrors.swift + - Sources/Plexswift/models/operations/GetRefreshLibraryMetadataRequest.swift + - Sources/Plexswift/models/operations/GetRefreshLibraryMetadataResponse.swift + - Sources/Plexswift/models/operations/GetRefreshLibraryMetadataUnauthorized.swift + - Sources/Plexswift/models/operations/GetResizedPhotoBadRequest.swift + - Sources/Plexswift/models/operations/GetResizedPhotoErrors.swift + - Sources/Plexswift/models/operations/GetResizedPhotoRequest.swift + - Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift + - Sources/Plexswift/models/operations/GetResizedPhotoServerErrors.swift + - Sources/Plexswift/models/operations/GetResizedPhotoUnauthorized.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsBadRequest.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsErrors.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsMediaContainer.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsRequest.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsResponse.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsResponseBody.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsErrors.swift + - Sources/Plexswift/models/operations/GetResourcesStatisticsUnauthorized.swift + - Sources/Plexswift/models/operations/GetSearchLibraryBadRequest.swift + - Sources/Plexswift/models/operations/GetSearchLibraryErrors.swift + - Sources/Plexswift/models/operations/GetSearchLibraryLibraryErrors.swift + - Sources/Plexswift/models/operations/GetSearchLibraryMediaContainer.swift + - Sources/Plexswift/models/operations/GetSearchLibraryMetadata.swift + - Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift + - Sources/Plexswift/models/operations/GetSearchLibraryResponse.swift + - Sources/Plexswift/models/operations/GetSearchLibraryResponseBody.swift + - Sources/Plexswift/models/operations/GetSearchLibraryUnauthorized.swift + - Sources/Plexswift/models/operations/GetSearchResultsBadRequest.swift + - Sources/Plexswift/models/operations/GetSearchResultsCountry.swift + - Sources/Plexswift/models/operations/GetSearchResultsDirector.swift + - Sources/Plexswift/models/operations/GetSearchResultsErrors.swift + - Sources/Plexswift/models/operations/GetSearchResultsGenre.swift + - Sources/Plexswift/models/operations/GetSearchResultsMedia.swift + - Sources/Plexswift/models/operations/GetSearchResultsMediaContainer.swift + - Sources/Plexswift/models/operations/GetSearchResultsMetadata.swift + - Sources/Plexswift/models/operations/GetSearchResultsPart.swift + - Sources/Plexswift/models/operations/GetSearchResultsRequest.swift + - Sources/Plexswift/models/operations/GetSearchResultsResponse.swift + - Sources/Plexswift/models/operations/GetSearchResultsResponseBody.swift + - Sources/Plexswift/models/operations/GetSearchResultsRole.swift + - Sources/Plexswift/models/operations/GetSearchResultsSearchErrors.swift + - Sources/Plexswift/models/operations/GetSearchResultsUnauthorized.swift + - Sources/Plexswift/models/operations/GetSearchResultsWriter.swift + - Sources/Plexswift/models/operations/GetServerActivitiesActivitiesErrors.swift + - Sources/Plexswift/models/operations/GetServerActivitiesBadRequest.swift + - Sources/Plexswift/models/operations/GetServerActivitiesErrors.swift + - Sources/Plexswift/models/operations/GetServerActivitiesMediaContainer.swift + - Sources/Plexswift/models/operations/GetServerActivitiesResponse.swift + - Sources/Plexswift/models/operations/GetServerActivitiesResponseBody.swift + - Sources/Plexswift/models/operations/GetServerActivitiesUnauthorized.swift + - Sources/Plexswift/models/operations/GetServerCapabilitiesBadRequest.swift + - Sources/Plexswift/models/operations/GetServerCapabilitiesErrors.swift + - Sources/Plexswift/models/operations/GetServerCapabilitiesResponse.swift + - Sources/Plexswift/models/operations/GetServerCapabilitiesResponseBody.swift + - Sources/Plexswift/models/operations/GetServerCapabilitiesUnauthorized.swift + - Sources/Plexswift/models/operations/GetServerIdentityMediaContainer.swift + - Sources/Plexswift/models/operations/GetServerIdentityRequestTimeout.swift + - Sources/Plexswift/models/operations/GetServerIdentityResponse.swift + - Sources/Plexswift/models/operations/GetServerIdentityResponseBody.swift + - Sources/Plexswift/models/operations/GetServerListBadRequest.swift + - Sources/Plexswift/models/operations/GetServerListErrors.swift + - Sources/Plexswift/models/operations/GetServerListMediaContainer.swift + - Sources/Plexswift/models/operations/GetServerListResponse.swift + - Sources/Plexswift/models/operations/GetServerListResponseBody.swift + - Sources/Plexswift/models/operations/GetServerListServer.swift + - Sources/Plexswift/models/operations/GetServerListServerErrors.swift + - Sources/Plexswift/models/operations/GetServerListUnauthorized.swift + - Sources/Plexswift/models/operations/GetServerPreferencesBadRequest.swift + - Sources/Plexswift/models/operations/GetServerPreferencesErrors.swift + - Sources/Plexswift/models/operations/GetServerPreferencesMediaContainer.swift + - Sources/Plexswift/models/operations/GetServerPreferencesResponse.swift + - Sources/Plexswift/models/operations/GetServerPreferencesResponseBody.swift + - Sources/Plexswift/models/operations/GetServerPreferencesServerErrors.swift + - Sources/Plexswift/models/operations/GetServerPreferencesUnauthorized.swift + - Sources/Plexswift/models/operations/GetServerResourcesBadRequest.swift + - Sources/Plexswift/models/operations/GetServerResourcesErrors.swift + - Sources/Plexswift/models/operations/GetServerResourcesPlexErrors.swift + - Sources/Plexswift/models/operations/GetServerResourcesRequest.swift + - Sources/Plexswift/models/operations/GetServerResourcesResponse.swift + - Sources/Plexswift/models/operations/GetServerResourcesUnauthorized.swift + - Sources/Plexswift/models/operations/GetSessionHistoryBadRequest.swift + - Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift + - Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift + - Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift + - Sources/Plexswift/models/operations/GetSessionHistoryRequest.swift + - Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift + - Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift + - Sources/Plexswift/models/operations/GetSessionHistorySessionsErrors.swift + - Sources/Plexswift/models/operations/GetSessionHistoryUnauthorized.swift + - Sources/Plexswift/models/operations/GetSessionsBadRequest.swift + - Sources/Plexswift/models/operations/GetSessionsErrors.swift + - Sources/Plexswift/models/operations/GetSessionsMedia.swift + - Sources/Plexswift/models/operations/GetSessionsMediaContainer.swift + - Sources/Plexswift/models/operations/GetSessionsMetadata.swift + - Sources/Plexswift/models/operations/GetSessionsPart.swift + - Sources/Plexswift/models/operations/GetSessionsResponse.swift + - Sources/Plexswift/models/operations/GetSessionsResponseBody.swift + - Sources/Plexswift/models/operations/GetSessionsSessionsErrors.swift + - Sources/Plexswift/models/operations/GetSessionsStream.swift + - Sources/Plexswift/models/operations/GetSessionsUnauthorized.swift + - Sources/Plexswift/models/operations/GetSessionsUser.swift + - Sources/Plexswift/models/operations/GetSourceConnectionInformationAuthenticationErrors.swift + - Sources/Plexswift/models/operations/GetSourceConnectionInformationBadRequest.swift + - Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift + - Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift + - Sources/Plexswift/models/operations/GetSourceConnectionInformationResponse.swift + - Sources/Plexswift/models/operations/GetSourceConnectionInformationUnauthorized.swift + - Sources/Plexswift/models/operations/GetStatisticsBadRequest.swift + - Sources/Plexswift/models/operations/GetStatisticsDevice.swift + - Sources/Plexswift/models/operations/GetStatisticsErrors.swift + - Sources/Plexswift/models/operations/GetStatisticsMediaContainer.swift + - Sources/Plexswift/models/operations/GetStatisticsRequest.swift + - Sources/Plexswift/models/operations/GetStatisticsResponse.swift + - Sources/Plexswift/models/operations/GetStatisticsResponseBody.swift + - Sources/Plexswift/models/operations/GetStatisticsStatisticsErrors.swift + - Sources/Plexswift/models/operations/GetStatisticsUnauthorized.swift + - Sources/Plexswift/models/operations/GetThumbImageBadRequest.swift + - Sources/Plexswift/models/operations/GetThumbImageErrors.swift + - Sources/Plexswift/models/operations/GetThumbImageMediaErrors.swift + - Sources/Plexswift/models/operations/GetThumbImageRequest.swift + - Sources/Plexswift/models/operations/GetThumbImageResponse.swift + - Sources/Plexswift/models/operations/GetThumbImageUnauthorized.swift + - Sources/Plexswift/models/operations/GetTimelineBadRequest.swift + - Sources/Plexswift/models/operations/GetTimelineErrors.swift + - Sources/Plexswift/models/operations/GetTimelineRequest.swift + - Sources/Plexswift/models/operations/GetTimelineResponse.swift + - Sources/Plexswift/models/operations/GetTimelineUnauthorized.swift + - Sources/Plexswift/models/operations/GetTimelineVideoErrors.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdAuthPinContainer.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdBadRequest.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdErrors.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdGeoData.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdPlexErrors.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdRequest.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdResponse.swift + - Sources/Plexswift/models/operations/GetTokenByPinIdResponseBody.swift + - Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationErrors.swift + - Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationResponseStatus.swift + - Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationStatus.swift + - Sources/Plexswift/models/operations/GetTokenDetailsBadRequest.swift + - Sources/Plexswift/models/operations/GetTokenDetailsErrors.swift + - Sources/Plexswift/models/operations/GetTokenDetailsFeatures.swift + - Sources/Plexswift/models/operations/GetTokenDetailsResponse.swift + - Sources/Plexswift/models/operations/GetTokenDetailsStatus.swift + - Sources/Plexswift/models/operations/GetTokenDetailsSubscription.swift + - Sources/Plexswift/models/operations/GetTokenDetailsUnauthorized.swift + - Sources/Plexswift/models/operations/GetTokenDetailsUserPlexAccount.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentBadRequest.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentCountry.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentErrors.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentGenre.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentGuids.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentLibraryErrors.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentMediaContainer.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentMetadata.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentResponse.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentResponseBody.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentRole.swift + - Sources/Plexswift/models/operations/GetTopWatchedContentUnauthorized.swift + - Sources/Plexswift/models/operations/GetTranscodeSessionsBadRequest.swift + - Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift + - Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift + - Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift + - Sources/Plexswift/models/operations/GetTranscodeSessionsResponseBody.swift + - Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsErrors.swift + - Sources/Plexswift/models/operations/GetTranscodeSessionsUnauthorized.swift + - Sources/Plexswift/models/operations/GetTransientTokenAuthenticationErrors.swift + - Sources/Plexswift/models/operations/GetTransientTokenBadRequest.swift + - Sources/Plexswift/models/operations/GetTransientTokenErrors.swift + - Sources/Plexswift/models/operations/GetTransientTokenQueryParamType.swift + - Sources/Plexswift/models/operations/GetTransientTokenRequest.swift + - Sources/Plexswift/models/operations/GetTransientTokenResponse.swift + - Sources/Plexswift/models/operations/GetTransientTokenUnauthorized.swift + - Sources/Plexswift/models/operations/GetUpdateStatusBadRequest.swift + - Sources/Plexswift/models/operations/GetUpdateStatusErrors.swift + - Sources/Plexswift/models/operations/GetUpdateStatusMediaContainer.swift + - Sources/Plexswift/models/operations/GetUpdateStatusResponse.swift + - Sources/Plexswift/models/operations/GetUpdateStatusResponseBody.swift + - Sources/Plexswift/models/operations/GetUpdateStatusUnauthorized.swift + - Sources/Plexswift/models/operations/GetUpdateStatusUpdaterErrors.swift + - Sources/Plexswift/models/operations/GetUserFriendsBadRequest.swift + - Sources/Plexswift/models/operations/GetUserFriendsErrors.swift + - Sources/Plexswift/models/operations/GetUserFriendsPlexErrors.swift + - Sources/Plexswift/models/operations/GetUserFriendsResponse.swift + - Sources/Plexswift/models/operations/GetUserFriendsUnauthorized.swift + - Sources/Plexswift/models/operations/GetWatchListBadRequest.swift + - Sources/Plexswift/models/operations/GetWatchListErrors.swift + - Sources/Plexswift/models/operations/GetWatchListRequest.swift + - Sources/Plexswift/models/operations/GetWatchListResponse.swift + - Sources/Plexswift/models/operations/GetWatchListResponseBody.swift + - Sources/Plexswift/models/operations/GetWatchListUnauthorized.swift + - Sources/Plexswift/models/operations/GetWatchListWatchlistErrors.swift + - Sources/Plexswift/models/operations/Guids.swift + - Sources/Plexswift/models/operations/Hub.swift + - Sources/Plexswift/models/operations/Image.swift + - Sources/Plexswift/models/operations/IncludeCollections.swift + - Sources/Plexswift/models/operations/IncludeDetails.swift + - Sources/Plexswift/models/operations/IncludeExternalMedia.swift + - Sources/Plexswift/models/operations/IncludeGuids.swift + - Sources/Plexswift/models/operations/IncludeHttps.swift + - Sources/Plexswift/models/operations/IncludeIPv6.swift + - Sources/Plexswift/models/operations/IncludeMeta.swift + - Sources/Plexswift/models/operations/IncludeRelay.swift + - Sources/Plexswift/models/operations/InternalPaymentMethod.swift + - Sources/Plexswift/models/operations/Level.swift + - Sources/Plexswift/models/operations/LibrarySectionID.swift + - Sources/Plexswift/models/operations/Libtype.swift + - Sources/Plexswift/models/operations/Location.swift + - Sources/Plexswift/models/operations/LogLineBadRequest.swift + - Sources/Plexswift/models/operations/LogLineErrors.swift + - Sources/Plexswift/models/operations/LogLineLogErrors.swift + - Sources/Plexswift/models/operations/LogLineRequest.swift + - Sources/Plexswift/models/operations/LogLineResponse.swift + - Sources/Plexswift/models/operations/LogLineUnauthorized.swift + - Sources/Plexswift/models/operations/LogMultiLineBadRequest.swift + - Sources/Plexswift/models/operations/LogMultiLineErrors.swift + - Sources/Plexswift/models/operations/LogMultiLineLogErrors.swift + - Sources/Plexswift/models/operations/LogMultiLineResponse.swift + - Sources/Plexswift/models/operations/LogMultiLineUnauthorized.swift + - Sources/Plexswift/models/operations/MailingListStatus.swift + - Sources/Plexswift/models/operations/MarkPlayedBadRequest.swift + - Sources/Plexswift/models/operations/MarkPlayedErrors.swift + - Sources/Plexswift/models/operations/MarkPlayedMediaErrors.swift + - Sources/Plexswift/models/operations/MarkPlayedRequest.swift + - Sources/Plexswift/models/operations/MarkPlayedResponse.swift + - Sources/Plexswift/models/operations/MarkPlayedUnauthorized.swift + - Sources/Plexswift/models/operations/MarkUnplayedBadRequest.swift + - Sources/Plexswift/models/operations/MarkUnplayedErrors.swift + - Sources/Plexswift/models/operations/MarkUnplayedMediaErrors.swift + - Sources/Plexswift/models/operations/MarkUnplayedRequest.swift + - Sources/Plexswift/models/operations/MarkUnplayedResponse.swift + - Sources/Plexswift/models/operations/MarkUnplayedUnauthorized.swift + - Sources/Plexswift/models/operations/Media.swift + - Sources/Plexswift/models/operations/MediaContainer.swift + - Sources/Plexswift/models/operations/MediaProvider.swift + - Sources/Plexswift/models/operations/MediaReviewsVisibility.swift + - Sources/Plexswift/models/operations/Metadata.swift + - Sources/Plexswift/models/operations/MinSize.swift + - Sources/Plexswift/models/operations/MyPlex.swift + - Sources/Plexswift/models/operations/OnlyTransient.swift + - Sources/Plexswift/models/operations/Operator.swift + - Sources/Plexswift/models/operations/Part.swift + - Sources/Plexswift/models/operations/PastSubscription.swift + - Sources/Plexswift/models/operations/PathParamTaskName.swift + - Sources/Plexswift/models/operations/PerformSearchBadRequest.swift + - Sources/Plexswift/models/operations/PerformSearchErrors.swift + - Sources/Plexswift/models/operations/PerformSearchRequest.swift + - Sources/Plexswift/models/operations/PerformSearchResponse.swift + - Sources/Plexswift/models/operations/PerformSearchSearchErrors.swift + - Sources/Plexswift/models/operations/PerformSearchUnauthorized.swift + - Sources/Plexswift/models/operations/PerformVoiceSearchBadRequest.swift + - Sources/Plexswift/models/operations/PerformVoiceSearchErrors.swift + - Sources/Plexswift/models/operations/PerformVoiceSearchRequest.swift + - Sources/Plexswift/models/operations/PerformVoiceSearchResponse.swift + - Sources/Plexswift/models/operations/PerformVoiceSearchSearchErrors.swift + - Sources/Plexswift/models/operations/PerformVoiceSearchUnauthorized.swift + - Sources/Plexswift/models/operations/Pivot.swift + - Sources/Plexswift/models/operations/Player.swift + - Sources/Plexswift/models/operations/PlaylistType.swift + - Sources/Plexswift/models/operations/PlexDevice.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationErrors.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationFeatures.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationResponseStatus.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationStatus.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationSubscription.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataAutoSelectSubtitle.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataBadRequest.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleForced.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataErrors.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataFeatures.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataMailingListStatus.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataMediaReviewsVisibility.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataRequest.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataRequestBody.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataResponse.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataServices.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataState.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataStatus.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataSubscription.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataUnauthorized.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataUserPlexAccount.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataUserProfile.swift + - Sources/Plexswift/models/operations/PostUsersSignInDataWatchedIndicator.swift + - Sources/Plexswift/models/operations/Producer.swift + - Sources/Plexswift/models/operations/Provider.swift + - Sources/Plexswift/models/operations/QueryParamFilter.swift + - Sources/Plexswift/models/operations/QueryParamForce.swift + - Sources/Plexswift/models/operations/QueryParamOnlyTransient.swift + - Sources/Plexswift/models/operations/QueryParamSmart.swift + - Sources/Plexswift/models/operations/QueryParamType.swift + - Sources/Plexswift/models/operations/Ratings.swift + - Sources/Plexswift/models/operations/Release.swift + - Sources/Plexswift/models/operations/ResponseBody.swift + - Sources/Plexswift/models/operations/Role.swift + - Sources/Plexswift/models/operations/Scope.swift + - Sources/Plexswift/models/operations/Server.swift + - Sources/Plexswift/models/operations/Services.swift + - Sources/Plexswift/models/operations/Session.swift + - Sources/Plexswift/models/operations/Setting.swift + - Sources/Plexswift/models/operations/SharedServers.swift + - Sources/Plexswift/models/operations/SharedSources.swift + - Sources/Plexswift/models/operations/Skip.swift + - Sources/Plexswift/models/operations/Smart.swift + - Sources/Plexswift/models/operations/Sort.swift + - Sources/Plexswift/models/operations/StartAllTasksBadRequest.swift + - Sources/Plexswift/models/operations/StartAllTasksButlerErrors.swift + - Sources/Plexswift/models/operations/StartAllTasksErrors.swift + - Sources/Plexswift/models/operations/StartAllTasksResponse.swift + - Sources/Plexswift/models/operations/StartAllTasksUnauthorized.swift + - Sources/Plexswift/models/operations/StartTaskBadRequest.swift + - Sources/Plexswift/models/operations/StartTaskButlerErrors.swift + - Sources/Plexswift/models/operations/StartTaskErrors.swift + - Sources/Plexswift/models/operations/StartTaskRequest.swift + - Sources/Plexswift/models/operations/StartTaskResponse.swift + - Sources/Plexswift/models/operations/StartTaskUnauthorized.swift + - Sources/Plexswift/models/operations/StartUniversalTranscodeBadRequest.swift + - Sources/Plexswift/models/operations/StartUniversalTranscodeErrors.swift + - Sources/Plexswift/models/operations/StartUniversalTranscodeRequest.swift + - Sources/Plexswift/models/operations/StartUniversalTranscodeResponse.swift + - Sources/Plexswift/models/operations/StartUniversalTranscodeUnauthorized.swift + - Sources/Plexswift/models/operations/StartUniversalTranscodeVideoErrors.swift + - Sources/Plexswift/models/operations/State.swift + - Sources/Plexswift/models/operations/StatisticsBandwidth.swift + - Sources/Plexswift/models/operations/StatisticsMedia.swift + - Sources/Plexswift/models/operations/StatisticsResources.swift + - Sources/Plexswift/models/operations/Status.swift + - Sources/Plexswift/models/operations/StopAllTasksBadRequest.swift + - Sources/Plexswift/models/operations/StopAllTasksButlerErrors.swift + - Sources/Plexswift/models/operations/StopAllTasksErrors.swift + - Sources/Plexswift/models/operations/StopAllTasksResponse.swift + - Sources/Plexswift/models/operations/StopAllTasksUnauthorized.swift + - Sources/Plexswift/models/operations/StopTaskBadRequest.swift + - Sources/Plexswift/models/operations/StopTaskButlerErrors.swift + - Sources/Plexswift/models/operations/StopTaskErrors.swift + - Sources/Plexswift/models/operations/StopTaskRequest.swift + - Sources/Plexswift/models/operations/StopTaskResponse.swift + - Sources/Plexswift/models/operations/StopTaskUnauthorized.swift + - Sources/Plexswift/models/operations/StopTranscodeSessionBadRequest.swift + - Sources/Plexswift/models/operations/StopTranscodeSessionErrors.swift + - Sources/Plexswift/models/operations/StopTranscodeSessionRequest.swift + - Sources/Plexswift/models/operations/StopTranscodeSessionResponse.swift + - Sources/Plexswift/models/operations/StopTranscodeSessionSessionsErrors.swift + - Sources/Plexswift/models/operations/StopTranscodeSessionUnauthorized.swift + - Sources/Plexswift/models/operations/Stream.swift + - Sources/Plexswift/models/operations/Subscription.swift + - Sources/Plexswift/models/operations/Tag.swift + - Sources/Plexswift/models/operations/TaskName.swift + - Sources/Plexswift/models/operations/Tonight.swift + - Sources/Plexswift/models/operations/TranscodeSession.swift + - Sources/Plexswift/models/operations/Trials.swift + - Sources/Plexswift/models/operations/TypeModel.swift + - Sources/Plexswift/models/operations/UpdatePlayProgressBadRequest.swift + - Sources/Plexswift/models/operations/UpdatePlayProgressErrors.swift + - Sources/Plexswift/models/operations/UpdatePlayProgressMediaErrors.swift + - Sources/Plexswift/models/operations/UpdatePlayProgressRequest.swift + - Sources/Plexswift/models/operations/UpdatePlayProgressResponse.swift + - Sources/Plexswift/models/operations/UpdatePlayProgressUnauthorized.swift + - Sources/Plexswift/models/operations/UpdatePlaylistBadRequest.swift + - Sources/Plexswift/models/operations/UpdatePlaylistErrors.swift + - Sources/Plexswift/models/operations/UpdatePlaylistPlaylistsErrors.swift + - Sources/Plexswift/models/operations/UpdatePlaylistRequest.swift + - Sources/Plexswift/models/operations/UpdatePlaylistResponse.swift + - Sources/Plexswift/models/operations/UpdatePlaylistUnauthorized.swift + - Sources/Plexswift/models/operations/UploadPlaylistBadRequest.swift + - Sources/Plexswift/models/operations/UploadPlaylistErrors.swift + - Sources/Plexswift/models/operations/UploadPlaylistPlaylistsErrors.swift + - Sources/Plexswift/models/operations/UploadPlaylistRequest.swift + - Sources/Plexswift/models/operations/UploadPlaylistResponse.swift + - Sources/Plexswift/models/operations/UploadPlaylistUnauthorized.swift + - Sources/Plexswift/models/operations/Upscale.swift + - Sources/Plexswift/models/operations/User.swift + - Sources/Plexswift/models/operations/UserProfile.swift + - Sources/Plexswift/models/operations/WatchedIndicator.swift + - Sources/Plexswift/models/operations/Writer.swift + - Sources/Plexswift/models/shared/Security.swift - Sources/plexswift/AnyValue.swift + - Sources/plexswift/PlexswiftAPI.swift + - Sources/plexswift/PlexswiftError.swift - Sources/plexswift/internal/api/Client+PlexswiftAPI.swift - Sources/plexswift/internal/client/Response.swift - Sources/plexswift/internal/client/Servers.swift @@ -56,530 +866,923 @@ generatedFiles: - Sources/plexswift/internal/serialization/QueryParameters.swift - Sources/plexswift/internal/serialization/SecurityParameters.swift - Sources/plexswift/internal/serialization/Serializable.swift - - Sources/plexswift/PlexswiftError.swift - - Sources/plexswift/PlexswiftAPI.swift - - Sources/Plexswift/models/ModelScopes.swift - - Sources/Plexswift/models/operations/Account.swift - - Sources/Plexswift/models/operations/Activity.swift - - Sources/Plexswift/models/operations/AddPlaylistContentsErrors.swift - - Sources/Plexswift/models/operations/AddPlaylistContentsMediaContainer.swift - - Sources/Plexswift/models/operations/AddPlaylistContentsMetadata.swift - - Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsResponseBody.swift - - Sources/Plexswift/models/operations/AddPlaylistContentsRequest.swift - - Sources/Plexswift/internal/models/AddPlaylistContentsRequest+Serialization.swift - - Sources/Plexswift/models/operations/AddPlaylistContentsResponse.swift - - Sources/Plexswift/models/operations/AddPlaylistContentsResponseBody.swift - - Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift - - Sources/Plexswift/models/operations/ApplyUpdatesRequest.swift - - Sources/Plexswift/internal/models/ApplyUpdatesRequest+Serialization.swift - - Sources/Plexswift/models/operations/ApplyUpdatesResponse.swift - - Sources/Plexswift/models/operations/ApplyUpdatesResponseBody.swift - - Sources/Plexswift/models/operations/ButlerTask.swift - - Sources/Plexswift/models/operations/ButlerTasks.swift - - Sources/Plexswift/models/operations/CancelServerActivitiesErrors.swift - - Sources/Plexswift/models/operations/CancelServerActivitiesRequest.swift - - Sources/Plexswift/internal/models/CancelServerActivitiesRequest+Serialization.swift - - Sources/Plexswift/models/operations/CancelServerActivitiesResponse.swift - - Sources/Plexswift/models/operations/CancelServerActivitiesResponseBody.swift - - Sources/Plexswift/models/operations/CheckForUpdatesErrors.swift - - Sources/Plexswift/models/operations/CheckForUpdatesRequest.swift - - Sources/Plexswift/internal/models/CheckForUpdatesRequest+Serialization.swift - - Sources/Plexswift/models/operations/CheckForUpdatesResponse.swift - - Sources/Plexswift/models/operations/CheckForUpdatesResponseBody.swift - - Sources/Plexswift/models/operations/ClearPlaylistContentsErrors.swift - - Sources/Plexswift/models/operations/ClearPlaylistContentsRequest.swift - - Sources/Plexswift/internal/models/ClearPlaylistContentsRequest+Serialization.swift - - Sources/Plexswift/models/operations/ClearPlaylistContentsResponse.swift - - Sources/Plexswift/models/operations/ClearPlaylistContentsResponseBody.swift - - Sources/Plexswift/models/operations/Context.swift - - Sources/Plexswift/models/operations/Country.swift - - Sources/Plexswift/models/operations/CreatePlaylistErrors.swift - - Sources/Plexswift/models/operations/CreatePlaylistMediaContainer.swift - - Sources/Plexswift/models/operations/CreatePlaylistMetadata.swift - - Sources/Plexswift/models/operations/CreatePlaylistPlaylistsResponseBody.swift - - Sources/Plexswift/models/operations/CreatePlaylistRequest.swift - - Sources/Plexswift/internal/models/CreatePlaylistRequest+Serialization.swift - - Sources/Plexswift/models/operations/CreatePlaylistResponse.swift - - Sources/Plexswift/models/operations/CreatePlaylistResponseBody.swift - - Sources/Plexswift/models/operations/DeleteLibraryErrors.swift - - Sources/Plexswift/models/operations/DeleteLibraryRequest.swift - - Sources/Plexswift/internal/models/DeleteLibraryRequest+Serialization.swift - - Sources/Plexswift/models/operations/DeleteLibraryResponse.swift - - Sources/Plexswift/models/operations/DeleteLibraryResponseBody.swift - - Sources/Plexswift/models/operations/DeletePlaylistErrors.swift - - Sources/Plexswift/models/operations/DeletePlaylistRequest.swift - - Sources/Plexswift/internal/models/DeletePlaylistRequest+Serialization.swift - - Sources/Plexswift/models/operations/DeletePlaylistResponse.swift - - Sources/Plexswift/models/operations/DeletePlaylistResponseBody.swift - - Sources/Plexswift/models/operations/Device.swift - - Sources/Plexswift/models/operations/Director.swift - - Sources/Plexswift/models/operations/Directory.swift - - Sources/Plexswift/models/operations/Download.swift - - Sources/Plexswift/internal/models/Download+Serialization.swift - - Sources/Plexswift/models/operations/EnablePaperTrailErrors.swift - - Sources/Plexswift/models/operations/EnablePaperTrailResponse.swift - - Sources/Plexswift/models/operations/EnablePaperTrailResponseBody.swift - - Sources/Plexswift/models/operations/Errors.swift - - Sources/Plexswift/models/operations/Field.swift - - Sources/Plexswift/models/operations/FieldType.swift - - Sources/Plexswift/models/operations/Filter.swift - - Sources/Plexswift/internal/models/Filter+Serialization.swift - - Sources/Plexswift/models/operations/Force.swift - - Sources/Plexswift/internal/models/Force+Serialization.swift - - Sources/Plexswift/models/operations/Genre.swift - - Sources/Plexswift/models/operations/GetAvailableClientsErrors.swift - - Sources/Plexswift/models/operations/GetAvailableClientsMediaContainer.swift - - Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift - - Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift - - Sources/Plexswift/models/operations/GetAvailableClientsServerResponseBody.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsAccount.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsDevice.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsErrors.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsMediaContainer.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsRequest.swift - - Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsResponse.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsResponseBody.swift - - Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsResponseBody.swift - - Sources/Plexswift/models/operations/GetButlerTasksButlerResponseBody.swift - - Sources/Plexswift/models/operations/GetButlerTasksErrors.swift - - Sources/Plexswift/models/operations/GetButlerTasksResponse.swift - - Sources/Plexswift/models/operations/GetButlerTasksResponseBody.swift - - Sources/Plexswift/models/operations/GetDevicesErrors.swift - - Sources/Plexswift/models/operations/GetDevicesMediaContainer.swift - - Sources/Plexswift/models/operations/GetDevicesResponse.swift - - Sources/Plexswift/models/operations/GetDevicesResponseBody.swift - - Sources/Plexswift/models/operations/GetDevicesServerResponseBody.swift - - Sources/Plexswift/models/operations/GetFileHashErrors.swift - - Sources/Plexswift/models/operations/GetFileHashRequest.swift - - Sources/Plexswift/internal/models/GetFileHashRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetFileHashResponse.swift - - Sources/Plexswift/models/operations/GetFileHashResponseBody.swift - - Sources/Plexswift/models/operations/GetGlobalHubsErrors.swift - - Sources/Plexswift/models/operations/GetGlobalHubsHubsResponseBody.swift - - Sources/Plexswift/models/operations/GetGlobalHubsMediaContainer.swift - - Sources/Plexswift/models/operations/GetGlobalHubsMetadata.swift - - Sources/Plexswift/models/operations/GetGlobalHubsRequest.swift - - Sources/Plexswift/internal/models/GetGlobalHubsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetGlobalHubsResponse.swift - - Sources/Plexswift/models/operations/GetGlobalHubsResponseBody.swift - - Sources/Plexswift/models/operations/GetHomeDataErrors.swift - - Sources/Plexswift/models/operations/GetHomeDataPlexResponseBody.swift - - Sources/Plexswift/models/operations/GetHomeDataResponse.swift - - Sources/Plexswift/models/operations/GetHomeDataResponseBody.swift - - Sources/Plexswift/models/operations/GetLibrariesDirectory.swift - - Sources/Plexswift/models/operations/GetLibrariesErrors.swift - - Sources/Plexswift/models/operations/GetLibrariesLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetLibrariesLocation.swift - - Sources/Plexswift/models/operations/GetLibrariesMediaContainer.swift - - Sources/Plexswift/models/operations/GetLibrariesResponse.swift - - Sources/Plexswift/models/operations/GetLibrariesResponseBody.swift - - Sources/Plexswift/models/operations/GetLibraryDirectory.swift - - Sources/Plexswift/models/operations/GetLibraryErrors.swift - - Sources/Plexswift/models/operations/GetLibraryFilter.swift - - Sources/Plexswift/models/operations/GetLibraryHubsCountry.swift - - Sources/Plexswift/models/operations/GetLibraryHubsDirector.swift - - Sources/Plexswift/models/operations/GetLibraryHubsErrors.swift - - Sources/Plexswift/models/operations/GetLibraryHubsGenre.swift - - Sources/Plexswift/models/operations/GetLibraryHubsHub.swift - - Sources/Plexswift/models/operations/GetLibraryHubsHubsResponseBody.swift - - Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift - - Sources/Plexswift/models/operations/GetLibraryHubsMediaContainer.swift - - Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift - - Sources/Plexswift/models/operations/GetLibraryHubsPart.swift - - Sources/Plexswift/models/operations/GetLibraryHubsRequest.swift - - Sources/Plexswift/internal/models/GetLibraryHubsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetLibraryHubsResponse.swift - - Sources/Plexswift/models/operations/GetLibraryHubsResponseBody.swift - - Sources/Plexswift/models/operations/GetLibraryHubsRole.swift - - Sources/Plexswift/models/operations/GetLibraryHubsWriter.swift - - Sources/Plexswift/models/operations/GetLibraryItemsCountry.swift - - Sources/Plexswift/models/operations/GetLibraryItemsDirector.swift - - Sources/Plexswift/models/operations/GetLibraryItemsErrors.swift - - Sources/Plexswift/models/operations/GetLibraryItemsGenre.swift - - Sources/Plexswift/models/operations/GetLibraryItemsLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetLibraryItemsMedia.swift - - Sources/Plexswift/models/operations/GetLibraryItemsMediaContainer.swift - - Sources/Plexswift/models/operations/GetLibraryItemsMetadata.swift - - Sources/Plexswift/models/operations/GetLibraryItemsPart.swift - - Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift - - Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetLibraryItemsResponse.swift - - Sources/Plexswift/models/operations/GetLibraryItemsResponseBody.swift - - Sources/Plexswift/models/operations/GetLibraryItemsRole.swift - - Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift - - Sources/Plexswift/models/operations/GetLibraryLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetLibraryMediaContainer.swift - - Sources/Plexswift/models/operations/GetLibraryRequest.swift - - Sources/Plexswift/internal/models/GetLibraryRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetLibraryResponse.swift - - Sources/Plexswift/models/operations/GetLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetLibraryType.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenDirectory.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenErrors.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenMediaContainer.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenMetadata.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenRequest.swift - - Sources/Plexswift/internal/models/GetMetadataChildrenRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenResponse.swift - - Sources/Plexswift/models/operations/GetMetadataChildrenResponseBody.swift - - Sources/Plexswift/models/operations/GetMetadataCountry.swift - - Sources/Plexswift/models/operations/GetMetadataDirector.swift - - Sources/Plexswift/models/operations/GetMetadataErrors.swift - - Sources/Plexswift/models/operations/GetMetadataGenre.swift - - Sources/Plexswift/models/operations/GetMetadataLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetMetadataMedia.swift - - Sources/Plexswift/models/operations/GetMetadataMediaContainer.swift - - Sources/Plexswift/models/operations/GetMetadataMetadata.swift - - Sources/Plexswift/models/operations/GetMetadataPart.swift - - Sources/Plexswift/models/operations/GetMetadataRequest.swift - - Sources/Plexswift/internal/models/GetMetadataRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetMetadataResponse.swift - - Sources/Plexswift/models/operations/GetMetadataResponseBody.swift - - Sources/Plexswift/models/operations/GetMetadataRole.swift - - Sources/Plexswift/models/operations/GetMetadataWriter.swift - - Sources/Plexswift/models/operations/GetMyPlexAccountErrors.swift - - Sources/Plexswift/models/operations/GetMyPlexAccountResponse.swift - - Sources/Plexswift/models/operations/GetMyPlexAccountResponseBody.swift - - Sources/Plexswift/models/operations/GetMyPlexAccountServerResponseBody.swift - - Sources/Plexswift/models/operations/GetOnDeckErrors.swift - - Sources/Plexswift/models/operations/GetOnDeckGuids.swift - - Sources/Plexswift/models/operations/GetOnDeckLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetOnDeckMedia.swift - - Sources/Plexswift/models/operations/GetOnDeckMediaContainer.swift - - Sources/Plexswift/models/operations/GetOnDeckMetadata.swift - - Sources/Plexswift/models/operations/GetOnDeckPart.swift - - Sources/Plexswift/models/operations/GetOnDeckResponse.swift - - Sources/Plexswift/models/operations/GetOnDeckResponseBody.swift - - Sources/Plexswift/models/operations/GetOnDeckStream.swift - - Sources/Plexswift/models/operations/GetPinErrors.swift - - Sources/Plexswift/models/operations/GetPinPlexResponseBody.swift - - Sources/Plexswift/models/operations/GetPinRequest.swift - - Sources/Plexswift/internal/models/GetPinRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetPinResponse.swift - - Sources/Plexswift/models/operations/GetPinResponseBody.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsCountry.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsDirector.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsErrors.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsGenre.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsMedia.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsMediaContainer.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsMetadata.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsPart.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsResponseBody.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift - - Sources/Plexswift/internal/models/GetPlaylistContentsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsResponse.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsResponseBody.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsRole.swift - - Sources/Plexswift/models/operations/GetPlaylistContentsWriter.swift - - Sources/Plexswift/models/operations/GetPlaylistErrors.swift - - Sources/Plexswift/models/operations/GetPlaylistMediaContainer.swift - - Sources/Plexswift/models/operations/GetPlaylistMetadata.swift - - Sources/Plexswift/models/operations/GetPlaylistPlaylistsResponseBody.swift - - Sources/Plexswift/models/operations/GetPlaylistRequest.swift - - Sources/Plexswift/internal/models/GetPlaylistRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetPlaylistResponse.swift - - Sources/Plexswift/models/operations/GetPlaylistResponseBody.swift - - Sources/Plexswift/models/operations/GetPlaylistsErrors.swift - - Sources/Plexswift/models/operations/GetPlaylistsMediaContainer.swift - - Sources/Plexswift/models/operations/GetPlaylistsMetadata.swift - - Sources/Plexswift/models/operations/GetPlaylistsPlaylistsResponseBody.swift - - Sources/Plexswift/models/operations/GetPlaylistsRequest.swift - - Sources/Plexswift/internal/models/GetPlaylistsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetPlaylistsResponse.swift - - Sources/Plexswift/models/operations/GetPlaylistsResponseBody.swift - - Sources/Plexswift/models/operations/GetRecentlyAddedErrors.swift - - Sources/Plexswift/models/operations/GetRecentlyAddedLibraryResponseBody.swift - - Sources/Plexswift/models/operations/GetRecentlyAddedMediaContainer.swift - - Sources/Plexswift/models/operations/GetRecentlyAddedMetadata.swift - - Sources/Plexswift/models/operations/GetRecentlyAddedResponse.swift - - Sources/Plexswift/models/operations/GetRecentlyAddedResponseBody.swift - - Sources/Plexswift/models/operations/GetResizedPhotoErrors.swift - - Sources/Plexswift/models/operations/GetResizedPhotoRequest.swift - - Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift - - Sources/Plexswift/models/operations/GetResizedPhotoResponseBody.swift - - Sources/Plexswift/models/operations/GetResourcesStatisticsErrors.swift - - Sources/Plexswift/models/operations/GetResourcesStatisticsMediaContainer.swift - - Sources/Plexswift/models/operations/GetResourcesStatisticsRequest.swift - - Sources/Plexswift/internal/models/GetResourcesStatisticsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetResourcesStatisticsResponse.swift - - Sources/Plexswift/models/operations/GetResourcesStatisticsResponseBody.swift - - Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsResponseBody.swift - - Sources/Plexswift/models/operations/GetSearchResultsCountry.swift - - Sources/Plexswift/models/operations/GetSearchResultsDirector.swift - - Sources/Plexswift/models/operations/GetSearchResultsErrors.swift - - Sources/Plexswift/models/operations/GetSearchResultsGenre.swift - - Sources/Plexswift/models/operations/GetSearchResultsMedia.swift - - Sources/Plexswift/models/operations/GetSearchResultsMediaContainer.swift - - Sources/Plexswift/models/operations/GetSearchResultsMetadata.swift - - Sources/Plexswift/models/operations/GetSearchResultsPart.swift - - Sources/Plexswift/models/operations/GetSearchResultsRequest.swift - - Sources/Plexswift/internal/models/GetSearchResultsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetSearchResultsResponse.swift - - Sources/Plexswift/models/operations/GetSearchResultsResponseBody.swift - - Sources/Plexswift/models/operations/GetSearchResultsRole.swift - - Sources/Plexswift/models/operations/GetSearchResultsSearchResponseBody.swift - - Sources/Plexswift/models/operations/GetSearchResultsWriter.swift - - Sources/Plexswift/models/operations/GetServerActivitiesActivitiesResponseBody.swift - - Sources/Plexswift/models/operations/GetServerActivitiesErrors.swift - - Sources/Plexswift/models/operations/GetServerActivitiesMediaContainer.swift - - Sources/Plexswift/models/operations/GetServerActivitiesResponse.swift - - Sources/Plexswift/models/operations/GetServerActivitiesResponseBody.swift - - Sources/Plexswift/models/operations/GetServerCapabilitiesResponse.swift - - Sources/Plexswift/models/operations/GetServerCapabilitiesResponseBody.swift - - Sources/Plexswift/models/operations/GetServerCapabilitiesServerResponseBody.swift - - Sources/Plexswift/models/operations/GetServerIdentityErrors.swift - - Sources/Plexswift/models/operations/GetServerIdentityMediaContainer.swift - - Sources/Plexswift/models/operations/GetServerIdentityResponse.swift - - Sources/Plexswift/models/operations/GetServerIdentityResponseBody.swift - - Sources/Plexswift/models/operations/GetServerIdentityServerResponseBody.swift - - Sources/Plexswift/models/operations/GetServerListErrors.swift - - Sources/Plexswift/models/operations/GetServerListMediaContainer.swift - - Sources/Plexswift/models/operations/GetServerListResponse.swift - - Sources/Plexswift/models/operations/GetServerListResponseBody.swift - - Sources/Plexswift/models/operations/GetServerListServer.swift - - Sources/Plexswift/models/operations/GetServerListServerResponseBody.swift - - Sources/Plexswift/models/operations/GetServerPreferencesErrors.swift - - Sources/Plexswift/models/operations/GetServerPreferencesMediaContainer.swift - - Sources/Plexswift/models/operations/GetServerPreferencesResponse.swift - - Sources/Plexswift/models/operations/GetServerPreferencesResponseBody.swift - - Sources/Plexswift/models/operations/GetServerPreferencesServerResponseBody.swift - - Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift - - Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift - - Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift - - Sources/Plexswift/models/operations/GetSessionHistoryRequest.swift - - Sources/Plexswift/internal/models/GetSessionHistoryRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift - - Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift - - Sources/Plexswift/models/operations/GetSessionHistorySessionsResponseBody.swift - - Sources/Plexswift/models/operations/GetSessionsErrors.swift - - Sources/Plexswift/models/operations/GetSessionsMedia.swift - - Sources/Plexswift/models/operations/GetSessionsMediaContainer.swift - - Sources/Plexswift/models/operations/GetSessionsMetadata.swift - - Sources/Plexswift/models/operations/GetSessionsPart.swift - - Sources/Plexswift/models/operations/GetSessionsResponse.swift - - Sources/Plexswift/models/operations/GetSessionsResponseBody.swift - - Sources/Plexswift/models/operations/GetSessionsSessionsResponseBody.swift - - Sources/Plexswift/models/operations/GetSessionsStream.swift - - Sources/Plexswift/models/operations/GetSessionsUser.swift - - Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift - - Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift - - Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetSourceConnectionInformationResponse.swift - - Sources/Plexswift/models/operations/GetSourceConnectionInformationResponseBody.swift - - Sources/Plexswift/models/operations/GetStatisticsDevice.swift - - Sources/Plexswift/models/operations/GetStatisticsErrors.swift - - Sources/Plexswift/models/operations/GetStatisticsMediaContainer.swift - - Sources/Plexswift/models/operations/GetStatisticsRequest.swift - - Sources/Plexswift/internal/models/GetStatisticsRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetStatisticsResponse.swift - - Sources/Plexswift/models/operations/GetStatisticsResponseBody.swift - - Sources/Plexswift/models/operations/GetStatisticsStatisticsResponseBody.swift - - Sources/Plexswift/models/operations/GetTimelineErrors.swift - - Sources/Plexswift/models/operations/GetTimelineRequest.swift - - Sources/Plexswift/internal/models/GetTimelineRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetTimelineResponse.swift - - Sources/Plexswift/models/operations/GetTimelineResponseBody.swift - - Sources/Plexswift/models/operations/GetTokenErrors.swift - - Sources/Plexswift/models/operations/GetTokenLocation.swift - - Sources/Plexswift/models/operations/GetTokenPlexResponseBody.swift - - Sources/Plexswift/models/operations/GetTokenRequest.swift - - Sources/Plexswift/internal/models/GetTokenRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetTokenResponse.swift - - Sources/Plexswift/models/operations/GetTokenResponseBody.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentCountry.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentGenre.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentGuids.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentMediaContainer.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentMetadata.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift - - Sources/Plexswift/internal/models/GetTopWatchedContentRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentResponse.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentResponseBody.swift - - Sources/Plexswift/models/operations/GetTopWatchedContentRole.swift - - Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift - - Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift - - Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift - - Sources/Plexswift/models/operations/GetTranscodeSessionsResponseBody.swift - - Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsResponseBody.swift - - Sources/Plexswift/models/operations/GetTransientTokenErrors.swift - - Sources/Plexswift/models/operations/GetTransientTokenQueryParamType.swift - - Sources/Plexswift/internal/models/GetTransientTokenQueryParamType+Serialization.swift - - Sources/Plexswift/models/operations/GetTransientTokenRequest.swift - - Sources/Plexswift/internal/models/GetTransientTokenRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetTransientTokenResponse.swift - - Sources/Plexswift/models/operations/GetTransientTokenResponseBody.swift - - Sources/Plexswift/models/operations/GetUpdateStatusErrors.swift - - Sources/Plexswift/models/operations/GetUpdateStatusMediaContainer.swift - - Sources/Plexswift/models/operations/GetUpdateStatusResponse.swift - - Sources/Plexswift/models/operations/GetUpdateStatusResponseBody.swift - - Sources/Plexswift/models/operations/GetUpdateStatusUpdaterResponseBody.swift - - Sources/Plexswift/models/operations/GetWatchlistErrors.swift - - Sources/Plexswift/models/operations/GetWatchlistRequest.swift - - Sources/Plexswift/internal/models/GetWatchlistRequest+Serialization.swift - - Sources/Plexswift/models/operations/GetWatchlistResponse.swift - - Sources/Plexswift/models/operations/GetWatchlistResponseBody.swift - - Sources/Plexswift/models/operations/GetWatchlistWatchlistResponseBody.swift - - Sources/Plexswift/models/operations/Guids.swift - - Sources/Plexswift/models/operations/Hub.swift - - Sources/Plexswift/models/operations/Image.swift - - Sources/Plexswift/models/operations/IncludeCollections.swift - - Sources/Plexswift/internal/models/IncludeCollections+Serialization.swift - - Sources/Plexswift/models/operations/IncludeDetails.swift - - Sources/Plexswift/internal/models/IncludeDetails+Serialization.swift - - Sources/Plexswift/models/operations/IncludeExternalMedia.swift - - Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift - - Sources/Plexswift/models/operations/Level.swift - - Sources/Plexswift/internal/models/Level+Serialization.swift - - Sources/Plexswift/models/operations/LibrarySectionID.swift - - Sources/Plexswift/internal/models/LibrarySectionID+Serialization.swift - - Sources/Plexswift/models/operations/Libtype.swift - - Sources/Plexswift/internal/models/Libtype+Serialization.swift - - Sources/Plexswift/models/operations/Location.swift - - Sources/Plexswift/models/operations/LogLineErrors.swift - - Sources/Plexswift/models/operations/LogLineRequest.swift - - Sources/Plexswift/internal/models/LogLineRequest+Serialization.swift - - Sources/Plexswift/models/operations/LogLineResponse.swift - - Sources/Plexswift/models/operations/LogLineResponseBody.swift - - Sources/Plexswift/models/operations/LogMultiLineErrors.swift - - Sources/Plexswift/models/operations/LogMultiLineResponse.swift - - Sources/Plexswift/models/operations/LogMultiLineResponseBody.swift - - Sources/Plexswift/models/operations/MarkPlayedErrors.swift - - Sources/Plexswift/models/operations/MarkPlayedRequest.swift - - Sources/Plexswift/internal/models/MarkPlayedRequest+Serialization.swift - - Sources/Plexswift/models/operations/MarkPlayedResponse.swift - - Sources/Plexswift/models/operations/MarkPlayedResponseBody.swift - - Sources/Plexswift/models/operations/MarkUnplayedErrors.swift - - Sources/Plexswift/models/operations/MarkUnplayedRequest.swift - - Sources/Plexswift/internal/models/MarkUnplayedRequest+Serialization.swift - - Sources/Plexswift/models/operations/MarkUnplayedResponse.swift - - Sources/Plexswift/models/operations/MarkUnplayedResponseBody.swift - - Sources/Plexswift/models/operations/Media.swift - - Sources/Plexswift/models/operations/MediaContainer.swift - - Sources/Plexswift/models/operations/Metadata.swift - - Sources/Plexswift/models/operations/MinSize.swift - - Sources/Plexswift/internal/models/MinSize+Serialization.swift - - Sources/Plexswift/models/operations/MyPlex.swift - - Sources/Plexswift/models/operations/OnlyTransient.swift - - Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift - - Sources/Plexswift/models/operations/Operator.swift - - Sources/Plexswift/models/operations/Part.swift - - Sources/Plexswift/models/operations/PathParamFilter.swift - - Sources/Plexswift/internal/models/PathParamFilter+Serialization.swift - - Sources/Plexswift/models/operations/PathParamTaskName.swift - - Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift - - Sources/Plexswift/models/operations/PerformSearchErrors.swift - - Sources/Plexswift/models/operations/PerformSearchRequest.swift - - Sources/Plexswift/internal/models/PerformSearchRequest+Serialization.swift - - Sources/Plexswift/models/operations/PerformSearchResponse.swift - - Sources/Plexswift/models/operations/PerformSearchResponseBody.swift - - Sources/Plexswift/models/operations/PerformVoiceSearchErrors.swift - - Sources/Plexswift/models/operations/PerformVoiceSearchRequest.swift - - Sources/Plexswift/internal/models/PerformVoiceSearchRequest+Serialization.swift - - Sources/Plexswift/models/operations/PerformVoiceSearchResponse.swift - - Sources/Plexswift/models/operations/PerformVoiceSearchResponseBody.swift - - Sources/Plexswift/models/operations/Player.swift - - Sources/Plexswift/models/operations/PlaylistType.swift - - Sources/Plexswift/internal/models/PlaylistType+Serialization.swift - - Sources/Plexswift/models/operations/Producer.swift - - Sources/Plexswift/models/operations/Provider.swift - - Sources/Plexswift/models/operations/QueryParamOnlyTransient.swift - - Sources/Plexswift/internal/models/QueryParamOnlyTransient+Serialization.swift - - Sources/Plexswift/models/operations/QueryParamSmart.swift - - Sources/Plexswift/internal/models/QueryParamSmart+Serialization.swift - - Sources/Plexswift/models/operations/QueryParamType.swift - - Sources/Plexswift/internal/models/QueryParamType+Serialization.swift - - Sources/Plexswift/models/operations/Ratings.swift - - Sources/Plexswift/models/operations/RefreshLibraryErrors.swift - - Sources/Plexswift/models/operations/RefreshLibraryRequest.swift - - Sources/Plexswift/internal/models/RefreshLibraryRequest+Serialization.swift - - Sources/Plexswift/models/operations/RefreshLibraryResponse.swift - - Sources/Plexswift/models/operations/RefreshLibraryResponseBody.swift - - Sources/Plexswift/models/operations/Release.swift - - Sources/Plexswift/models/operations/Role.swift - - Sources/Plexswift/models/operations/Scope.swift - - Sources/Plexswift/internal/models/Scope+Serialization.swift - - Sources/Plexswift/models/operations/SearchLibraryErrors.swift - - Sources/Plexswift/models/operations/SearchLibraryLibraryResponseBody.swift - - Sources/Plexswift/models/operations/SearchLibraryMediaContainer.swift - - Sources/Plexswift/models/operations/SearchLibraryMetadata.swift - - Sources/Plexswift/models/operations/SearchLibraryRequest.swift - - Sources/Plexswift/internal/models/SearchLibraryRequest+Serialization.swift - - Sources/Plexswift/models/operations/SearchLibraryResponse.swift - - Sources/Plexswift/models/operations/SearchLibraryResponseBody.swift - - Sources/Plexswift/models/operations/Server.swift - - Sources/Plexswift/models/operations/Session.swift - - Sources/Plexswift/models/operations/Setting.swift - - Sources/Plexswift/models/operations/Skip.swift - - Sources/Plexswift/internal/models/Skip+Serialization.swift - - Sources/Plexswift/models/operations/Smart.swift - - Sources/Plexswift/internal/models/Smart+Serialization.swift - - Sources/Plexswift/models/operations/Sort.swift - - Sources/Plexswift/models/operations/StartAllTasksErrors.swift - - Sources/Plexswift/models/operations/StartAllTasksResponse.swift - - Sources/Plexswift/models/operations/StartAllTasksResponseBody.swift - - Sources/Plexswift/models/operations/StartTaskErrors.swift - - Sources/Plexswift/models/operations/StartTaskRequest.swift - - Sources/Plexswift/internal/models/StartTaskRequest+Serialization.swift - - Sources/Plexswift/models/operations/StartTaskResponse.swift - - Sources/Plexswift/models/operations/StartTaskResponseBody.swift - - Sources/Plexswift/models/operations/StartUniversalTranscodeErrors.swift - - Sources/Plexswift/models/operations/StartUniversalTranscodeRequest.swift - - Sources/Plexswift/internal/models/StartUniversalTranscodeRequest+Serialization.swift - - Sources/Plexswift/models/operations/StartUniversalTranscodeResponse.swift - - Sources/Plexswift/models/operations/StartUniversalTranscodeResponseBody.swift - - Sources/Plexswift/models/operations/State.swift - - Sources/Plexswift/internal/models/State+Serialization.swift - - Sources/Plexswift/models/operations/StatisticsBandwidth.swift - - Sources/Plexswift/models/operations/StatisticsMedia.swift - - Sources/Plexswift/models/operations/StatisticsResources.swift - - Sources/Plexswift/models/operations/StopAllTasksErrors.swift - - Sources/Plexswift/models/operations/StopAllTasksResponse.swift - - Sources/Plexswift/models/operations/StopAllTasksResponseBody.swift - - Sources/Plexswift/models/operations/StopTaskErrors.swift - - Sources/Plexswift/models/operations/StopTaskRequest.swift - - Sources/Plexswift/internal/models/StopTaskRequest+Serialization.swift - - Sources/Plexswift/models/operations/StopTaskResponse.swift - - Sources/Plexswift/models/operations/StopTaskResponseBody.swift - - Sources/Plexswift/models/operations/StopTranscodeSessionErrors.swift - - Sources/Plexswift/models/operations/StopTranscodeSessionRequest.swift - - Sources/Plexswift/internal/models/StopTranscodeSessionRequest+Serialization.swift - - Sources/Plexswift/models/operations/StopTranscodeSessionResponse.swift - - Sources/Plexswift/models/operations/StopTranscodeSessionResponseBody.swift - - Sources/Plexswift/models/operations/Stream.swift - - Sources/Plexswift/models/operations/Tag.swift - - Sources/Plexswift/internal/models/Tag+Serialization.swift - - Sources/Plexswift/models/operations/TaskName.swift - - Sources/Plexswift/internal/models/TaskName+Serialization.swift - - Sources/Plexswift/models/operations/Tonight.swift - - Sources/Plexswift/internal/models/Tonight+Serialization.swift - - Sources/Plexswift/models/operations/TranscodeSession.swift - - Sources/Plexswift/models/operations/TypeModel.swift - - Sources/Plexswift/internal/models/TypeModel+Serialization.swift - - Sources/Plexswift/models/operations/UpdatePlayProgressErrors.swift - - Sources/Plexswift/models/operations/UpdatePlayProgressRequest.swift - - Sources/Plexswift/internal/models/UpdatePlayProgressRequest+Serialization.swift - - Sources/Plexswift/models/operations/UpdatePlayProgressResponse.swift - - Sources/Plexswift/models/operations/UpdatePlayProgressResponseBody.swift - - Sources/Plexswift/models/operations/UpdatePlaylistErrors.swift - - Sources/Plexswift/models/operations/UpdatePlaylistRequest.swift - - Sources/Plexswift/internal/models/UpdatePlaylistRequest+Serialization.swift - - Sources/Plexswift/models/operations/UpdatePlaylistResponse.swift - - Sources/Plexswift/models/operations/UpdatePlaylistResponseBody.swift - - Sources/Plexswift/models/operations/UploadPlaylistErrors.swift - - Sources/Plexswift/models/operations/UploadPlaylistRequest.swift - - Sources/Plexswift/internal/models/UploadPlaylistRequest+Serialization.swift - - Sources/Plexswift/models/operations/UploadPlaylistResponse.swift - - Sources/Plexswift/models/operations/UploadPlaylistResponseBody.swift - - Sources/Plexswift/models/operations/Upscale.swift - - Sources/Plexswift/internal/models/Upscale+Serialization.swift - - Sources/Plexswift/models/operations/User.swift - - Sources/Plexswift/models/operations/Writer.swift - - Sources/Plexswift/models/shared/Security.swift - - Sources/Plexswift/internal/models/Security+Serialization.swift - USAGE.md - - Sources/Plexswift/Plexswift.docc/Plexswift.md - - .gitattributes +examples: + getServerCapabilities: + speakeasy-default-get-server-capabilities: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getServerPreferences: + speakeasy-default-get-server-preferences: + responses: + "200": + application/json: {"MediaContainer": {"size": 161, "Setting": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getAvailableClients: + speakeasy-default-get-available-clients: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Server": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getDevices: + speakeasy-default-get-devices: + responses: + "200": + application/json: {"MediaContainer": {"size": 151, "identifier": "com.plexapp.system.devices", "Device": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-server-identity: + speakeasy-default-get-server-identity: + responses: + "200": + application/json: {"MediaContainer": {"size": 0, "machineIdentifier": "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", "version": "1.31.3.6868-28fc46b27"}} + "408": + application/json: {"code": 408, "message": "The server timed out waiting for the request."} + getMyPlexAccount: + speakeasy-default-get-my-plex-account: + responses: + "200": + application/json: {"MyPlex": {"authToken": "Z5v-PrNASDFpsaCi3CPK7", "username": "example.email@mail.com", "mappingState": "mapped", "signInState": "ok", "publicAddress": "140.20.68.140", "publicPort": 32400, "privateAddress": "10.10.10.47", "privatePort": 32400, "subscriptionFeatures": "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", "subscriptionState": "Active"}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getResizedPhoto: + speakeasy-default-get-resized-photo: + parameters: + query: + width: 110 + height: 165 + opacity: 643869 + blur: 4000 + minSize: 0 + upscale: 0 + url: "/library/metadata/49564/thumb/1654258204" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-media-providers: + speakeasy-default-get-media-providers: + parameters: + query: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getServerList: + speakeasy-default-get-server-list: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Server": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + markPlayed: + speakeasy-default-mark-played: + parameters: + query: + key: 59398 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + markUnplayed: + speakeasy-default-mark-unplayed: + parameters: + query: + key: 59398 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + updatePlayProgress: + "": + parameters: + query: + key: "" + time: 90000 + state: "played" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-banner-image: + speakeasy-default-get-banner-image: + parameters: + path: + ratingKey: 9518 + query: + width: 396 + height: 396 + minSize: 1 + upscale: 1 + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "200": + image/jpeg: "0xE5A1092305" + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-thumb-image: + speakeasy-default-get-thumb-image: + parameters: + path: + ratingKey: 9518 + query: + width: 396 + height: 396 + minSize: 1 + upscale: 1 + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "200": + image/jpeg: "0x4f576BaCaA" + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTimeline: + "": + parameters: + query: + ratingKey: 23409 + key: "/library/metadata/23409" + state: "playing" + hasMDE: 1 + time: 2000 + duration: 10000 + context: "home:hub.continueWatching" + playQueueItemID: 1 + playBackTime: 2000 + row: 1 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + startUniversalTranscode: + "": + parameters: + query: + hasMDE: 1 + path: "/library/metadata/23409" + mediaIndex: 0 + partIndex: 0 + protocol: "hls" + fastSeek: 0 + directPlay: 0 + directStream: 0 + subtitleSize: 100 + subtites: "burn" + audioBoost: 100 + location: "lan" + mediaBufferSize: 102400 + session: "zvcage8b7rkioqcm8f4uns4c" + addDebugOverlay: 0 + autoAdjustQuality: 0 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getServerActivities: + speakeasy-default-get-server-activities: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + cancelServerActivities: + "": + parameters: + path: + activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getButlerTasks: + speakeasy-default-get-butler-tasks: + responses: + "200": + application/json: {"ButlerTasks": {"ButlerTask": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + startAllTasks: + speakeasy-default-start-all-tasks: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + stopAllTasks: + speakeasy-default-stop-all-tasks: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + startTask: + speakeasy-default-start-task: + parameters: + path: + taskName: "CleanOldBundles" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + stopTask: + speakeasy-default-stop-task: + parameters: + path: + taskName: "BackupDatabase" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getCompanionsData: + speakeasy-default-get-companions-data: + responses: + "200": + application/json: [] + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getUserFriends: + speakeasy-default-get-user-friends: + responses: + "200": + application/json: [{"email": "username@email.com", "friendlyName": "exampleUser", "home": true, "id": 0, "restricted": false, "sharedServers": [], "sharedSources": [], "status": "accepted", "thumb": "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", "title": "username123", "username": "username123", "uuid": "7d1916e0d8f6e76b"}] + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getGeoData: + speakeasy-default-get-geo-data: + responses: + "200": + application/json: {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getHomeData: + speakeasy-default-get-home-data: + responses: + "200": + application/json: {"id": 1841489, "name": "Blindkitty38's home", "guestUserID": 58815432, "guestUserUUID": "f3df4e01bfca0787"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-server-resources: + speakeasy-default-get-server-resources: + parameters: + query: + includeHttps: 1 + includeRelay: 1 + includeIPv6: 1 + responses: + "200": + application/json: [] + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPin: + "": + parameters: + query: + X-Plex-Product: "Plex Web" + responses: + "200": + application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} + "400": + application/json: {"errors": []} + getTokenByPinId: + "": + parameters: + path: + pinID: 408895 + query: {} + responses: + "404": + application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]} + getGlobalHubs: + speakeasy-default-get-global-hubs: + responses: + "200": + application/json: {"MediaContainer": {"size": 8, "allowSync": true, "identifier": "com.plexapp.plugins.library", "Hub": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getLibraryHubs: + speakeasy-default-get-library-hubs: + parameters: + path: + sectionId: "6728.76" + query: {} + responses: + "200": + application/json: {"MediaContainer": {"size": 7, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "Hub": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + performSearch: + speakeasy-default-perform-search: + parameters: + query: + query: "dylan" + limit: 5 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + performVoiceSearch: + speakeasy-default-perform-voice-search: + parameters: + query: + query: "dead+poop" + limit: 5 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSearchResults: + speakeasy-default-get-search-results: + parameters: + query: + query: "110" + responses: + "200": + application/json: {"MediaContainer": {"size": 26, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [], "Provider": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getFileHash: + speakeasy-default-get-file-hash: + parameters: + query: + url: "file://C:\\Image.png&type=13" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getRecentlyAdded: + speakeasy-default-get-recently-added: + parameters: + query: + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-all-libraries: + speakeasy-default-get-all-libraries: + responses: + "200": + application/json: {"MediaContainer": {"size": 5, "allowSync": false, "title1": "Plex Library", "Directory": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-library-details: + speakeasy-default-get-library-details: + parameters: + path: + sectionKey: 9518 + query: {} + responses: + "200": + application/json: {"MediaContainer": {"size": 29, "allowSync": false, "art": "/:/resources/movie-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "viewGroup": "secondary", "viewMode": 65592, "Directory": [], "Type": [], "FieldType": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + deleteLibrary: + speakeasy-default-delete-library: + parameters: + path: + sectionKey: 9518 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-library-items: + "": + parameters: + path: + sectionKey: 9518 + tag: "edition" + query: + includeGuids: 1 + includeMeta: 1 + type: 2 + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + responses: + "200": + application/json: {"MediaContainer": {"size": 70, "allowSync": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-refresh-library-metadata: + speakeasy-default-get-refresh-library-metadata: + parameters: + path: + sectionKey: 9518 + query: + force: 0 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-search-library: + speakeasy-default-get-search-library: + parameters: + path: + sectionKey: 9518 + query: + type: 2 + responses: + "200": + application/json: {"MediaContainer": {"size": 2, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Shows", "title2": "Search for ''", "viewGroup": "season", "viewMode": 65593, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-meta-data-by-rating-key: + speakeasy-default-get-meta-data-by-rating-key: + parameters: + path: + ratingKey: 9518 + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "cfc899d7-3000-46f6-8489-b9592714ada5", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getMetadataChildren: + include-stream: + parameters: + path: + ratingKey: "1539.14" + query: + includeElements: "Stream" + responses: + "200": + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + include-stream-otheritem: + parameters: + path: + ratingKey: "8449.64" + query: + includeElements: "Stream,OtherItem" + responses: + "200": + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + include-stream-otheritem-anotheritem: + parameters: + path: + ratingKey: "5800.4" + query: + includeElements: "Stream,OtherItem,AnotherItem" + responses: + "200": + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTopWatchedContent: + "": + parameters: + query: + type: 2 + includeGuids: 1 + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "allowSync": true, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getOnDeck: + speakeasy-default-get-on-deck: + responses: + "200": + application/json: {"MediaContainer": {"size": 16, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + get-watch-list: + speakeasy-default-get-watch-list: + parameters: + path: + filter: "available" + query: + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + logLine: + speakeasy-default-log-line: + parameters: + query: + level: 3 + message: "Test log message" + source: "Postman" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + logMultiLine: + speakeasy-default-log-multi-line: + requestBody: + text/plain: "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + enablePaperTrail: + speakeasy-default-enable-paper-trail: + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + createPlaylist: + speakeasy-default-create-playlist: + parameters: + query: + title: "" + type: "photo" + smart: 1 + uri: "https://inborn-brochure.biz" + responses: + "200": + application/json: {"MediaContainer": {"size": 7, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPlaylists: + speakeasy-default-get-playlists: + responses: + "200": + application/json: {"MediaContainer": {"size": 4, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPlaylist: + speakeasy-default-get-playlist: + parameters: + path: + playlistID: "4109.48" + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + deletePlaylist: + speakeasy-default-delete-playlist: + parameters: + path: + playlistID: "216.22" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + updatePlaylist: + speakeasy-default-update-playlist: + parameters: + path: + playlistID: "3915" + query: {} + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getPlaylistContents: + speakeasy-default-get-playlist-contents: + parameters: + path: + playlistID: "5004.46" + query: + type: 2 + responses: + "200": + application/json: {"MediaContainer": {"size": 2, "composite": "/playlists/95/composite/1705717521", "duration": 282, "leafCount": 2, "playlistType": "video", "ratingKey": "95", "smart": true, "title": "Smart Movie Playlist", "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + clearPlaylistContents: + speakeasy-default-clear-playlist-contents: + parameters: + path: + playlistID: "1893.18" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + addPlaylistContents: + speakeasy-default-add-playlist-contents: + parameters: + path: + playlistID: "8502.01" + query: + uri: "server://12345/com.plexapp.plugins.library/library/metadata/1" + playQueueID: 123 + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "leafCountAdded": 1, "leafCountRequested": 1, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + uploadPlaylist: + speakeasy-default-upload-playlist: + parameters: + query: + path: "/home/barkley/playlist.m3u" + force: 0 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTransientToken: + speakeasy-default-get-transient-token: + parameters: + query: + type: "delegation" + scope: "all" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSourceConnectionInformation: + speakeasy-default-get-source-connection-information: + parameters: + query: + source: "server://client-identifier" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTokenDetails: + speakeasy-default-get-token-details: + responses: + "200": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + post-users-sign-in-data: + speakeasy-default-post-users-sign-in-data: + requestBody: + application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "verificationCode": "123456"} + responses: + "201": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "pastSubscriptions": [{"id": "string", "mode": "string", "renewsAt": "string", "endsAt": "1556281940", "canceled": "0", "gracePeriod": "0", "onHold": "0", "canReactivate": "0", "canUpgrade": "0", "canDowngrade": "0", "canConvert": "0", "type": "plexpass", "transfer": "string", "state": "ended", "billing": {"paymentMethodId": 569045}}], "trials": [{}]} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getStatistics: + "": + parameters: + query: + Timespan: 4 + responses: + "200": + application/json: {"MediaContainer": {"size": 5497, "Device": [], "Account": [], "StatisticsMedia": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getResourcesStatistics: + "": + parameters: + query: + Timespan: 4 + responses: + "200": + application/json: {"MediaContainer": {"size": 5497, "StatisticsResources": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getBandwidthStatistics: + "": + parameters: + query: + Timespan: 4 + responses: + "200": + application/json: {"MediaContainer": {"size": 5497, "Device": [], "Account": [], "StatisticsBandwidth": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSessions: + speakeasy-default-get-sessions: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getSessionHistory: + viewed-at-descending: + parameters: + query: + sort: "viewedAt:desc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + viewed-at-ascending: + parameters: + query: + sort: "viewedAt:asc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + rating-descending: + parameters: + query: + sort: "rating:desc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + rating-ascending: + parameters: + query: + sort: "rating:asc" + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + "": + parameters: + query: + accountId: 1 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + ViewedAt: + parameters: + query: + accountId: 1 + filter: viewedAt>=1704862818 + librarySectionID: 12 + responses: + "200": + application/json: {"MediaContainer": {"size": 10855, "Metadata": []}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getTranscodeSessions: + speakeasy-default-get-transcode-sessions: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "TranscodeSession": [{"key": "vv3i2q2lax92qlzul1hbd4bx", "throttled": false, "complete": false, "progress": 1.7999999523162842, "size": -22, "speed": 25.100000381469727, "error": false, "duration": 1445695, "remaining": 53, "context": "streaming", "sourceVideoCodec": "h264", "sourceAudioCodec": "aac", "videoDecision": "transcode", "audioDecision": "transcode", "subtitleDecision": "burn", "protocol": "http", "container": "mkv", "videoCodec": "h264", "audioCodec": "opus", "audioChannels": 1, "transcodeHwRequested": true, "timeStamp": 1705895805.4919229, "maxOffsetAvailable": 29.53, "minOffsetAvailable": 3.003000020980835}]}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + stopTranscodeSession: + speakeasy-default-stop-transcode-session: + parameters: + path: + sessionKey: "zz7llzqlx8w9vnrsbnwhbmep" + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + getUpdateStatus: + speakeasy-default-get-update-status: + responses: + "200": + application/json: {"MediaContainer": {"size": 1, "canInstall": false, "checkedAt": 1705801232, "downloadURL": "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", "status": 0, "Release": [{"key": "https://plex.tv/updater/releases/5136", "version": "1.40.0.7775-456fbaf97", "added": "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n(Music) Store track genres and add filtering options (#14653)\n(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n(View History) No longer create a view history entry for items marked as played (#10888)\n(Web) Updated to 4.118.0", "fixed": "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n(Collection) Server could become unresponsive when collection membership changes (#14612)\n(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n(Library) The Content Rating not equal to None filter does not work (#14620)\n(Search) Album search results could contain all the album's tracks too (#14486)\n(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", "downloadURL": "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", "state": "notify"}]}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + checkForUpdates: + "": + parameters: + query: + download: 1 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} + applyUpdates: + "": + parameters: + query: + tonight: 1 + skip: 1 + responses: + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 7c90dd0..719a4f9 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true swift: - version: 0.5.0 + version: 0.6.0 author: LukeHagar description: Swift Client SDK Generated by Speakeasy imports: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d585717 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/README.md b/README.md index c492400..237886d 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,32 @@ An Open API Spec for interacting with Plex.tv and Plex Servers The SDK supports iOS 13 and later. + +## Summary + +Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server + + + +## Table of Contents + +* [SDK Installation](#sdk-installation) +* [SDK Example Usage](#sdk-example-usage) +* [Available Resources and Operations](#available-resources-and-operations) +* [Global Parameters](#global-parameters) +* [Authentication](#authentication) + + ## SDK Installation -### Swift Package Manager +The SDK uses the [Swift Package Manager](https://www.swift.org/documentation/package-manager/) to handle dependencies, which is included in Swift 3.0 and above. You can add `plexswift` to your project directly in Xcode `(File > Add Packages...)` or by adding it to your project's Package.swift file: ```bash dependencies: [ - .package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.5.0")) + .package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.6.0")) ] ``` @@ -41,10 +57,13 @@ let client = Client(security: .accessToken("")) let response = try await client.server.getServerCapabilities() switch response.data { -case .twoHundredApplicationJsonObject(let twoHundredApplicationJsonObject): +case .object(let object): // Handle response break -case .fourHundredAndOneApplicationJsonObject(let fourHundredAndOneApplicationJsonObject): +case .badRequest(let badRequest): + // Handle response + break +case .unauthorized(let unauthorized): // Handle response break case .empty: @@ -58,7 +77,133 @@ case .empty: ## Available Resources and Operations +
+Available methods +### [Activities](docs/sdks/activities/README.md) + +* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities +* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities + +### [Authentication](docs/sdks/authentication/README.md) + +* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token +* [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information +* [getTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details +* [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data + +### [Butler](docs/sdks/butler/README.md) + +* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks +* [startAllTasks](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks +* [stopAllTasks](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks +* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task +* [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task + +### [Hubs](docs/sdks/hubs/README.md) + +* [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs +* [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs + +### [Library](docs/sdks/library/README.md) + +* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value +* [getRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded) - Get Recently Added +* [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries +* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details +* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section +* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items +* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library +* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library +* [getMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey +* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children +* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content +* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck + +### [Log](docs/sdks/log/README.md) + +* [logLine](docs/sdks/log/README.md#logline) - Logging a single line message. +* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message +* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail + +### [Media](docs/sdks/media/README.md) + +* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played +* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed +* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress +* [getBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image +* [getThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image + +### [Playlists](docs/sdks/playlists/README.md) + +* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist +* [getPlaylists](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists +* [getPlaylist](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist +* [deletePlaylist](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist +* [updatePlaylist](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist +* [getPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents +* [clearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents +* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist +* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist + +### [Plex](docs/sdks/plex/README.md) + +* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data +* [getUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in +* [getGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data +* [getHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data +* [getServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources +* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin +* [getTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId + + +### [Search](docs/sdks/search/README.md) + +* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search +* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search +* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results + +### [Server](docs/sdks/server/README.md) + +* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities +* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences +* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients +* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices +* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity +* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account +* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo +* [getMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers +* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List + +### [Sessions](docs/sdks/sessions/README.md) + +* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions +* [getSessionHistory](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History +* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions +* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session + +### [Statistics](docs/sdks/statistics/README.md) + +* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics +* [getResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics +* [getBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics + +### [Updater](docs/sdks/updater/README.md) + +* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates +* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates +* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates + +### [Video](docs/sdks/video/README.md) + +* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item +* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode + +### [Watchlist](docs/sdks/watchlist/README.md) + +* [getWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist + +
@@ -83,10 +228,13 @@ let client = Client(security: .accessToken("")) let response = try await client.server.getServerCapabilities() switch response.data { -case .twoHundredApplicationJsonObject(let twoHundredApplicationJsonObject): +case .object(let object): // Handle response break -case .fourHundredAndOneApplicationJsonObject(let fourHundredAndOneApplicationJsonObject): +case .badRequest(let badRequest): + // Handle response + break +case .unauthorized(let unauthorized): // Handle response break case .empty: @@ -102,7 +250,7 @@ case .empty: A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed. -For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. +For example, you can set `X-Plex-Client-Identifier` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. ### Available Globals @@ -123,20 +271,24 @@ This is used to track the client application and its usage import Foundation import Plexswift -let client = Client() +let client = Client(security: .accessToken("")) -let response = try await client.plex.getPin( - request: Operations.GetPinRequest( - xPlexProduct: "Postman", - strong: false, +let response = try await client.plex.getServerResources( + request: Operations.GetServerResourcesRequest( + includeHttps: .one, + includeIPv6: .one, + includeRelay: .one, ) ) switch response.data { -case .twoHundredAndOneApplicationJsonObject(let twoHundredAndOneApplicationJsonObject): +case .plexDevices(let plexDevices): // Handle response break -case .fourHundredApplicationJsonObject(let fourHundredApplicationJsonObject): +case .badRequest(let badRequest): + // Handle response + break +case .unauthorized(let unauthorized): // Handle response break case .empty: diff --git a/RELEASES.md b/RELEASES.md index 075c7ef..7bbd48f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -572,4 +572,14 @@ Based on: ### Generated - [swift v0.5.0] . ### Releases -- [Swift Package Manager v0.5.0] https://github.com/LukeHagar/plexswift/releases/tag/v0.5.0 - . \ No newline at end of file +- [Swift Package Manager v0.5.0] https://github.com/LukeHagar/plexswift/releases/tag/v0.5.0 - . + +## 2024-09-16 18:43:31 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.397.2 (2.415.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [swift v0.6.0] . +### Releases +- [Swift Package Manager v0.6.0] https://github.com/LukeHagar/plexswift/releases/tag/v0.6.0 - . \ No newline at end of file diff --git a/Sources/Plexswift/Client.swift b/Sources/Plexswift/Client.swift index 380f9b0..53316e5 100644 --- a/Sources/Plexswift/Client.swift +++ b/Sources/Plexswift/Client.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation #if os(Linux) @@ -28,7 +28,9 @@ import FoundationNetworking /// ```swift /// let response: Response = ... // Response from API call /// switch response.data { -/// case .object(let object): +/// case .badRequest(let badRequest): +/// // Handle response +/// case .unauthorized(let unauthorized): /// // Handle response /// case .empty: /// // Handle empty response @@ -70,13 +72,13 @@ import FoundationNetworking /// - ``hubs`` /// - ``search`` /// - ``library`` +/// - ``watchlist`` /// - ``log`` /// - ``playlists`` /// - ``authentication`` /// - ``statistics`` /// - ``sessions`` /// - ``updater`` -/// - ``watchlist`` /// public final class Client { internal struct APIResponse { @@ -90,12 +92,12 @@ public final class Client { // Underscore-prefix properties so these do not potentially conflict with any operation namespaces. private lazy var _session = URLSession(configuration: .default) private var _globalParameters: GlobalParameters? - private var _security: Shared.Security + private var _security: Shared.Security? private var _selectedServer: GlobalServers? /// Creates an API client object with the specified parameters. - public init(globalParameters: GlobalParameters? = nil, security: Shared.Security) { + public init(globalParameters: GlobalParameters? = nil, security: Shared.Security? = nil) { self._globalParameters = globalParameters self._security = security } diff --git a/Sources/Plexswift/Plexswift.docc/Plexswift.md b/Sources/Plexswift/Plexswift.docc/Plexswift.md index 9180d73..9d90957 100644 --- a/Sources/Plexswift/Plexswift.docc/Plexswift.md +++ b/Sources/Plexswift/Plexswift.docc/Plexswift.md @@ -1,6 +1,6 @@ # ``plexswift`` -An Open API Spec for interacting with Plex.tv and Plex Servers +Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server `plexswift` is a Swift library which provides functionality for making requests to the API using a modern, easy-to-use Swift API: @@ -15,10 +15,13 @@ let client = Client(security: .accessToken("")) let response = try await client.server.getServerCapabilities() switch response.data { -case .twoHundredApplicationJsonObject(let twoHundredApplicationJsonObject): +case .object(let object): // Handle response break -case .fourHundredAndOneApplicationJsonObject(let fourHundredAndOneApplicationJsonObject): +case .badRequest(let badRequest): + // Handle response + break +case .unauthorized(let unauthorized): // Handle response break case .empty: @@ -60,22 +63,101 @@ case .empty: - ``HubsAPI`` - ``SearchAPI`` - ``LibraryAPI`` +- ``WatchlistAPI`` - ``LogAPI`` - ``PlaylistsAPI`` - ``AuthenticationAPI`` - ``StatisticsAPI`` - ``SessionsAPI`` - ``UpdaterAPI`` -- ``WatchlistAPI`` ### Server configuration +- ``PlexServers/GetCompanionsData`` +- ``PlexServers/GetUserFriends`` +- ``PlexServers/GetGeoData`` +- ``PlexServers/GetServerResources`` - ``PlexServers/GetPin`` -- ``PlexServers/GetToken`` -- ``WatchlistServers/GetWatchlist`` +- ``PlexServers/GetTokenByPinId`` +- ``WatchlistServers/GetWatchList`` +- ``AuthenticationServers/GetTokenDetails`` +- ``AuthenticationServers/PostUsersSignInData`` ### Shared models ### Request objects +- ``Operations/AddPlaylistContentsBadRequest`` +- ``Operations/ApplyUpdatesBadRequest`` +- ``Operations/CancelServerActivitiesBadRequest`` +- ``Operations/CheckForUpdatesBadRequest`` +- ``Operations/ClearPlaylistContentsBadRequest`` +- ``Operations/CreatePlaylistBadRequest`` +- ``Operations/DeleteLibraryBadRequest`` +- ``Operations/DeletePlaylistBadRequest`` +- ``Operations/EnablePaperTrailBadRequest`` +- ``Operations/GetAllLibrariesBadRequest`` +- ``Operations/GetBannerImageBadRequest`` +- ``Operations/GetLibraryDetailsBadRequest`` +- ``Operations/GetLibraryItemsBadRequest`` +- ``Operations/GetMediaProvidersBadRequest`` +- ``Operations/GetMetaDataByRatingKeyBadRequest`` +- ``Operations/GetRefreshLibraryMetadataBadRequest`` +- ``Operations/GetSearchLibraryBadRequest`` +- ``Operations/GetServerResourcesBadRequest`` +- ``Operations/GetThumbImageBadRequest`` +- ``Operations/GetWatchListBadRequest`` +- ``Operations/GetAvailableClientsBadRequest`` +- ``Operations/GetBandwidthStatisticsBadRequest`` +- ``Operations/GetButlerTasksBadRequest`` +- ``Operations/GetCompanionsDataBadRequest`` +- ``Operations/GetDevicesBadRequest`` +- ``Operations/GetFileHashBadRequest`` +- ``Operations/GetGeoDataBadRequest`` +- ``Operations/GetGlobalHubsBadRequest`` +- ``Operations/GetHomeDataBadRequest`` +- ``Operations/GetLibraryHubsBadRequest`` +- ``Operations/GetMetadataChildrenBadRequest`` +- ``Operations/GetMyPlexAccountBadRequest`` +- ``Operations/GetOnDeckBadRequest`` +- ``Operations/GetPinBadRequest`` +- ``Operations/GetPlaylistBadRequest`` +- ``Operations/GetPlaylistContentsBadRequest`` +- ``Operations/GetPlaylistsBadRequest`` +- ``Operations/GetRecentlyAddedBadRequest`` +- ``Operations/GetResizedPhotoBadRequest`` +- ``Operations/GetResourcesStatisticsBadRequest`` +- ``Operations/GetSearchResultsBadRequest`` +- ``Operations/GetServerActivitiesBadRequest`` +- ``Operations/GetServerCapabilitiesBadRequest`` +- ``Operations/GetServerListBadRequest`` +- ``Operations/GetServerPreferencesBadRequest`` +- ``Operations/GetSessionHistoryBadRequest`` +- ``Operations/GetSessionsBadRequest`` +- ``Operations/GetSourceConnectionInformationBadRequest`` +- ``Operations/GetStatisticsBadRequest`` +- ``Operations/GetTimelineBadRequest`` +- ``Operations/GetTokenByPinIdBadRequest`` +- ``Operations/GetTokenDetailsBadRequest`` +- ``Operations/GetTopWatchedContentBadRequest`` +- ``Operations/GetTranscodeSessionsBadRequest`` +- ``Operations/GetTransientTokenBadRequest`` +- ``Operations/GetUpdateStatusBadRequest`` +- ``Operations/GetUserFriendsBadRequest`` +- ``Operations/LogLineBadRequest`` +- ``Operations/LogMultiLineBadRequest`` +- ``Operations/MarkPlayedBadRequest`` +- ``Operations/MarkUnplayedBadRequest`` +- ``Operations/PerformSearchBadRequest`` +- ``Operations/PerformVoiceSearchBadRequest`` +- ``Operations/PostUsersSignInDataBadRequest`` +- ``Operations/StartAllTasksBadRequest`` +- ``Operations/StartTaskBadRequest`` +- ``Operations/StartUniversalTranscodeBadRequest`` +- ``Operations/StopAllTasksBadRequest`` +- ``Operations/StopTaskBadRequest`` +- ``Operations/StopTranscodeSessionBadRequest`` +- ``Operations/UpdatePlaylistBadRequest`` +- ``Operations/UpdatePlayProgressBadRequest`` +- ``Operations/UploadPlaylistBadRequest`` ### Response objects - ``Operations/AddPlaylistContentsResponse`` @@ -87,18 +169,28 @@ case .empty: - ``Operations/DeleteLibraryResponse`` - ``Operations/DeletePlaylistResponse`` - ``Operations/EnablePaperTrailResponse`` +- ``Operations/GetAllLibrariesResponse`` +- ``Operations/GetBannerImageResponse`` +- ``Operations/GetLibraryDetailsResponse`` +- ``Operations/GetLibraryItemsResponse`` +- ``Operations/GetMediaProvidersResponse`` +- ``Operations/GetMetaDataByRatingKeyResponse`` +- ``Operations/GetRefreshLibraryMetadataResponse`` +- ``Operations/GetSearchLibraryResponse`` +- ``Operations/GetServerIdentityResponse`` +- ``Operations/GetServerResourcesResponse`` +- ``Operations/GetThumbImageResponse`` +- ``Operations/GetWatchListResponse`` - ``Operations/GetAvailableClientsResponse`` - ``Operations/GetBandwidthStatisticsResponse`` - ``Operations/GetButlerTasksResponse`` +- ``Operations/GetCompanionsDataResponse`` - ``Operations/GetDevicesResponse`` - ``Operations/GetFileHashResponse`` +- ``Operations/GetGeoDataResponse`` - ``Operations/GetGlobalHubsResponse`` - ``Operations/GetHomeDataResponse`` -- ``Operations/GetLibrariesResponse`` -- ``Operations/GetLibraryResponse`` - ``Operations/GetLibraryHubsResponse`` -- ``Operations/GetLibraryItemsResponse`` -- ``Operations/GetMetadataResponse`` - ``Operations/GetMetadataChildrenResponse`` - ``Operations/GetMyPlexAccountResponse`` - ``Operations/GetOnDeckResponse`` @@ -112,7 +204,6 @@ case .empty: - ``Operations/GetSearchResultsResponse`` - ``Operations/GetServerActivitiesResponse`` - ``Operations/GetServerCapabilitiesResponse`` -- ``Operations/GetServerIdentityResponse`` - ``Operations/GetServerListResponse`` - ``Operations/GetServerPreferencesResponse`` - ``Operations/GetSessionHistoryResponse`` @@ -120,20 +211,20 @@ case .empty: - ``Operations/GetSourceConnectionInformationResponse`` - ``Operations/GetStatisticsResponse`` - ``Operations/GetTimelineResponse`` -- ``Operations/GetTokenResponse`` +- ``Operations/GetTokenByPinIdResponse`` +- ``Operations/GetTokenDetailsResponse`` - ``Operations/GetTopWatchedContentResponse`` - ``Operations/GetTranscodeSessionsResponse`` - ``Operations/GetTransientTokenResponse`` - ``Operations/GetUpdateStatusResponse`` -- ``Operations/GetWatchlistResponse`` +- ``Operations/GetUserFriendsResponse`` - ``Operations/LogLineResponse`` - ``Operations/LogMultiLineResponse`` - ``Operations/MarkPlayedResponse`` - ``Operations/MarkUnplayedResponse`` - ``Operations/PerformSearchResponse`` - ``Operations/PerformVoiceSearchResponse`` -- ``Operations/RefreshLibraryResponse`` -- ``Operations/SearchLibraryResponse`` +- ``Operations/PostUsersSignInDataResponse`` - ``Operations/StartAllTasksResponse`` - ``Operations/StartTaskResponse`` - ``Operations/StartUniversalTranscodeResponse`` @@ -150,112 +241,92 @@ case .empty: - ``Operations/AddPlaylistContentsErrors`` - ``Operations/AddPlaylistContentsMediaContainer`` - ``Operations/AddPlaylistContentsMetadata`` -- ``Operations/AddPlaylistContentsPlaylistsResponseBody`` +- ``Operations/AddPlaylistContentsPlaylistsErrors`` - ``Operations/AddPlaylistContentsRequest`` - ``Operations/AddPlaylistContentsResponseBody`` +- ``Operations/AddPlaylistContentsUnauthorized`` - ``Operations/ApplyUpdatesErrors`` - ``Operations/ApplyUpdatesRequest`` -- ``Operations/ApplyUpdatesResponseBody`` +- ``Operations/ApplyUpdatesUnauthorized`` +- ``Operations/ApplyUpdatesUpdaterErrors`` +- ``Operations/AutoSelectSubtitle`` +- ``Operations/Billing`` - ``Operations/ButlerTask`` - ``Operations/ButlerTasks`` +- ``Operations/CancelServerActivitiesActivitiesErrors`` - ``Operations/CancelServerActivitiesErrors`` - ``Operations/CancelServerActivitiesRequest`` -- ``Operations/CancelServerActivitiesResponseBody`` +- ``Operations/CancelServerActivitiesUnauthorized`` - ``Operations/CheckForUpdatesErrors`` - ``Operations/CheckForUpdatesRequest`` -- ``Operations/CheckForUpdatesResponseBody`` +- ``Operations/CheckForUpdatesUnauthorized`` +- ``Operations/CheckForUpdatesUpdaterErrors`` - ``Operations/ClearPlaylistContentsErrors`` +- ``Operations/ClearPlaylistContentsPlaylistsErrors`` - ``Operations/ClearPlaylistContentsRequest`` -- ``Operations/ClearPlaylistContentsResponseBody`` +- ``Operations/ClearPlaylistContentsUnauthorized`` +- ``Operations/Connections`` - ``Operations/Context`` - ``Operations/Country`` - ``Operations/CreatePlaylistErrors`` - ``Operations/CreatePlaylistMediaContainer`` - ``Operations/CreatePlaylistMetadata`` -- ``Operations/CreatePlaylistPlaylistsResponseBody`` +- ``Operations/CreatePlaylistPlaylistsErrors`` +- ``Operations/CreatePlaylistQueryParamType`` - ``Operations/CreatePlaylistRequest`` - ``Operations/CreatePlaylistResponseBody`` +- ``Operations/CreatePlaylistUnauthorized`` +- ``Operations/DefaultSubtitleAccessibility`` +- ``Operations/DefaultSubtitleForced`` - ``Operations/DeleteLibraryErrors`` +- ``Operations/DeleteLibraryLibraryErrors`` - ``Operations/DeleteLibraryRequest`` -- ``Operations/DeleteLibraryResponseBody`` +- ``Operations/DeleteLibraryUnauthorized`` - ``Operations/DeletePlaylistErrors`` +- ``Operations/DeletePlaylistPlaylistsErrors`` - ``Operations/DeletePlaylistRequest`` -- ``Operations/DeletePlaylistResponseBody`` +- ``Operations/DeletePlaylistUnauthorized`` - ``Operations/Device`` - ``Operations/Director`` - ``Operations/Directory`` - ``Operations/Download`` - ``Operations/EnablePaperTrailErrors`` -- ``Operations/EnablePaperTrailResponseBody`` +- ``Operations/EnablePaperTrailLogErrors`` +- ``Operations/EnablePaperTrailUnauthorized`` - ``Operations/Errors`` +- ``Operations/Feature`` +- ``Operations/Features`` - ``Operations/Field`` - ``Operations/FieldType`` - ``Operations/Filter`` - ``Operations/Force`` +- ``Operations/Friend`` - ``Operations/Genre`` -- ``Operations/GetAvailableClientsErrors`` -- ``Operations/GetAvailableClientsMediaContainer`` -- ``Operations/GetAvailableClientsResponseBody`` -- ``Operations/GetAvailableClientsServerResponseBody`` -- ``Operations/GetBandwidthStatisticsAccount`` -- ``Operations/GetBandwidthStatisticsDevice`` -- ``Operations/GetBandwidthStatisticsErrors`` -- ``Operations/GetBandwidthStatisticsMediaContainer`` -- ``Operations/GetBandwidthStatisticsRequest`` -- ``Operations/GetBandwidthStatisticsResponseBody`` -- ``Operations/GetBandwidthStatisticsStatisticsResponseBody`` -- ``Operations/GetButlerTasksButlerResponseBody`` -- ``Operations/GetButlerTasksErrors`` -- ``Operations/GetButlerTasksResponseBody`` -- ``Operations/GetDevicesErrors`` -- ``Operations/GetDevicesMediaContainer`` -- ``Operations/GetDevicesResponseBody`` -- ``Operations/GetDevicesServerResponseBody`` -- ``Operations/GetFileHashErrors`` -- ``Operations/GetFileHashRequest`` -- ``Operations/GetFileHashResponseBody`` -- ``Operations/GetGlobalHubsErrors`` -- ``Operations/GetGlobalHubsHubsResponseBody`` -- ``Operations/GetGlobalHubsMediaContainer`` -- ``Operations/GetGlobalHubsMetadata`` -- ``Operations/GetGlobalHubsRequest`` -- ``Operations/GetGlobalHubsResponseBody`` -- ``Operations/GetHomeDataErrors`` -- ``Operations/GetHomeDataPlexResponseBody`` -- ``Operations/GetHomeDataResponseBody`` -- ``Operations/GetLibrariesDirectory`` -- ``Operations/GetLibrariesErrors`` -- ``Operations/GetLibrariesLibraryResponseBody`` -- ``Operations/GetLibrariesLocation`` -- ``Operations/GetLibrariesMediaContainer`` -- ``Operations/GetLibrariesResponseBody`` -- ``Operations/GetLibraryDirectory`` -- ``Operations/GetLibraryErrors`` -- ``Operations/GetLibraryFilter`` -- ``Operations/GetLibraryLibraryResponseBody`` -- ``Operations/GetLibraryMediaContainer`` -- ``Operations/GetLibraryRequest`` -- ``Operations/GetLibraryResponseBody`` -- ``Operations/GetLibraryType`` -- ``Operations/GetLibraryHubsCountry`` -- ``Operations/GetLibraryHubsDirector`` -- ``Operations/GetLibraryHubsErrors`` -- ``Operations/GetLibraryHubsGenre`` -- ``Operations/GetLibraryHubsHub`` -- ``Operations/GetLibraryHubsHubsResponseBody`` -- ``Operations/GetLibraryHubsMedia`` -- ``Operations/GetLibraryHubsMediaContainer`` -- ``Operations/GetLibraryHubsMetadata`` -- ``Operations/GetLibraryHubsPart`` -- ``Operations/GetLibraryHubsRequest`` -- ``Operations/GetLibraryHubsResponseBody`` -- ``Operations/GetLibraryHubsRole`` -- ``Operations/GetLibraryHubsWriter`` +- ``Operations/GeoData`` +- ``Operations/GetAllLibrariesDirectory`` +- ``Operations/GetAllLibrariesErrors`` +- ``Operations/GetAllLibrariesLibraryErrors`` +- ``Operations/GetAllLibrariesMediaContainer`` +- ``Operations/GetAllLibrariesResponseBody`` +- ``Operations/GetAllLibrariesUnauthorized`` +- ``Operations/GetBannerImageErrors`` +- ``Operations/GetBannerImageMediaErrors`` +- ``Operations/GetBannerImageRequest`` +- ``Operations/GetBannerImageUnauthorized`` +- ``Operations/GetLibraryDetailsDirectory`` +- ``Operations/GetLibraryDetailsErrors`` +- ``Operations/GetLibraryDetailsFilter`` +- ``Operations/GetLibraryDetailsLibraryErrors`` +- ``Operations/GetLibraryDetailsMediaContainer`` +- ``Operations/GetLibraryDetailsRequest`` +- ``Operations/GetLibraryDetailsResponseBody`` +- ``Operations/GetLibraryDetailsType`` +- ``Operations/GetLibraryDetailsUnauthorized`` - ``Operations/GetLibraryItemsCountry`` - ``Operations/GetLibraryItemsDirector`` - ``Operations/GetLibraryItemsErrors`` - ``Operations/GetLibraryItemsGenre`` -- ``Operations/GetLibraryItemsLibraryResponseBody`` +- ``Operations/GetLibraryItemsLibraryErrors`` - ``Operations/GetLibraryItemsMedia`` - ``Operations/GetLibraryItemsMediaContainer`` - ``Operations/GetLibraryItemsMetadata`` @@ -263,49 +334,147 @@ case .empty: - ``Operations/GetLibraryItemsRequest`` - ``Operations/GetLibraryItemsResponseBody`` - ``Operations/GetLibraryItemsRole`` +- ``Operations/GetLibraryItemsUnauthorized`` - ``Operations/GetLibraryItemsWriter`` -- ``Operations/GetMetadataCountry`` -- ``Operations/GetMetadataDirector`` -- ``Operations/GetMetadataErrors`` -- ``Operations/GetMetadataGenre`` -- ``Operations/GetMetadataLibraryResponseBody`` -- ``Operations/GetMetadataMedia`` -- ``Operations/GetMetadataMediaContainer`` -- ``Operations/GetMetadataMetadata`` -- ``Operations/GetMetadataPart`` -- ``Operations/GetMetadataRequest`` -- ``Operations/GetMetadataResponseBody`` -- ``Operations/GetMetadataRole`` -- ``Operations/GetMetadataWriter`` +- ``Operations/GetMediaProvidersDirectory`` +- ``Operations/GetMediaProvidersErrors`` +- ``Operations/GetMediaProvidersMediaContainer`` +- ``Operations/GetMediaProvidersRequest`` +- ``Operations/GetMediaProvidersResponseBody`` +- ``Operations/GetMediaProvidersServerErrors`` +- ``Operations/GetMediaProvidersUnauthorized`` +- ``Operations/GetMetaDataByRatingKeyCountry`` +- ``Operations/GetMetaDataByRatingKeyDirector`` +- ``Operations/GetMetaDataByRatingKeyErrors`` +- ``Operations/GetMetaDataByRatingKeyGenre`` +- ``Operations/GetMetaDataByRatingKeyLibraryErrors`` +- ``Operations/GetMetaDataByRatingKeyMedia`` +- ``Operations/GetMetaDataByRatingKeyMediaContainer`` +- ``Operations/GetMetaDataByRatingKeyMetadata`` +- ``Operations/GetMetaDataByRatingKeyPart`` +- ``Operations/GetMetaDataByRatingKeyRequest`` +- ``Operations/GetMetaDataByRatingKeyResponseBody`` +- ``Operations/GetMetaDataByRatingKeyRole`` +- ``Operations/GetMetaDataByRatingKeyUnauthorized`` +- ``Operations/GetMetaDataByRatingKeyWriter`` +- ``Operations/GetRefreshLibraryMetadataErrors`` +- ``Operations/GetRefreshLibraryMetadataLibraryErrors`` +- ``Operations/GetRefreshLibraryMetadataRequest`` +- ``Operations/GetRefreshLibraryMetadataUnauthorized`` +- ``Operations/GetSearchLibraryErrors`` +- ``Operations/GetSearchLibraryLibraryErrors`` +- ``Operations/GetSearchLibraryMediaContainer`` +- ``Operations/GetSearchLibraryMetadata`` +- ``Operations/GetSearchLibraryRequest`` +- ``Operations/GetSearchLibraryResponseBody`` +- ``Operations/GetSearchLibraryUnauthorized`` +- ``Operations/GetServerIdentityMediaContainer`` +- ``Operations/GetServerIdentityRequestTimeout`` +- ``Operations/GetServerIdentityResponseBody`` +- ``Operations/GetServerResourcesErrors`` +- ``Operations/GetServerResourcesPlexErrors`` +- ``Operations/GetServerResourcesRequest`` +- ``Operations/GetServerResourcesUnauthorized`` +- ``Operations/GetThumbImageErrors`` +- ``Operations/GetThumbImageMediaErrors`` +- ``Operations/GetThumbImageRequest`` +- ``Operations/GetThumbImageUnauthorized`` +- ``Operations/GetWatchListErrors`` +- ``Operations/GetWatchListRequest`` +- ``Operations/GetWatchListResponseBody`` +- ``Operations/GetWatchListUnauthorized`` +- ``Operations/GetWatchListWatchlistErrors`` +- ``Operations/GetAvailableClientsErrors`` +- ``Operations/GetAvailableClientsMediaContainer`` +- ``Operations/GetAvailableClientsResponseBody`` +- ``Operations/GetAvailableClientsServerErrors`` +- ``Operations/GetAvailableClientsUnauthorized`` +- ``Operations/GetBandwidthStatisticsAccount`` +- ``Operations/GetBandwidthStatisticsDevice`` +- ``Operations/GetBandwidthStatisticsErrors`` +- ``Operations/GetBandwidthStatisticsMediaContainer`` +- ``Operations/GetBandwidthStatisticsRequest`` +- ``Operations/GetBandwidthStatisticsResponseBody`` +- ``Operations/GetBandwidthStatisticsStatisticsErrors`` +- ``Operations/GetBandwidthStatisticsUnauthorized`` +- ``Operations/GetButlerTasksButlerErrors`` +- ``Operations/GetButlerTasksErrors`` +- ``Operations/GetButlerTasksResponseBody`` +- ``Operations/GetButlerTasksUnauthorized`` +- ``Operations/GetCompanionsDataErrors`` +- ``Operations/GetCompanionsDataPlexErrors`` +- ``Operations/GetCompanionsDataUnauthorized`` +- ``Operations/GetDevicesErrors`` +- ``Operations/GetDevicesMediaContainer`` +- ``Operations/GetDevicesResponseBody`` +- ``Operations/GetDevicesServerErrors`` +- ``Operations/GetDevicesUnauthorized`` +- ``Operations/GetFileHashErrors`` +- ``Operations/GetFileHashLibraryErrors`` +- ``Operations/GetFileHashRequest`` +- ``Operations/GetFileHashUnauthorized`` +- ``Operations/GetGeoDataErrors`` +- ``Operations/GetGeoDataGeoData`` +- ``Operations/GetGeoDataPlexErrors`` +- ``Operations/GetGeoDataUnauthorized`` +- ``Operations/GetGlobalHubsErrors`` +- ``Operations/GetGlobalHubsHubsErrors`` +- ``Operations/GetGlobalHubsMediaContainer`` +- ``Operations/GetGlobalHubsMetadata`` +- ``Operations/GetGlobalHubsRequest`` +- ``Operations/GetGlobalHubsResponseBody`` +- ``Operations/GetGlobalHubsUnauthorized`` +- ``Operations/GetHomeDataErrors`` +- ``Operations/GetHomeDataPlexErrors`` +- ``Operations/GetHomeDataResponseBody`` +- ``Operations/GetHomeDataUnauthorized`` +- ``Operations/GetLibraryHubsCountry`` +- ``Operations/GetLibraryHubsDirector`` +- ``Operations/GetLibraryHubsErrors`` +- ``Operations/GetLibraryHubsGenre`` +- ``Operations/GetLibraryHubsHub`` +- ``Operations/GetLibraryHubsHubsErrors`` +- ``Operations/GetLibraryHubsMedia`` +- ``Operations/GetLibraryHubsMediaContainer`` +- ``Operations/GetLibraryHubsMetadata`` +- ``Operations/GetLibraryHubsPart`` +- ``Operations/GetLibraryHubsRequest`` +- ``Operations/GetLibraryHubsResponseBody`` +- ``Operations/GetLibraryHubsRole`` +- ``Operations/GetLibraryHubsUnauthorized`` +- ``Operations/GetLibraryHubsWriter`` - ``Operations/GetMetadataChildrenDirectory`` - ``Operations/GetMetadataChildrenErrors`` -- ``Operations/GetMetadataChildrenLibraryResponseBody`` +- ``Operations/GetMetadataChildrenLibraryErrors`` - ``Operations/GetMetadataChildrenMediaContainer`` - ``Operations/GetMetadataChildrenMetadata`` - ``Operations/GetMetadataChildrenRequest`` - ``Operations/GetMetadataChildrenResponseBody`` +- ``Operations/GetMetadataChildrenUnauthorized`` - ``Operations/GetMyPlexAccountErrors`` - ``Operations/GetMyPlexAccountResponseBody`` -- ``Operations/GetMyPlexAccountServerResponseBody`` +- ``Operations/GetMyPlexAccountServerErrors`` +- ``Operations/GetMyPlexAccountUnauthorized`` - ``Operations/GetOnDeckErrors`` - ``Operations/GetOnDeckGuids`` -- ``Operations/GetOnDeckLibraryResponseBody`` +- ``Operations/GetOnDeckLibraryErrors`` - ``Operations/GetOnDeckMedia`` - ``Operations/GetOnDeckMediaContainer`` - ``Operations/GetOnDeckMetadata`` - ``Operations/GetOnDeckPart`` - ``Operations/GetOnDeckResponseBody`` - ``Operations/GetOnDeckStream`` +- ``Operations/GetOnDeckUnauthorized`` +- ``Operations/GetPinAuthPinContainer`` - ``Operations/GetPinErrors`` -- ``Operations/GetPinPlexResponseBody`` - ``Operations/GetPinRequest`` -- ``Operations/GetPinResponseBody`` - ``Operations/GetPlaylistErrors`` - ``Operations/GetPlaylistMediaContainer`` - ``Operations/GetPlaylistMetadata`` -- ``Operations/GetPlaylistPlaylistsResponseBody`` +- ``Operations/GetPlaylistPlaylistsErrors`` - ``Operations/GetPlaylistRequest`` - ``Operations/GetPlaylistResponseBody`` +- ``Operations/GetPlaylistUnauthorized`` - ``Operations/GetPlaylistContentsCountry`` - ``Operations/GetPlaylistContentsDirector`` - ``Operations/GetPlaylistContentsErrors`` @@ -314,30 +483,37 @@ case .empty: - ``Operations/GetPlaylistContentsMediaContainer`` - ``Operations/GetPlaylistContentsMetadata`` - ``Operations/GetPlaylistContentsPart`` -- ``Operations/GetPlaylistContentsPlaylistsResponseBody`` +- ``Operations/GetPlaylistContentsPlaylistsErrors`` +- ``Operations/GetPlaylistContentsQueryParamType`` - ``Operations/GetPlaylistContentsRequest`` - ``Operations/GetPlaylistContentsResponseBody`` - ``Operations/GetPlaylistContentsRole`` +- ``Operations/GetPlaylistContentsUnauthorized`` - ``Operations/GetPlaylistContentsWriter`` - ``Operations/GetPlaylistsErrors`` - ``Operations/GetPlaylistsMediaContainer`` - ``Operations/GetPlaylistsMetadata`` -- ``Operations/GetPlaylistsPlaylistsResponseBody`` +- ``Operations/GetPlaylistsPlaylistsErrors`` - ``Operations/GetPlaylistsRequest`` - ``Operations/GetPlaylistsResponseBody`` +- ``Operations/GetPlaylistsUnauthorized`` - ``Operations/GetRecentlyAddedErrors`` -- ``Operations/GetRecentlyAddedLibraryResponseBody`` +- ``Operations/GetRecentlyAddedLibraryErrors`` - ``Operations/GetRecentlyAddedMediaContainer`` - ``Operations/GetRecentlyAddedMetadata`` +- ``Operations/GetRecentlyAddedRequest`` - ``Operations/GetRecentlyAddedResponseBody`` +- ``Operations/GetRecentlyAddedUnauthorized`` - ``Operations/GetResizedPhotoErrors`` - ``Operations/GetResizedPhotoRequest`` -- ``Operations/GetResizedPhotoResponseBody`` +- ``Operations/GetResizedPhotoServerErrors`` +- ``Operations/GetResizedPhotoUnauthorized`` - ``Operations/GetResourcesStatisticsErrors`` - ``Operations/GetResourcesStatisticsMediaContainer`` - ``Operations/GetResourcesStatisticsRequest`` - ``Operations/GetResourcesStatisticsResponseBody`` -- ``Operations/GetResourcesStatisticsStatisticsResponseBody`` +- ``Operations/GetResourcesStatisticsStatisticsErrors`` +- ``Operations/GetResourcesStatisticsUnauthorized`` - ``Operations/GetSearchResultsCountry`` - ``Operations/GetSearchResultsDirector`` - ``Operations/GetSearchResultsErrors`` @@ -349,183 +525,255 @@ case .empty: - ``Operations/GetSearchResultsRequest`` - ``Operations/GetSearchResultsResponseBody`` - ``Operations/GetSearchResultsRole`` -- ``Operations/GetSearchResultsSearchResponseBody`` +- ``Operations/GetSearchResultsSearchErrors`` +- ``Operations/GetSearchResultsUnauthorized`` - ``Operations/GetSearchResultsWriter`` -- ``Operations/GetServerActivitiesActivitiesResponseBody`` +- ``Operations/GetServerActivitiesActivitiesErrors`` - ``Operations/GetServerActivitiesErrors`` - ``Operations/GetServerActivitiesMediaContainer`` - ``Operations/GetServerActivitiesResponseBody`` +- ``Operations/GetServerActivitiesUnauthorized`` +- ``Operations/GetServerCapabilitiesErrors`` - ``Operations/GetServerCapabilitiesResponseBody`` -- ``Operations/GetServerCapabilitiesServerResponseBody`` -- ``Operations/GetServerIdentityErrors`` -- ``Operations/GetServerIdentityMediaContainer`` -- ``Operations/GetServerIdentityResponseBody`` -- ``Operations/GetServerIdentityServerResponseBody`` +- ``Operations/GetServerCapabilitiesUnauthorized`` - ``Operations/GetServerListErrors`` - ``Operations/GetServerListMediaContainer`` - ``Operations/GetServerListResponseBody`` - ``Operations/GetServerListServer`` -- ``Operations/GetServerListServerResponseBody`` +- ``Operations/GetServerListServerErrors`` +- ``Operations/GetServerListUnauthorized`` - ``Operations/GetServerPreferencesErrors`` - ``Operations/GetServerPreferencesMediaContainer`` - ``Operations/GetServerPreferencesResponseBody`` -- ``Operations/GetServerPreferencesServerResponseBody`` +- ``Operations/GetServerPreferencesServerErrors`` +- ``Operations/GetServerPreferencesUnauthorized`` - ``Operations/GetSessionHistoryErrors`` - ``Operations/GetSessionHistoryMediaContainer`` - ``Operations/GetSessionHistoryMetadata`` - ``Operations/GetSessionHistoryRequest`` - ``Operations/GetSessionHistoryResponseBody`` -- ``Operations/GetSessionHistorySessionsResponseBody`` +- ``Operations/GetSessionHistorySessionsErrors`` +- ``Operations/GetSessionHistoryUnauthorized`` - ``Operations/GetSessionsErrors`` - ``Operations/GetSessionsMedia`` - ``Operations/GetSessionsMediaContainer`` - ``Operations/GetSessionsMetadata`` - ``Operations/GetSessionsPart`` - ``Operations/GetSessionsResponseBody`` -- ``Operations/GetSessionsSessionsResponseBody`` +- ``Operations/GetSessionsSessionsErrors`` - ``Operations/GetSessionsStream`` +- ``Operations/GetSessionsUnauthorized`` - ``Operations/GetSessionsUser`` +- ``Operations/GetSourceConnectionInformationAuthenticationErrors`` - ``Operations/GetSourceConnectionInformationErrors`` - ``Operations/GetSourceConnectionInformationRequest`` -- ``Operations/GetSourceConnectionInformationResponseBody`` +- ``Operations/GetSourceConnectionInformationUnauthorized`` - ``Operations/GetStatisticsDevice`` - ``Operations/GetStatisticsErrors`` - ``Operations/GetStatisticsMediaContainer`` - ``Operations/GetStatisticsRequest`` - ``Operations/GetStatisticsResponseBody`` -- ``Operations/GetStatisticsStatisticsResponseBody`` +- ``Operations/GetStatisticsStatisticsErrors`` +- ``Operations/GetStatisticsUnauthorized`` - ``Operations/GetTimelineErrors`` - ``Operations/GetTimelineRequest`` -- ``Operations/GetTimelineResponseBody`` -- ``Operations/GetTokenErrors`` -- ``Operations/GetTokenLocation`` -- ``Operations/GetTokenPlexResponseBody`` -- ``Operations/GetTokenRequest`` -- ``Operations/GetTokenResponseBody`` +- ``Operations/GetTimelineUnauthorized`` +- ``Operations/GetTimelineVideoErrors`` +- ``Operations/GetTokenByPinIdAuthPinContainer`` +- ``Operations/GetTokenByPinIdErrors`` +- ``Operations/GetTokenByPinIdGeoData`` +- ``Operations/GetTokenByPinIdPlexErrors`` +- ``Operations/GetTokenByPinIdRequest`` +- ``Operations/GetTokenByPinIdResponseBody`` +- ``Operations/GetTokenDetailsAuthenticationErrors`` +- ``Operations/GetTokenDetailsAuthenticationResponseStatus`` +- ``Operations/GetTokenDetailsAuthenticationStatus`` +- ``Operations/GetTokenDetailsErrors`` +- ``Operations/GetTokenDetailsFeatures`` +- ``Operations/GetTokenDetailsStatus`` +- ``Operations/GetTokenDetailsSubscription`` +- ``Operations/GetTokenDetailsUnauthorized`` +- ``Operations/GetTokenDetailsUserPlexAccount`` - ``Operations/GetTopWatchedContentCountry`` +- ``Operations/GetTopWatchedContentErrors`` - ``Operations/GetTopWatchedContentGenre`` - ``Operations/GetTopWatchedContentGuids`` +- ``Operations/GetTopWatchedContentLibraryErrors`` - ``Operations/GetTopWatchedContentMediaContainer`` - ``Operations/GetTopWatchedContentMetadata`` +- ``Operations/GetTopWatchedContentQueryParamType`` - ``Operations/GetTopWatchedContentRequest`` - ``Operations/GetTopWatchedContentResponseBody`` - ``Operations/GetTopWatchedContentRole`` +- ``Operations/GetTopWatchedContentUnauthorized`` - ``Operations/GetTranscodeSessionsErrors`` - ``Operations/GetTranscodeSessionsMediaContainer`` - ``Operations/GetTranscodeSessionsResponseBody`` -- ``Operations/GetTranscodeSessionsSessionsResponseBody`` +- ``Operations/GetTranscodeSessionsSessionsErrors`` +- ``Operations/GetTranscodeSessionsUnauthorized`` +- ``Operations/GetTransientTokenAuthenticationErrors`` - ``Operations/GetTransientTokenErrors`` - ``Operations/GetTransientTokenQueryParamType`` - ``Operations/GetTransientTokenRequest`` -- ``Operations/GetTransientTokenResponseBody`` +- ``Operations/GetTransientTokenUnauthorized`` - ``Operations/GetUpdateStatusErrors`` - ``Operations/GetUpdateStatusMediaContainer`` - ``Operations/GetUpdateStatusResponseBody`` -- ``Operations/GetUpdateStatusUpdaterResponseBody`` -- ``Operations/GetWatchlistErrors`` -- ``Operations/GetWatchlistRequest`` -- ``Operations/GetWatchlistResponseBody`` -- ``Operations/GetWatchlistWatchlistResponseBody`` +- ``Operations/GetUpdateStatusUnauthorized`` +- ``Operations/GetUpdateStatusUpdaterErrors`` +- ``Operations/GetUserFriendsErrors`` +- ``Operations/GetUserFriendsPlexErrors`` +- ``Operations/GetUserFriendsUnauthorized`` - ``Operations/Guids`` - ``Operations/Hub`` - ``Operations/Image`` - ``Operations/IncludeCollections`` - ``Operations/IncludeDetails`` - ``Operations/IncludeExternalMedia`` +- ``Operations/IncludeGuids`` +- ``Operations/IncludeHttps`` +- ``Operations/IncludeIPv6`` +- ``Operations/IncludeMeta`` +- ``Operations/IncludeRelay`` +- ``Operations/InternalPaymentMethod`` - ``Operations/Level`` - ``Operations/LibrarySectionID`` - ``Operations/Libtype`` - ``Operations/Location`` - ``Operations/LogLineErrors`` +- ``Operations/LogLineLogErrors`` - ``Operations/LogLineRequest`` -- ``Operations/LogLineResponseBody`` +- ``Operations/LogLineUnauthorized`` - ``Operations/LogMultiLineErrors`` -- ``Operations/LogMultiLineResponseBody`` +- ``Operations/LogMultiLineLogErrors`` +- ``Operations/LogMultiLineUnauthorized`` +- ``Operations/MailingListStatus`` - ``Operations/MarkPlayedErrors`` +- ``Operations/MarkPlayedMediaErrors`` - ``Operations/MarkPlayedRequest`` -- ``Operations/MarkPlayedResponseBody`` +- ``Operations/MarkPlayedUnauthorized`` - ``Operations/MarkUnplayedErrors`` +- ``Operations/MarkUnplayedMediaErrors`` - ``Operations/MarkUnplayedRequest`` -- ``Operations/MarkUnplayedResponseBody`` +- ``Operations/MarkUnplayedUnauthorized`` - ``Operations/Media`` - ``Operations/MediaContainer`` +- ``Operations/MediaProvider`` +- ``Operations/MediaReviewsVisibility`` - ``Operations/Metadata`` - ``Operations/MinSize`` - ``Operations/MyPlex`` - ``Operations/OnlyTransient`` - ``Operations/Operator`` - ``Operations/Part`` -- ``Operations/PathParamFilter`` +- ``Operations/PastSubscription`` - ``Operations/PathParamTaskName`` - ``Operations/PerformSearchErrors`` - ``Operations/PerformSearchRequest`` -- ``Operations/PerformSearchResponseBody`` +- ``Operations/PerformSearchSearchErrors`` +- ``Operations/PerformSearchUnauthorized`` - ``Operations/PerformVoiceSearchErrors`` - ``Operations/PerformVoiceSearchRequest`` -- ``Operations/PerformVoiceSearchResponseBody`` +- ``Operations/PerformVoiceSearchSearchErrors`` +- ``Operations/PerformVoiceSearchUnauthorized`` +- ``Operations/Pivot`` - ``Operations/Player`` - ``Operations/PlaylistType`` +- ``Operations/PlexDevice`` +- ``Operations/PostUsersSignInDataAuthenticationErrors`` +- ``Operations/PostUsersSignInDataAuthenticationFeatures`` +- ``Operations/PostUsersSignInDataAuthenticationResponseStatus`` +- ``Operations/PostUsersSignInDataAuthenticationStatus`` +- ``Operations/PostUsersSignInDataAuthenticationSubscription`` +- ``Operations/PostUsersSignInDataAutoSelectSubtitle`` +- ``Operations/PostUsersSignInDataDefaultSubtitleAccessibility`` +- ``Operations/PostUsersSignInDataDefaultSubtitleForced`` +- ``Operations/PostUsersSignInDataErrors`` +- ``Operations/PostUsersSignInDataFeatures`` +- ``Operations/PostUsersSignInDataMailingListStatus`` +- ``Operations/PostUsersSignInDataMediaReviewsVisibility`` +- ``Operations/PostUsersSignInDataRequest`` +- ``Operations/PostUsersSignInDataRequestBody`` +- ``Operations/PostUsersSignInDataServices`` +- ``Operations/PostUsersSignInDataState`` +- ``Operations/PostUsersSignInDataStatus`` +- ``Operations/PostUsersSignInDataSubscription`` +- ``Operations/PostUsersSignInDataUnauthorized`` +- ``Operations/PostUsersSignInDataUserPlexAccount`` +- ``Operations/PostUsersSignInDataUserProfile`` +- ``Operations/PostUsersSignInDataWatchedIndicator`` - ``Operations/Producer`` - ``Operations/Provider`` +- ``Operations/QueryParamFilter`` +- ``Operations/QueryParamForce`` - ``Operations/QueryParamOnlyTransient`` - ``Operations/QueryParamSmart`` - ``Operations/QueryParamType`` - ``Operations/Ratings`` -- ``Operations/RefreshLibraryErrors`` -- ``Operations/RefreshLibraryRequest`` -- ``Operations/RefreshLibraryResponseBody`` - ``Operations/Release`` +- ``Operations/ResponseBody`` - ``Operations/Role`` - ``Operations/Scope`` -- ``Operations/SearchLibraryErrors`` -- ``Operations/SearchLibraryLibraryResponseBody`` -- ``Operations/SearchLibraryMediaContainer`` -- ``Operations/SearchLibraryMetadata`` -- ``Operations/SearchLibraryRequest`` -- ``Operations/SearchLibraryResponseBody`` - ``Operations/Server`` +- ``Operations/Services`` - ``Operations/Session`` - ``Operations/Setting`` +- ``Operations/SharedServers`` +- ``Operations/SharedSources`` - ``Operations/Skip`` - ``Operations/Smart`` - ``Operations/Sort`` +- ``Operations/StartAllTasksButlerErrors`` - ``Operations/StartAllTasksErrors`` -- ``Operations/StartAllTasksResponseBody`` +- ``Operations/StartAllTasksUnauthorized`` +- ``Operations/StartTaskButlerErrors`` - ``Operations/StartTaskErrors`` - ``Operations/StartTaskRequest`` -- ``Operations/StartTaskResponseBody`` +- ``Operations/StartTaskUnauthorized`` - ``Operations/StartUniversalTranscodeErrors`` - ``Operations/StartUniversalTranscodeRequest`` -- ``Operations/StartUniversalTranscodeResponseBody`` +- ``Operations/StartUniversalTranscodeUnauthorized`` +- ``Operations/StartUniversalTranscodeVideoErrors`` - ``Operations/State`` - ``Operations/StatisticsBandwidth`` - ``Operations/StatisticsMedia`` - ``Operations/StatisticsResources`` +- ``Operations/Status`` +- ``Operations/StopAllTasksButlerErrors`` - ``Operations/StopAllTasksErrors`` -- ``Operations/StopAllTasksResponseBody`` +- ``Operations/StopAllTasksUnauthorized`` +- ``Operations/StopTaskButlerErrors`` - ``Operations/StopTaskErrors`` - ``Operations/StopTaskRequest`` -- ``Operations/StopTaskResponseBody`` +- ``Operations/StopTaskUnauthorized`` - ``Operations/StopTranscodeSessionErrors`` - ``Operations/StopTranscodeSessionRequest`` -- ``Operations/StopTranscodeSessionResponseBody`` +- ``Operations/StopTranscodeSessionSessionsErrors`` +- ``Operations/StopTranscodeSessionUnauthorized`` - ``Operations/Stream`` +- ``Operations/Subscription`` - ``Operations/Tag`` - ``Operations/TaskName`` - ``Operations/Tonight`` - ``Operations/TranscodeSession`` +- ``Operations/Trials`` - ``Operations/TypeModel`` - ``Operations/UpdatePlaylistErrors`` +- ``Operations/UpdatePlaylistPlaylistsErrors`` - ``Operations/UpdatePlaylistRequest`` -- ``Operations/UpdatePlaylistResponseBody`` +- ``Operations/UpdatePlaylistUnauthorized`` - ``Operations/UpdatePlayProgressErrors`` +- ``Operations/UpdatePlayProgressMediaErrors`` - ``Operations/UpdatePlayProgressRequest`` -- ``Operations/UpdatePlayProgressResponseBody`` +- ``Operations/UpdatePlayProgressUnauthorized`` - ``Operations/UploadPlaylistErrors`` +- ``Operations/UploadPlaylistPlaylistsErrors`` - ``Operations/UploadPlaylistRequest`` -- ``Operations/UploadPlaylistResponseBody`` +- ``Operations/UploadPlaylistUnauthorized`` - ``Operations/Upscale`` - ``Operations/User`` +- ``Operations/UserProfile`` +- ``Operations/WatchedIndicator`` - ``Operations/Writer`` ### Type groupings diff --git a/Sources/Plexswift/configuration/GlobalParameters.swift b/Sources/Plexswift/configuration/GlobalParameters.swift index 24955d5..d70e7f1 100644 --- a/Sources/Plexswift/configuration/GlobalParameters.swift +++ b/Sources/Plexswift/configuration/GlobalParameters.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -31,6 +31,7 @@ extension GlobalParameters: ParameterDefaults { public func defaultQueryParameter(for key: String) -> AnyValue? { switch key { + case "X-Plex-Client-Identifier": return xPlexClientIdentifier.map { AnyValue($0) } default: return nil } } diff --git a/Sources/Plexswift/configuration/GlobalServer.swift b/Sources/Plexswift/configuration/GlobalServer.swift index 16fd835..5d8122e 100644 --- a/Sources/Plexswift/configuration/GlobalServer.swift +++ b/Sources/Plexswift/configuration/GlobalServer.swift @@ -1,8 +1,9 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation +/// The protocol to use for the server connection public enum ServerProtocol: String, Codable, APIValue { case http = "http" case https = "https" @@ -12,7 +13,7 @@ enum GlobalServers: Servers, ServerConvertible { /// Supported server value with substituted variables /// /// Corresponds to `{protocol}://{ip}:{port}` - case server1(`protocol`: ServerProtocol = .http, ip: String = "10.10.10.47", port: String = "32400") + case server1(`protocol`: ServerProtocol = .https, ip: String = "10.10.10.47", port: String = "32400") /// Defines the raw URL strings for each server option. /// diff --git a/Sources/Plexswift/internal/api/_ActivitiesAPI.swift b/Sources/Plexswift/internal/api/_ActivitiesAPI.swift index d02d4a7..1b9ac8f 100644 --- a/Sources/Plexswift/internal/api/_ActivitiesAPI.swift +++ b/Sources/Plexswift/internal/api/_ActivitiesAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -53,17 +53,23 @@ private func handleGetServerActivitiesResponse(response: Client.APIResponse) thr if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerActivitiesResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetServerActivitiesResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetServerActivitiesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerActivitiesActivitiesResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetServerActivitiesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -76,12 +82,20 @@ private func handleGetServerActivitiesResponse(response: Client.APIResponse) thr private func handleCancelServerActivitiesResponse(response: Client.APIResponse) throws -> Operations.CancelServerActivitiesResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.CancelServerActivitiesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.CancelServerActivitiesResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.CancelServerActivitiesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_AuthenticationAPI.swift b/Sources/Plexswift/internal/api/_AuthenticationAPI.swift index 6df1288..a04b2dc 100644 --- a/Sources/Plexswift/internal/api/_AuthenticationAPI.swift +++ b/Sources/Plexswift/internal/api/_AuthenticationAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -27,6 +27,26 @@ class _AuthenticationAPI: AuthenticationAPI { handleResponse: handleGetSourceConnectionInformationResponse ) } + + public func getTokenDetails(server: AuthenticationServers.GetTokenDetails?) async throws -> Response { + return try await client.makeRequest( + with: try server?.server() ?? AuthenticationServers.GetTokenDetails.default(), + configureRequest: { configuration in + try configureGetTokenDetailsRequest(with: configuration) + }, + handleResponse: handleGetTokenDetailsResponse + ) + } + + public func postUsersSignInData(request: Operations.PostUsersSignInDataRequest, server: AuthenticationServers.PostUsersSignInData?) async throws -> Response { + return try await client.makeRequest( + with: try server?.server() ?? AuthenticationServers.PostUsersSignInData.default(), + configureRequest: { configuration in + try configurePostUsersSignInDataRequest(with: configuration, request: request) + }, + handleResponse: handlePostUsersSignInDataResponse + ) + } } @@ -46,17 +66,40 @@ private func configureGetSourceConnectionInformationRequest(with configuration: configuration.telemetryHeader = .userAgent } +private func configureGetTokenDetailsRequest(with configuration: URLRequestConfiguration) throws { + configuration.path = "/user" + configuration.method = .get + configuration.telemetryHeader = .userAgent +} + +private func configurePostUsersSignInDataRequest(with configuration: URLRequestConfiguration, request: Operations.PostUsersSignInDataRequest) throws { + configuration.path = "/users/signin" + configuration.method = .post + configuration.queryParameterSerializable = request + configuration.contentType = "application/x-www-form-urlencoded" + configuration.body = try serializeFormData(with: request.requestBody) + configuration.telemetryHeader = .userAgent +} + // MARK: - Response Handlers private func handleGetTransientTokenResponse(response: Client.APIResponse) throws -> Operations.GetTransientTokenResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetTransientTokenBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.GetTransientTokenResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetTransientTokenUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -69,12 +112,84 @@ private func handleGetTransientTokenResponse(response: Client.APIResponse) throw private func handleGetSourceConnectionInformationResponse(response: Client.APIResponse) throws -> Operations.GetSourceConnectionInformationResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetSourceConnectionInformationBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.GetSourceConnectionInformationResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetSourceConnectionInformationUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handleGetTokenDetailsResponse(response: Client.APIResponse) throws -> Operations.GetTokenDetailsResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .userPlexAccount(try JSONDecoder().decode(Operations.GetTokenDetailsUserPlexAccount.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetTokenDetailsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetTokenDetailsUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handlePostUsersSignInDataResponse(response: Client.APIResponse) throws -> Operations.PostUsersSignInDataResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 201 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .userPlexAccount(try JSONDecoder().decode(Operations.PostUsersSignInDataUserPlexAccount.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.PostUsersSignInDataBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.PostUsersSignInDataUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_ButlerAPI.swift b/Sources/Plexswift/internal/api/_ButlerAPI.swift index c03cf77..899174e 100644 --- a/Sources/Plexswift/internal/api/_ButlerAPI.swift +++ b/Sources/Plexswift/internal/api/_ButlerAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -99,17 +99,23 @@ private func handleGetButlerTasksResponse(response: Client.APIResponse) throws - if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetButlerTasksResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetButlerTasksResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetButlerTasksBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetButlerTasksButlerResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetButlerTasksUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -122,12 +128,20 @@ private func handleGetButlerTasksResponse(response: Client.APIResponse) throws - private func handleStartAllTasksResponse(response: Client.APIResponse) throws -> Operations.StartAllTasksResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.StartAllTasksBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.StartAllTasksResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.StartAllTasksUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -140,12 +154,20 @@ private func handleStartAllTasksResponse(response: Client.APIResponse) throws -> private func handleStopAllTasksResponse(response: Client.APIResponse) throws -> Operations.StopAllTasksResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.StopAllTasksBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.StopAllTasksResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.StopAllTasksUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -158,12 +180,20 @@ private func handleStopAllTasksResponse(response: Client.APIResponse) throws -> private func handleStartTaskResponse(response: Client.APIResponse) throws -> Operations.StartTaskResponse { let httpResponse = response.httpResponse - if [200, 202, 400].contains(httpResponse.statusCode) { + if [200, 202].contains(httpResponse.statusCode) { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.StartTaskBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.StartTaskResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.StartTaskUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -176,12 +206,20 @@ private func handleStartTaskResponse(response: Client.APIResponse) throws -> Ope private func handleStopTaskResponse(response: Client.APIResponse) throws -> Operations.StopTaskResponse { let httpResponse = response.httpResponse - if [200, 400, 404].contains(httpResponse.statusCode) { + if [200, 404].contains(httpResponse.statusCode) { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.StopTaskBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.StopTaskResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.StopTaskUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_HubsAPI.swift b/Sources/Plexswift/internal/api/_HubsAPI.swift index 36ab6b1..b420ac2 100644 --- a/Sources/Plexswift/internal/api/_HubsAPI.swift +++ b/Sources/Plexswift/internal/api/_HubsAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -55,17 +55,23 @@ private func handleGetGlobalHubsResponse(response: Client.APIResponse) throws -> if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetGlobalHubsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetGlobalHubsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetGlobalHubsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetGlobalHubsHubsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetGlobalHubsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -81,17 +87,23 @@ private func handleGetLibraryHubsResponse(response: Client.APIResponse) throws - if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibraryHubsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetLibraryHubsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetLibraryHubsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibraryHubsHubsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetLibraryHubsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_LibraryAPI.swift b/Sources/Plexswift/internal/api/_LibraryAPI.swift index 9cf1edc..b17ad1e 100644 --- a/Sources/Plexswift/internal/api/_LibraryAPI.swift +++ b/Sources/Plexswift/internal/api/_LibraryAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,30 +19,30 @@ class _LibraryAPI: LibraryAPI { ) } - public func getRecentlyAdded() async throws -> Response { + public func getRecentlyAdded(request: Operations.GetRecentlyAddedRequest) async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in - try configureGetRecentlyAddedRequest(with: configuration) + try configureGetRecentlyAddedRequest(with: configuration, request: request) }, handleResponse: handleGetRecentlyAddedResponse ) } - public func getLibraries() async throws -> Response { + public func getAllLibraries() async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in - try configureGetLibrariesRequest(with: configuration) + try configureGetAllLibrariesRequest(with: configuration) }, - handleResponse: handleGetLibrariesResponse + handleResponse: handleGetAllLibrariesResponse ) } - public func getLibrary(request: Operations.GetLibraryRequest) async throws -> Response { + public func getLibraryDetails(request: Operations.GetLibraryDetailsRequest) async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in - try configureGetLibraryRequest(with: configuration, request: request) + try configureGetLibraryDetailsRequest(with: configuration, request: request) }, - handleResponse: handleGetLibraryResponse + handleResponse: handleGetLibraryDetailsResponse ) } @@ -64,30 +64,30 @@ class _LibraryAPI: LibraryAPI { ) } - public func refreshLibrary(request: Operations.RefreshLibraryRequest) async throws -> Response { + public func getRefreshLibraryMetadata(request: Operations.GetRefreshLibraryMetadataRequest) async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in - try configureRefreshLibraryRequest(with: configuration, request: request) + try configureGetRefreshLibraryMetadataRequest(with: configuration, request: request) }, - handleResponse: handleRefreshLibraryResponse + handleResponse: handleGetRefreshLibraryMetadataResponse ) } - public func searchLibrary(request: Operations.SearchLibraryRequest) async throws -> Response { + public func getSearchLibrary(request: Operations.GetSearchLibraryRequest) async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in - try configureSearchLibraryRequest(with: configuration, request: request) + try configureGetSearchLibraryRequest(with: configuration, request: request) }, - handleResponse: handleSearchLibraryResponse + handleResponse: handleGetSearchLibraryResponse ) } - public func getMetadata(request: Operations.GetMetadataRequest) async throws -> Response { + public func getMetaDataByRatingKey(request: Operations.GetMetaDataByRatingKeyRequest) async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in - try configureGetMetadataRequest(with: configuration, request: request) + try configureGetMetaDataByRatingKeyRequest(with: configuration, request: request) }, - handleResponse: handleGetMetadataResponse + handleResponse: handleGetMetaDataByRatingKeyResponse ) } @@ -129,20 +129,21 @@ private func configureGetFileHashRequest(with configuration: URLRequestConfigura configuration.telemetryHeader = .userAgent } -private func configureGetRecentlyAddedRequest(with configuration: URLRequestConfiguration) throws { +private func configureGetRecentlyAddedRequest(with configuration: URLRequestConfiguration, request: Operations.GetRecentlyAddedRequest) throws { configuration.path = "/library/recentlyAdded" configuration.method = .get + configuration.queryParameterSerializable = request configuration.telemetryHeader = .userAgent } -private func configureGetLibrariesRequest(with configuration: URLRequestConfiguration) throws { +private func configureGetAllLibrariesRequest(with configuration: URLRequestConfiguration) throws { configuration.path = "/library/sections" configuration.method = .get configuration.telemetryHeader = .userAgent } -private func configureGetLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.GetLibraryRequest) throws { - configuration.path = "/library/sections/{sectionId}" +private func configureGetLibraryDetailsRequest(with configuration: URLRequestConfiguration, request: Operations.GetLibraryDetailsRequest) throws { + configuration.path = "/library/sections/{sectionKey}" configuration.method = .get configuration.pathParameterSerializable = request configuration.queryParameterSerializable = request @@ -150,36 +151,37 @@ private func configureGetLibraryRequest(with configuration: URLRequestConfigurat } private func configureDeleteLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.DeleteLibraryRequest) throws { - configuration.path = "/library/sections/{sectionId}" + configuration.path = "/library/sections/{sectionKey}" configuration.method = .delete configuration.pathParameterSerializable = request configuration.telemetryHeader = .userAgent } private func configureGetLibraryItemsRequest(with configuration: URLRequestConfiguration, request: Operations.GetLibraryItemsRequest) throws { - configuration.path = "/library/sections/{sectionId}/{tag}" + configuration.path = "/library/sections/{sectionKey}/{tag}" configuration.method = .get configuration.pathParameterSerializable = request configuration.queryParameterSerializable = request configuration.telemetryHeader = .userAgent } -private func configureRefreshLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.RefreshLibraryRequest) throws { - configuration.path = "/library/sections/{sectionId}/refresh" - configuration.method = .get - configuration.pathParameterSerializable = request - configuration.telemetryHeader = .userAgent -} - -private func configureSearchLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.SearchLibraryRequest) throws { - configuration.path = "/library/sections/{sectionId}/search" +private func configureGetRefreshLibraryMetadataRequest(with configuration: URLRequestConfiguration, request: Operations.GetRefreshLibraryMetadataRequest) throws { + configuration.path = "/library/sections/{sectionKey}/refresh" configuration.method = .get configuration.pathParameterSerializable = request configuration.queryParameterSerializable = request configuration.telemetryHeader = .userAgent } -private func configureGetMetadataRequest(with configuration: URLRequestConfiguration, request: Operations.GetMetadataRequest) throws { +private func configureGetSearchLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.GetSearchLibraryRequest) throws { + configuration.path = "/library/sections/{sectionKey}/search" + configuration.method = .get + configuration.pathParameterSerializable = request + configuration.queryParameterSerializable = request + configuration.telemetryHeader = .userAgent +} + +private func configureGetMetaDataByRatingKeyRequest(with configuration: URLRequestConfiguration, request: Operations.GetMetaDataByRatingKeyRequest) throws { configuration.path = "/library/metadata/{ratingKey}" configuration.method = .get configuration.pathParameterSerializable = request @@ -212,12 +214,20 @@ private func configureGetOnDeckRequest(with configuration: URLRequestConfigurati private func handleGetFileHashResponse(response: Client.APIResponse) throws -> Operations.GetFileHashResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetFileHashBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.GetFileHashResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetFileHashUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -233,17 +243,23 @@ private func handleGetRecentlyAddedResponse(response: Client.APIResponse) throws if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetRecentlyAddedResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetRecentlyAddedResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetRecentlyAddedBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetRecentlyAddedLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetRecentlyAddedUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -253,23 +269,29 @@ private func handleGetRecentlyAddedResponse(response: Client.APIResponse) throws return .empty } -private func handleGetLibrariesResponse(response: Client.APIResponse) throws -> Operations.GetLibrariesResponse { +private func handleGetAllLibrariesResponse(response: Client.APIResponse) throws -> Operations.GetAllLibrariesResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibrariesResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetAllLibrariesResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetAllLibrariesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibrariesLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetAllLibrariesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -279,23 +301,29 @@ private func handleGetLibrariesResponse(response: Client.APIResponse) throws -> return .empty } -private func handleGetLibraryResponse(response: Client.APIResponse) throws -> Operations.GetLibraryResponse { +private func handleGetLibraryDetailsResponse(response: Client.APIResponse) throws -> Operations.GetLibraryDetailsResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibraryResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetLibraryDetailsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetLibraryDetailsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibraryLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetLibraryDetailsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -308,12 +336,20 @@ private func handleGetLibraryResponse(response: Client.APIResponse) throws -> Op private func handleDeleteLibraryResponse(response: Client.APIResponse) throws -> Operations.DeleteLibraryResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.DeleteLibraryBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.DeleteLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.DeleteLibraryUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -329,17 +365,23 @@ private func handleGetLibraryItemsResponse(response: Client.APIResponse) throws if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibraryItemsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetLibraryItemsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetLibraryItemsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetLibraryItemsLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetLibraryItemsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -349,15 +391,23 @@ private func handleGetLibraryItemsResponse(response: Client.APIResponse) throws return .empty } -private func handleRefreshLibraryResponse(response: Client.APIResponse) throws -> Operations.RefreshLibraryResponse { +private func handleGetRefreshLibraryMetadataResponse(response: Client.APIResponse) throws -> Operations.GetRefreshLibraryMetadataResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetRefreshLibraryMetadataBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.RefreshLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetRefreshLibraryMetadataUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -367,23 +417,29 @@ private func handleRefreshLibraryResponse(response: Client.APIResponse) throws - return .empty } -private func handleSearchLibraryResponse(response: Client.APIResponse) throws -> Operations.SearchLibraryResponse { +private func handleGetSearchLibraryResponse(response: Client.APIResponse) throws -> Operations.GetSearchLibraryResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.SearchLibraryResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetSearchLibraryResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetSearchLibraryBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.SearchLibraryLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetSearchLibraryUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -393,23 +449,29 @@ private func handleSearchLibraryResponse(response: Client.APIResponse) throws -> return .empty } -private func handleGetMetadataResponse(response: Client.APIResponse) throws -> Operations.GetMetadataResponse { +private func handleGetMetaDataByRatingKeyResponse(response: Client.APIResponse) throws -> Operations.GetMetaDataByRatingKeyResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetMetadataResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetMetaDataByRatingKeyResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetMetaDataByRatingKeyBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetMetadataLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetMetaDataByRatingKeyUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -425,17 +487,23 @@ private func handleGetMetadataChildrenResponse(response: Client.APIResponse) thr if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetMetadataChildrenResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetMetadataChildrenResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetMetadataChildrenBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetMetadataChildrenLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetMetadataChildrenUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -456,6 +524,22 @@ private func handleGetTopWatchedContentResponse(response: Client.APIResponse) th throw ResponseHandlerError.failedToDecodeJSON(error) } } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetTopWatchedContentBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetTopWatchedContentUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } return .empty @@ -467,17 +551,23 @@ private func handleGetOnDeckResponse(response: Client.APIResponse) throws -> Ope if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetOnDeckResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetOnDeckResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetOnDeckBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetOnDeckLibraryResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetOnDeckUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_LogAPI.swift b/Sources/Plexswift/internal/api/_LogAPI.swift index 13e0b89..7f1859e 100644 --- a/Sources/Plexswift/internal/api/_LogAPI.swift +++ b/Sources/Plexswift/internal/api/_LogAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -70,12 +70,20 @@ private func configureEnablePaperTrailRequest(with configuration: URLRequestConf private func handleLogLineResponse(response: Client.APIResponse) throws -> Operations.LogLineResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.LogLineBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.LogLineResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.LogLineUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -88,12 +96,20 @@ private func handleLogLineResponse(response: Client.APIResponse) throws -> Opera private func handleLogMultiLineResponse(response: Client.APIResponse) throws -> Operations.LogMultiLineResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.LogMultiLineBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.LogMultiLineResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.LogMultiLineUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -106,12 +122,20 @@ private func handleLogMultiLineResponse(response: Client.APIResponse) throws -> private func handleEnablePaperTrailResponse(response: Client.APIResponse) throws -> Operations.EnablePaperTrailResponse { let httpResponse = response.httpResponse - if [200, 400, 403].contains(httpResponse.statusCode) { + if [200, 403].contains(httpResponse.statusCode) { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.EnablePaperTrailBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.EnablePaperTrailResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.EnablePaperTrailUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_MediaAPI.swift b/Sources/Plexswift/internal/api/_MediaAPI.swift index 30f7ee0..9b34c29 100644 --- a/Sources/Plexswift/internal/api/_MediaAPI.swift +++ b/Sources/Plexswift/internal/api/_MediaAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -36,6 +36,24 @@ class _MediaAPI: MediaAPI { handleResponse: handleUpdatePlayProgressResponse ) } + + public func getBannerImage(request: Operations.GetBannerImageRequest) async throws -> ResponseWithHeaders { + return try await client.makeRequest( + configureRequest: { configuration in + try configureGetBannerImageRequest(with: configuration, request: request) + }, + handleResponse: handleGetBannerImageResponse + ) + } + + public func getThumbImage(request: Operations.GetThumbImageRequest) async throws -> ResponseWithHeaders { + return try await client.makeRequest( + configureRequest: { configuration in + try configureGetThumbImageRequest(with: configuration, request: request) + }, + handleResponse: handleGetThumbImageResponse + ) + } } @@ -62,17 +80,41 @@ private func configureUpdatePlayProgressRequest(with configuration: URLRequestCo configuration.telemetryHeader = .userAgent } +private func configureGetBannerImageRequest(with configuration: URLRequestConfiguration, request: Operations.GetBannerImageRequest) throws { + configuration.path = "/library/metadata/{ratingKey}/banner" + configuration.method = .get + configuration.pathParameterSerializable = request + configuration.queryParameterSerializable = request + configuration.telemetryHeader = .userAgent +} + +private func configureGetThumbImageRequest(with configuration: URLRequestConfiguration, request: Operations.GetThumbImageRequest) throws { + configuration.path = "/library/metadata/{ratingKey}/thumb" + configuration.method = .get + configuration.pathParameterSerializable = request + configuration.queryParameterSerializable = request + configuration.telemetryHeader = .userAgent +} + // MARK: - Response Handlers private func handleMarkPlayedResponse(response: Client.APIResponse) throws -> Operations.MarkPlayedResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.MarkPlayedBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.MarkPlayedResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.MarkPlayedUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -85,12 +127,20 @@ private func handleMarkPlayedResponse(response: Client.APIResponse) throws -> Op private func handleMarkUnplayedResponse(response: Client.APIResponse) throws -> Operations.MarkUnplayedResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.MarkUnplayedBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.MarkUnplayedResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.MarkUnplayedUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -103,12 +153,76 @@ private func handleMarkUnplayedResponse(response: Client.APIResponse) throws -> private func handleUpdatePlayProgressResponse(response: Client.APIResponse) throws -> Operations.UpdatePlayProgressResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.UpdatePlayProgressBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.UpdatePlayProgressResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.UpdatePlayProgressUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handleGetBannerImageResponse(response: Client.APIResponse) throws -> Operations.GetBannerImageResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "image/jpeg"), let data = response.data { + return .bytes(data) + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetBannerImageBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetBannerImageUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handleGetThumbImageResponse(response: Client.APIResponse) throws -> Operations.GetThumbImageResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "image/jpeg"), let data = response.data { + return .bytes(data) + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetThumbImageBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetThumbImageUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_PlaylistsAPI.swift b/Sources/Plexswift/internal/api/_PlaylistsAPI.swift index 50d0cfe..feb0148 100644 --- a/Sources/Plexswift/internal/api/_PlaylistsAPI.swift +++ b/Sources/Plexswift/internal/api/_PlaylistsAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -169,17 +169,23 @@ private func handleCreatePlaylistResponse(response: Client.APIResponse) throws - if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.CreatePlaylistResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.CreatePlaylistResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.CreatePlaylistBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.CreatePlaylistPlaylistsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.CreatePlaylistUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -195,17 +201,23 @@ private func handleGetPlaylistsResponse(response: Client.APIResponse) throws -> if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetPlaylistsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetPlaylistsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetPlaylistsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetPlaylistsPlaylistsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetPlaylistsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -221,17 +233,23 @@ private func handleGetPlaylistResponse(response: Client.APIResponse) throws -> O if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetPlaylistResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetPlaylistResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetPlaylistBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetPlaylistPlaylistsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetPlaylistUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -244,12 +262,20 @@ private func handleGetPlaylistResponse(response: Client.APIResponse) throws -> O private func handleDeletePlaylistResponse(response: Client.APIResponse) throws -> Operations.DeletePlaylistResponse { let httpResponse = response.httpResponse - if [204, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 204 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.DeletePlaylistBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.DeletePlaylistResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.DeletePlaylistUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -262,12 +288,20 @@ private func handleDeletePlaylistResponse(response: Client.APIResponse) throws - private func handleUpdatePlaylistResponse(response: Client.APIResponse) throws -> Operations.UpdatePlaylistResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.UpdatePlaylistBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.UpdatePlaylistResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.UpdatePlaylistUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -283,17 +317,23 @@ private func handleGetPlaylistContentsResponse(response: Client.APIResponse) thr if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetPlaylistContentsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetPlaylistContentsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetPlaylistContentsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetPlaylistContentsPlaylistsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetPlaylistContentsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -306,12 +346,20 @@ private func handleGetPlaylistContentsResponse(response: Client.APIResponse) thr private func handleClearPlaylistContentsResponse(response: Client.APIResponse) throws -> Operations.ClearPlaylistContentsResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.ClearPlaylistContentsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.ClearPlaylistContentsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.ClearPlaylistContentsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -327,17 +375,23 @@ private func handleAddPlaylistContentsResponse(response: Client.APIResponse) thr if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.AddPlaylistContentsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.AddPlaylistContentsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.AddPlaylistContentsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.AddPlaylistContentsPlaylistsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.AddPlaylistContentsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -350,12 +404,20 @@ private func handleAddPlaylistContentsResponse(response: Client.APIResponse) thr private func handleUploadPlaylistResponse(response: Client.APIResponse) throws -> Operations.UploadPlaylistResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.UploadPlaylistBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.UploadPlaylistResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.UploadPlaylistUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_PlexAPI.swift b/Sources/Plexswift/internal/api/_PlexAPI.swift index 2de559a..eef537c 100644 --- a/Sources/Plexswift/internal/api/_PlexAPI.swift +++ b/Sources/Plexswift/internal/api/_PlexAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -10,6 +10,36 @@ class _PlexAPI: PlexAPI { self.client = client } + public func getCompanionsData(server: PlexServers.GetCompanionsData?) async throws -> Response { + return try await client.makeRequest( + with: try server?.server() ?? PlexServers.GetCompanionsData.default(), + configureRequest: { configuration in + try configureGetCompanionsDataRequest(with: configuration) + }, + handleResponse: handleGetCompanionsDataResponse + ) + } + + public func getUserFriends(server: PlexServers.GetUserFriends?) async throws -> Response { + return try await client.makeRequest( + with: try server?.server() ?? PlexServers.GetUserFriends.default(), + configureRequest: { configuration in + try configureGetUserFriendsRequest(with: configuration) + }, + handleResponse: handleGetUserFriendsResponse + ) + } + + public func getGeoData(server: PlexServers.GetGeoData?) async throws -> Response { + return try await client.makeRequest( + with: try server?.server() ?? PlexServers.GetGeoData.default(), + configureRequest: { configuration in + try configureGetGeoDataRequest(with: configuration) + }, + handleResponse: handleGetGeoDataResponse + ) + } + public func getHomeData() async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in @@ -19,6 +49,16 @@ class _PlexAPI: PlexAPI { ) } + public func getServerResources(request: Operations.GetServerResourcesRequest, server: PlexServers.GetServerResources?) async throws -> Response { + return try await client.makeRequest( + with: try server?.server() ?? PlexServers.GetServerResources.default(), + configureRequest: { configuration in + try configureGetServerResourcesRequest(with: configuration, request: request) + }, + handleResponse: handleGetServerResourcesResponse + ) + } + public func getPin(request: Operations.GetPinRequest, server: PlexServers.GetPin?) async throws -> Response { return try await client.makeRequest( with: try server?.server() ?? PlexServers.GetPin.default(), @@ -29,13 +69,13 @@ class _PlexAPI: PlexAPI { ) } - public func getToken(request: Operations.GetTokenRequest, server: PlexServers.GetToken?) async throws -> Response { + public func getTokenByPinId(request: Operations.GetTokenByPinIdRequest, server: PlexServers.GetTokenByPinId?) async throws -> Response { return try await client.makeRequest( - with: try server?.server() ?? PlexServers.GetToken.default(), + with: try server?.server() ?? PlexServers.GetTokenByPinId.default(), configureRequest: { configuration in - try configureGetTokenRequest(with: configuration, request: request) + try configureGetTokenByPinIdRequest(with: configuration, request: request) }, - handleResponse: handleGetTokenResponse + handleResponse: handleGetTokenByPinIdResponse ) } @@ -43,47 +83,205 @@ class _PlexAPI: PlexAPI { // MARK: - Request Configuration +private func configureGetCompanionsDataRequest(with configuration: URLRequestConfiguration) throws { + configuration.path = "/companions" + configuration.method = .get + configuration.telemetryHeader = .userAgent +} + +private func configureGetUserFriendsRequest(with configuration: URLRequestConfiguration) throws { + configuration.path = "/friends" + configuration.method = .get + configuration.telemetryHeader = .userAgent +} + +private func configureGetGeoDataRequest(with configuration: URLRequestConfiguration) throws { + configuration.path = "/geoip" + configuration.method = .get + configuration.telemetryHeader = .userAgent +} + private func configureGetHomeDataRequest(with configuration: URLRequestConfiguration) throws { configuration.path = "/home" configuration.method = .get configuration.telemetryHeader = .userAgent } +private func configureGetServerResourcesRequest(with configuration: URLRequestConfiguration, request: Operations.GetServerResourcesRequest) throws { + configuration.path = "/resources" + configuration.method = .get + configuration.queryParameterSerializable = request + configuration.telemetryHeader = .userAgent +} + private func configureGetPinRequest(with configuration: URLRequestConfiguration, request: Operations.GetPinRequest) throws { configuration.path = "/pins" configuration.method = .post configuration.queryParameterSerializable = request - configuration.headerParameterSerializable = request configuration.telemetryHeader = .userAgent } -private func configureGetTokenRequest(with configuration: URLRequestConfiguration, request: Operations.GetTokenRequest) throws { +private func configureGetTokenByPinIdRequest(with configuration: URLRequestConfiguration, request: Operations.GetTokenByPinIdRequest) throws { configuration.path = "/pins/{pinID}" configuration.method = .get configuration.pathParameterSerializable = request - configuration.headerParameterSerializable = request + configuration.queryParameterSerializable = request configuration.telemetryHeader = .userAgent } // MARK: - Response Handlers +private func handleGetCompanionsDataResponse(response: Client.APIResponse) throws -> Operations.GetCompanionsDataResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .responseBodies(try JSONDecoder().decode([Operations.ResponseBody].self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetCompanionsDataBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetCompanionsDataUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handleGetUserFriendsResponse(response: Client.APIResponse) throws -> Operations.GetUserFriendsResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .friends(try JSONDecoder().decode([Operations.Friend].self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetUserFriendsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetUserFriendsUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handleGetGeoDataResponse(response: Client.APIResponse) throws -> Operations.GetGeoDataResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .geoData(try JSONDecoder().decode(Operations.GetGeoDataGeoData.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetGeoDataBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetGeoDataUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + private func handleGetHomeDataResponse(response: Client.APIResponse) throws -> Operations.GetHomeDataResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetHomeDataResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetHomeDataResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetHomeDataBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetHomeDataPlexResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetHomeDataUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handleGetServerResourcesResponse(response: Client.APIResponse) throws -> Operations.GetServerResourcesResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .plexDevices(try JSONDecoder().decode([Operations.PlexDevice].self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetServerResourcesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetServerResourcesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -96,10 +294,10 @@ private func handleGetHomeDataResponse(response: Client.APIResponse) throws -> O private func handleGetPinResponse(response: Client.APIResponse) throws -> Operations.GetPinResponse { let httpResponse = response.httpResponse - if httpResponse.statusCode == 201 { + if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetPinResponseBody.self, from: data)) + return .authPinContainer(try JSONDecoder().decode(Operations.GetPinAuthPinContainer.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -107,7 +305,7 @@ private func handleGetPinResponse(response: Client.APIResponse) throws -> Operat } else if httpResponse.statusCode == 400 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetPinPlexResponseBody.self, from: data)) + return .badRequest(try JSONDecoder().decode(Operations.GetPinBadRequest.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -117,13 +315,13 @@ private func handleGetPinResponse(response: Client.APIResponse) throws -> Operat return .empty } -private func handleGetTokenResponse(response: Client.APIResponse) throws -> Operations.GetTokenResponse { +private func handleGetTokenByPinIdResponse(response: Client.APIResponse) throws -> Operations.GetTokenByPinIdResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetTokenResponseBody.self, from: data)) + return .authPinContainer(try JSONDecoder().decode(Operations.GetTokenByPinIdAuthPinContainer.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -131,7 +329,15 @@ private func handleGetTokenResponse(response: Client.APIResponse) throws -> Oper } else if httpResponse.statusCode == 400 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetTokenPlexResponseBody.self, from: data)) + return .badRequest(try JSONDecoder().decode(Operations.GetTokenByPinIdBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 404 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .object(try JSONDecoder().decode(Operations.GetTokenByPinIdResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_SearchAPI.swift b/Sources/Plexswift/internal/api/_SearchAPI.swift index eae9e2b..bdb1902 100644 --- a/Sources/Plexswift/internal/api/_SearchAPI.swift +++ b/Sources/Plexswift/internal/api/_SearchAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -67,12 +67,20 @@ private func configureGetSearchResultsRequest(with configuration: URLRequestConf private func handlePerformSearchResponse(response: Client.APIResponse) throws -> Operations.PerformSearchResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.PerformSearchBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.PerformSearchResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.PerformSearchUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -85,12 +93,20 @@ private func handlePerformSearchResponse(response: Client.APIResponse) throws -> private func handlePerformVoiceSearchResponse(response: Client.APIResponse) throws -> Operations.PerformVoiceSearchResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.PerformVoiceSearchBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.PerformVoiceSearchResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.PerformVoiceSearchUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -106,17 +122,23 @@ private func handleGetSearchResultsResponse(response: Client.APIResponse) throws if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetSearchResultsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetSearchResultsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetSearchResultsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetSearchResultsSearchResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetSearchResultsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_ServerAPI.swift b/Sources/Plexswift/internal/api/_ServerAPI.swift index d5d50ac..6640bf4 100644 --- a/Sources/Plexswift/internal/api/_ServerAPI.swift +++ b/Sources/Plexswift/internal/api/_ServerAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -73,6 +73,15 @@ class _ServerAPI: ServerAPI { ) } + public func getMediaProviders(request: Operations.GetMediaProvidersRequest) async throws -> Response { + return try await client.makeRequest( + configureRequest: { configuration in + try configureGetMediaProvidersRequest(with: configuration, request: request) + }, + handleResponse: handleGetMediaProvidersResponse + ) + } + public func getServerList() async throws -> Response { return try await client.makeRequest( configureRequest: { configuration in @@ -129,6 +138,13 @@ private func configureGetResizedPhotoRequest(with configuration: URLRequestConfi configuration.telemetryHeader = .userAgent } +private func configureGetMediaProvidersRequest(with configuration: URLRequestConfiguration, request: Operations.GetMediaProvidersRequest) throws { + configuration.path = "/media/providers" + configuration.method = .get + configuration.queryParameterSerializable = request + configuration.telemetryHeader = .userAgent +} + private func configureGetServerListRequest(with configuration: URLRequestConfiguration) throws { configuration.path = "/servers" configuration.method = .get @@ -143,17 +159,23 @@ private func handleGetServerCapabilitiesResponse(response: Client.APIResponse) t if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerCapabilitiesResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetServerCapabilitiesResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetServerCapabilitiesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerCapabilitiesServerResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetServerCapabilitiesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -169,17 +191,23 @@ private func handleGetServerPreferencesResponse(response: Client.APIResponse) th if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerPreferencesResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetServerPreferencesResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetServerPreferencesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerPreferencesServerResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetServerPreferencesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -195,17 +223,23 @@ private func handleGetAvailableClientsResponse(response: Client.APIResponse) thr if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetAvailableClientsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetAvailableClientsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetAvailableClientsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetAvailableClientsServerResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetAvailableClientsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -221,17 +255,23 @@ private func handleGetDevicesResponse(response: Client.APIResponse) throws -> Op if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetDevicesResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetDevicesResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetDevicesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetDevicesServerResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetDevicesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -247,17 +287,15 @@ private func handleGetServerIdentityResponse(response: Client.APIResponse) throw if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerIdentityResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetServerIdentityResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } - } else if httpResponse.statusCode == 400 { - return .empty - } else if httpResponse.statusCode == 401 { + } else if httpResponse.statusCode == 408 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerIdentityServerResponseBody.self, from: data)) + return .requestTimeout(try JSONDecoder().decode(Operations.GetServerIdentityRequestTimeout.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -273,17 +311,23 @@ private func handleGetMyPlexAccountResponse(response: Client.APIResponse) throws if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetMyPlexAccountResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetMyPlexAccountResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetMyPlexAccountBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetMyPlexAccountServerResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetMyPlexAccountUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -296,12 +340,52 @@ private func handleGetMyPlexAccountResponse(response: Client.APIResponse) throws private func handleGetResizedPhotoResponse(response: Client.APIResponse) throws -> Operations.GetResizedPhotoResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetResizedPhotoBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.GetResizedPhotoResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetResizedPhotoUnauthorized.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } + + return .empty +} + +private func handleGetMediaProvidersResponse(response: Client.APIResponse) throws -> Operations.GetMediaProvidersResponse { + let httpResponse = response.httpResponse + + if httpResponse.statusCode == 200 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .object(try JSONDecoder().decode(Operations.GetMediaProvidersResponseBody.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetMediaProvidersBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } + } else if httpResponse.statusCode == 401 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .unauthorized(try JSONDecoder().decode(Operations.GetMediaProvidersUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -317,17 +401,23 @@ private func handleGetServerListResponse(response: Client.APIResponse) throws -> if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerListResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetServerListResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetServerListBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetServerListServerResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetServerListUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_SessionsAPI.swift b/Sources/Plexswift/internal/api/_SessionsAPI.swift index 48c89d2..bddfb37 100644 --- a/Sources/Plexswift/internal/api/_SessionsAPI.swift +++ b/Sources/Plexswift/internal/api/_SessionsAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -84,17 +84,23 @@ private func handleGetSessionsResponse(response: Client.APIResponse) throws -> O if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetSessionsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetSessionsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetSessionsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetSessionsSessionsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetSessionsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -110,17 +116,23 @@ private func handleGetSessionHistoryResponse(response: Client.APIResponse) throw if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetSessionHistoryResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetSessionHistoryResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetSessionHistoryBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetSessionHistorySessionsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetSessionHistoryUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -136,17 +148,23 @@ private func handleGetTranscodeSessionsResponse(response: Client.APIResponse) th if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetTranscodeSessionsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetTranscodeSessionsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetTranscodeSessionsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetTranscodeSessionsSessionsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetTranscodeSessionsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -159,12 +177,20 @@ private func handleGetTranscodeSessionsResponse(response: Client.APIResponse) th private func handleStopTranscodeSessionResponse(response: Client.APIResponse) throws -> Operations.StopTranscodeSessionResponse { let httpResponse = response.httpResponse - if [204, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 204 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.StopTranscodeSessionBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.StopTranscodeSessionResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.StopTranscodeSessionUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_StatisticsAPI.swift b/Sources/Plexswift/internal/api/_StatisticsAPI.swift index b624c22..927b1db 100644 --- a/Sources/Plexswift/internal/api/_StatisticsAPI.swift +++ b/Sources/Plexswift/internal/api/_StatisticsAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -70,17 +70,23 @@ private func handleGetStatisticsResponse(response: Client.APIResponse) throws -> if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetStatisticsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetStatisticsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetStatisticsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetStatisticsStatisticsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetStatisticsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -96,17 +102,23 @@ private func handleGetResourcesStatisticsResponse(response: Client.APIResponse) if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetResourcesStatisticsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetResourcesStatisticsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetResourcesStatisticsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetResourcesStatisticsStatisticsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetResourcesStatisticsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -122,17 +134,23 @@ private func handleGetBandwidthStatisticsResponse(response: Client.APIResponse) if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetBandwidthStatisticsResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetBandwidthStatisticsResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetBandwidthStatisticsBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetBandwidthStatisticsStatisticsResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetBandwidthStatisticsUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_UpdaterAPI.swift b/Sources/Plexswift/internal/api/_UpdaterAPI.swift index e28bc06..ac99a00 100644 --- a/Sources/Plexswift/internal/api/_UpdaterAPI.swift +++ b/Sources/Plexswift/internal/api/_UpdaterAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -69,17 +69,23 @@ private func handleGetUpdateStatusResponse(response: Client.APIResponse) throws if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetUpdateStatusResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetUpdateStatusResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetUpdateStatusBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetUpdateStatusUpdaterResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetUpdateStatusUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -92,12 +98,20 @@ private func handleGetUpdateStatusResponse(response: Client.APIResponse) throws private func handleCheckForUpdatesResponse(response: Client.APIResponse) throws -> Operations.CheckForUpdatesResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.CheckForUpdatesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.CheckForUpdatesResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.CheckForUpdatesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -110,12 +124,20 @@ private func handleCheckForUpdatesResponse(response: Client.APIResponse) throws private func handleApplyUpdatesResponse(response: Client.APIResponse) throws -> Operations.ApplyUpdatesResponse { let httpResponse = response.httpResponse - if [200, 400, 500].contains(httpResponse.statusCode) { + if [200, 500].contains(httpResponse.statusCode) { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.ApplyUpdatesBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.ApplyUpdatesResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.ApplyUpdatesUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_VideoAPI.swift b/Sources/Plexswift/internal/api/_VideoAPI.swift index 3767b60..448b3c6 100644 --- a/Sources/Plexswift/internal/api/_VideoAPI.swift +++ b/Sources/Plexswift/internal/api/_VideoAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -51,12 +51,20 @@ private func configureStartUniversalTranscodeRequest(with configuration: URLRequ private func handleGetTimelineResponse(response: Client.APIResponse) throws -> Operations.GetTimelineResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetTimelineBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.GetTimelineResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetTimelineUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } @@ -69,12 +77,20 @@ private func handleGetTimelineResponse(response: Client.APIResponse) throws -> O private func handleStartUniversalTranscodeResponse(response: Client.APIResponse) throws -> Operations.StartUniversalTranscodeResponse { let httpResponse = response.httpResponse - if [200, 400].contains(httpResponse.statusCode) { + if httpResponse.statusCode == 200 { return .empty + } else if httpResponse.statusCode == 400 { + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.StartUniversalTranscodeBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .object(try JSONDecoder().decode(Operations.StartUniversalTranscodeResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.StartUniversalTranscodeUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/api/_WatchlistAPI.swift b/Sources/Plexswift/internal/api/_WatchlistAPI.swift index 99e96aa..8c469f0 100644 --- a/Sources/Plexswift/internal/api/_WatchlistAPI.swift +++ b/Sources/Plexswift/internal/api/_WatchlistAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -10,13 +10,13 @@ class _WatchlistAPI: WatchlistAPI { self.client = client } - public func getWatchlist(request: Operations.GetWatchlistRequest, server: WatchlistServers.GetWatchlist?) async throws -> Response { + public func getWatchList(request: Operations.GetWatchListRequest, server: WatchlistServers.GetWatchList?) async throws -> Response { return try await client.makeRequest( - with: try server?.server() ?? WatchlistServers.GetWatchlist.default(), + with: try server?.server() ?? WatchlistServers.GetWatchList.default(), configureRequest: { configuration in - try configureGetWatchlistRequest(with: configuration, request: request) + try configureGetWatchListRequest(with: configuration, request: request) }, - handleResponse: handleGetWatchlistResponse + handleResponse: handleGetWatchListResponse ) } @@ -24,7 +24,7 @@ class _WatchlistAPI: WatchlistAPI { // MARK: - Request Configuration -private func configureGetWatchlistRequest(with configuration: URLRequestConfiguration, request: Operations.GetWatchlistRequest) throws { +private func configureGetWatchListRequest(with configuration: URLRequestConfiguration, request: Operations.GetWatchListRequest) throws { configuration.path = "/library/sections/watchlist/{filter}" configuration.method = .get configuration.pathParameterSerializable = request @@ -34,23 +34,29 @@ private func configureGetWatchlistRequest(with configuration: URLRequestConfigur // MARK: - Response Handlers -private func handleGetWatchlistResponse(response: Client.APIResponse) throws -> Operations.GetWatchlistResponse { +private func handleGetWatchListResponse(response: Client.APIResponse) throws -> Operations.GetWatchListResponse { let httpResponse = response.httpResponse if httpResponse.statusCode == 200 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetWatchlistResponseBody.self, from: data)) + return .object(try JSONDecoder().decode(Operations.GetWatchListResponseBody.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } } } else if httpResponse.statusCode == 400 { - return .empty + if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { + do { + return .badRequest(try JSONDecoder().decode(Operations.GetWatchListBadRequest.self, from: data)) + } catch { + throw ResponseHandlerError.failedToDecodeJSON(error) + } + } } else if httpResponse.statusCode == 401 { if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data { do { - return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetWatchlistWatchlistResponseBody.self, from: data)) + return .unauthorized(try JSONDecoder().decode(Operations.GetWatchListUnauthorized.self, from: data)) } catch { throw ResponseHandlerError.failedToDecodeJSON(error) } diff --git a/Sources/Plexswift/internal/models/AddPlaylistContentsRequest+Serialization.swift b/Sources/Plexswift/internal/models/AddPlaylistContentsRequest+Serialization.swift index a688a4c..d00b5a5 100644 --- a/Sources/Plexswift/internal/models/AddPlaylistContentsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/AddPlaylistContentsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/ApplyUpdatesRequest+Serialization.swift b/Sources/Plexswift/internal/models/ApplyUpdatesRequest+Serialization.swift index 59f37ca..a9222e1 100644 --- a/Sources/Plexswift/internal/models/ApplyUpdatesRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/ApplyUpdatesRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/PathParamFilter+Serialization.swift b/Sources/Plexswift/internal/models/AutoSelectSubtitle+Serialization.swift similarity index 72% rename from Sources/Plexswift/internal/models/PathParamFilter+Serialization.swift rename to Sources/Plexswift/internal/models/AutoSelectSubtitle+Serialization.swift index 58699ae..02ba573 100644 --- a/Sources/Plexswift/internal/models/PathParamFilter+Serialization.swift +++ b/Sources/Plexswift/internal/models/AutoSelectSubtitle+Serialization.swift @@ -1,9 +1,9 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation -extension Operations.PathParamFilter: Serializable { +extension Operations.AutoSelectSubtitle: Serializable { func serialize(with format: SerializableFormat) throws -> String { return try rawValue.serialize(with: format) } diff --git a/Sources/Plexswift/internal/models/CancelServerActivitiesRequest+Serialization.swift b/Sources/Plexswift/internal/models/CancelServerActivitiesRequest+Serialization.swift index 80583e8..d144a8d 100644 --- a/Sources/Plexswift/internal/models/CancelServerActivitiesRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/CancelServerActivitiesRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/CheckForUpdatesRequest+Serialization.swift b/Sources/Plexswift/internal/models/CheckForUpdatesRequest+Serialization.swift index 98e2399..2c83553 100644 --- a/Sources/Plexswift/internal/models/CheckForUpdatesRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/CheckForUpdatesRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/ClearPlaylistContentsRequest+Serialization.swift b/Sources/Plexswift/internal/models/ClearPlaylistContentsRequest+Serialization.swift index b24200c..e714b71 100644 --- a/Sources/Plexswift/internal/models/ClearPlaylistContentsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/ClearPlaylistContentsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/CreatePlaylistQueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/CreatePlaylistQueryParamType+Serialization.swift new file mode 100644 index 0000000..06bd64f --- /dev/null +++ b/Sources/Plexswift/internal/models/CreatePlaylistQueryParamType+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.CreatePlaylistQueryParamType: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/CreatePlaylistRequest+Serialization.swift b/Sources/Plexswift/internal/models/CreatePlaylistRequest+Serialization.swift index 8998ec4..28a25a8 100644 --- a/Sources/Plexswift/internal/models/CreatePlaylistRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/CreatePlaylistRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/DefaultSubtitleAccessibility+Serialization.swift b/Sources/Plexswift/internal/models/DefaultSubtitleAccessibility+Serialization.swift new file mode 100644 index 0000000..92aa652 --- /dev/null +++ b/Sources/Plexswift/internal/models/DefaultSubtitleAccessibility+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.DefaultSubtitleAccessibility: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/DefaultSubtitleForced+Serialization.swift b/Sources/Plexswift/internal/models/DefaultSubtitleForced+Serialization.swift new file mode 100644 index 0000000..ab8b011 --- /dev/null +++ b/Sources/Plexswift/internal/models/DefaultSubtitleForced+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.DefaultSubtitleForced: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/DeleteLibraryRequest+Serialization.swift b/Sources/Plexswift/internal/models/DeleteLibraryRequest+Serialization.swift index 72e36cf..d856af8 100644 --- a/Sources/Plexswift/internal/models/DeleteLibraryRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/DeleteLibraryRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -17,7 +17,7 @@ extension Operations.DeleteLibraryRequest: Serializable { extension Operations.DeleteLibraryRequest: PathParameterSerializable { func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { return [ - "sectionId": try sectionIdWrapper.serialize(with: formatOverride ?? .path(explode: false)), + "sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)), ].compactMapValues { $0 } } } diff --git a/Sources/Plexswift/internal/models/DeletePlaylistRequest+Serialization.swift b/Sources/Plexswift/internal/models/DeletePlaylistRequest+Serialization.swift index f929fb4..5be4ed7 100644 --- a/Sources/Plexswift/internal/models/DeletePlaylistRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/DeletePlaylistRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Download+Serialization.swift b/Sources/Plexswift/internal/models/Download+Serialization.swift index 520fbe0..371f807 100644 --- a/Sources/Plexswift/internal/models/Download+Serialization.swift +++ b/Sources/Plexswift/internal/models/Download+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Features+Serialization.swift b/Sources/Plexswift/internal/models/Features+Serialization.swift new file mode 100644 index 0000000..3605af2 --- /dev/null +++ b/Sources/Plexswift/internal/models/Features+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.Features: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/Filter+Serialization.swift b/Sources/Plexswift/internal/models/Filter+Serialization.swift index 99ae6e8..5af6557 100644 --- a/Sources/Plexswift/internal/models/Filter+Serialization.swift +++ b/Sources/Plexswift/internal/models/Filter+Serialization.swift @@ -1,10 +1,14 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations.Filter: Serializable { func serialize(with format: SerializableFormat) throws -> String { - return "" + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] } } diff --git a/Sources/Plexswift/internal/models/Force+Serialization.swift b/Sources/Plexswift/internal/models/Force+Serialization.swift index de5913f..262c261 100644 --- a/Sources/Plexswift/internal/models/Force+Serialization.swift +++ b/Sources/Plexswift/internal/models/Force+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift index 7748c69..bc17d4b 100644 --- a/Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetBannerImageRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetBannerImageRequest+Serialization.swift new file mode 100644 index 0000000..b765a5f --- /dev/null +++ b/Sources/Plexswift/internal/models/GetBannerImageRequest+Serialization.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetBannerImageRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .path: + return try serializePathParameterSerializable(self, with: format) + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetBannerImageRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetBannerImageRequest: PathParameterSerializable { + func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { + return [ + "ratingKey": try ratingKey.serialize(with: formatOverride ?? .path(explode: false)), + ].compactMapValues { $0 } + } +} + +extension Operations.GetBannerImageRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: height, named: "height", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: minSize, named: "minSize", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: upscale, named: "upscale", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: width, named: "width", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetFileHashRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetFileHashRequest+Serialization.swift index 44b6905..4d2585b 100644 --- a/Sources/Plexswift/internal/models/GetFileHashRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetFileHashRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetGlobalHubsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetGlobalHubsRequest+Serialization.swift index d5184d0..8455dfd 100644 --- a/Sources/Plexswift/internal/models/GetGlobalHubsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetGlobalHubsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetLibraryRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetLibraryDetailsRequest+Serialization.swift similarity index 72% rename from Sources/Plexswift/internal/models/GetLibraryRequest+Serialization.swift rename to Sources/Plexswift/internal/models/GetLibraryDetailsRequest+Serialization.swift index 5c59ca0..47ea3df 100644 --- a/Sources/Plexswift/internal/models/GetLibraryRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetLibraryDetailsRequest+Serialization.swift @@ -1,9 +1,9 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation -extension Operations.GetLibraryRequest: Serializable { +extension Operations.GetLibraryDetailsRequest: Serializable { func serialize(with format: SerializableFormat) throws -> String { switch format { case .path: @@ -11,7 +11,7 @@ extension Operations.GetLibraryRequest: Serializable { case .query: return try serializeQueryParameterSerializable(self, with: format) case .header, .multipart, .form: - throw SerializationError.invalidSerializationParameter(type: "Operations.GetLibraryRequest", format: format.formatDescription) + throw SerializationError.invalidSerializationParameter(type: "Operations.GetLibraryDetailsRequest", format: format.formatDescription) } } @@ -20,15 +20,15 @@ extension Operations.GetLibraryRequest: Serializable { } } -extension Operations.GetLibraryRequest: PathParameterSerializable { +extension Operations.GetLibraryDetailsRequest: PathParameterSerializable { func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { return [ - "sectionId": try sectionIdWrapper.serialize(with: formatOverride ?? .path(explode: false)), + "sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)), ].compactMapValues { $0 } } } -extension Operations.GetLibraryRequest: QueryParameterSerializable { +extension Operations.GetLibraryDetailsRequest: QueryParameterSerializable { func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { let builder = QueryParameterBuilder() try builder.addQueryParameters(from: includeDetails, named: "includeDetails", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) diff --git a/Sources/Plexswift/internal/models/GetLibraryHubsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetLibraryHubsRequest+Serialization.swift index 03a1427..5dad519 100644 --- a/Sources/Plexswift/internal/models/GetLibraryHubsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetLibraryHubsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift index b64e50c..8150712 100644 --- a/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetLibraryItemsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,7 +23,7 @@ extension Operations.GetLibraryItemsRequest: Serializable { extension Operations.GetLibraryItemsRequest: PathParameterSerializable { func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { return [ - "sectionId": try sectionId.serialize(with: formatOverride ?? .path(explode: false)), + "sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)), "tag": try tag.serialize(with: formatOverride ?? .path(explode: false)), ].compactMapValues { $0 } } @@ -32,7 +32,11 @@ extension Operations.GetLibraryItemsRequest: PathParameterSerializable { extension Operations.GetLibraryItemsRequest: QueryParameterSerializable { func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) try builder.addQueryParameters(from: includeGuids, named: "includeGuids", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeMeta, named: "includeMeta", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexContainerSize, named: "X-Plex-Container-Size", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexContainerStart, named: "X-Plex-Container-Start", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) return builder.build() } } diff --git a/Sources/Plexswift/internal/models/GetMediaProvidersRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetMediaProvidersRequest+Serialization.swift new file mode 100644 index 0000000..47db293 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetMediaProvidersRequest+Serialization.swift @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetMediaProvidersRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .path, .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetMediaProvidersRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetMediaProvidersRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetMetadataRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift similarity index 55% rename from Sources/Plexswift/internal/models/GetMetadataRequest+Serialization.swift rename to Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift index 7bd9b36..21c154b 100644 --- a/Sources/Plexswift/internal/models/GetMetadataRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetMetaDataByRatingKeyRequest+Serialization.swift @@ -1,23 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation -extension Operations.GetMetadataRequest: Serializable { +extension Operations.GetMetaDataByRatingKeyRequest: Serializable { func serialize(with format: SerializableFormat) throws -> String { switch format { case .path: return try serializePathParameterSerializable(self, with: format) case .query, .header, .multipart, .form: - throw SerializationError.invalidSerializationParameter(type: "Operations.GetMetadataRequest", format: format.formatDescription) + throw SerializationError.invalidSerializationParameter(type: "Operations.GetMetaDataByRatingKeyRequest", format: format.formatDescription) } } } -extension Operations.GetMetadataRequest: PathParameterSerializable { +extension Operations.GetMetaDataByRatingKeyRequest: PathParameterSerializable { func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { return [ - "ratingKey": try ratingKeyWrapper.serialize(with: formatOverride ?? .path(explode: false)), + "ratingKey": try ratingKey.serialize(with: formatOverride ?? .path(explode: false)), ].compactMapValues { $0 } } } diff --git a/Sources/Plexswift/internal/models/GetMetadataChildrenRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetMetadataChildrenRequest+Serialization.swift index 3e4359f..28ded52 100644 --- a/Sources/Plexswift/internal/models/GetMetadataChildrenRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetMetadataChildrenRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetPinRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetPinRequest+Serialization.swift index 2b44dcc..c862bcb 100644 --- a/Sources/Plexswift/internal/models/GetPinRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetPinRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -8,9 +8,7 @@ extension Operations.GetPinRequest: Serializable { switch format { case .query: return try serializeQueryParameterSerializable(self, with: format) - case .header: - return serializeModel(with: try serializedHeaderParameters(), format: format) - case .path, .multipart, .form: + case .path, .header, .multipart, .form: throw SerializationError.invalidSerializationParameter(type: "Operations.GetPinRequest", format: format.formatDescription) } } @@ -24,15 +22,8 @@ extension Operations.GetPinRequest: QueryParameterSerializable { func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { let builder = QueryParameterBuilder() try builder.addQueryParameters(from: strong, named: "strong", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexClientIdentifier, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexProduct, named: "X-Plex-Product", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) return builder.build() } } - -extension Operations.GetPinRequest: HeaderParameterSerializable { - func serializedHeaderParameters() throws -> [SerializedParameter] { - return [ - SerializedParameter(name: "X-Plex-Product", serialized: try xPlexProduct.serialize(with: .header(explode: false))), - SerializedParameter(name: "X-Plex-Client-Identifier", serialized: try xPlexClientIdentifier?.serialize(with: .header(explode: false))) - ] - } -} diff --git a/Sources/Plexswift/internal/models/GetPlaylistContentsQueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/GetPlaylistContentsQueryParamType+Serialization.swift new file mode 100644 index 0000000..aafc72c --- /dev/null +++ b/Sources/Plexswift/internal/models/GetPlaylistContentsQueryParamType+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetPlaylistContentsQueryParamType: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/GetPlaylistContentsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetPlaylistContentsRequest+Serialization.swift index 9c7f2fa..1b90cc5 100644 --- a/Sources/Plexswift/internal/models/GetPlaylistContentsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetPlaylistContentsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -31,7 +31,7 @@ extension Operations.GetPlaylistContentsRequest: PathParameterSerializable { extension Operations.GetPlaylistContentsRequest: QueryParameterSerializable { func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { let builder = QueryParameterBuilder() - try builder.addQueryParameters(from: typeWrapper, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) return builder.build() } } diff --git a/Sources/Plexswift/internal/models/GetPlaylistRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetPlaylistRequest+Serialization.swift index 5d87638..0a1e72c 100644 --- a/Sources/Plexswift/internal/models/GetPlaylistRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetPlaylistRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetPlaylistsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetPlaylistsRequest+Serialization.swift index e3669a7..098f2aa 100644 --- a/Sources/Plexswift/internal/models/GetPlaylistsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetPlaylistsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetRecentlyAddedRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetRecentlyAddedRequest+Serialization.swift new file mode 100644 index 0000000..fc45915 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetRecentlyAddedRequest+Serialization.swift @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetRecentlyAddedRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .path, .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetRecentlyAddedRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetRecentlyAddedRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: xPlexContainerSize, named: "X-Plex-Container-Size", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexContainerStart, named: "X-Plex-Container-Start", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetRefreshLibraryMetadataRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetRefreshLibraryMetadataRequest+Serialization.swift new file mode 100644 index 0000000..24189d8 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetRefreshLibraryMetadataRequest+Serialization.swift @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetRefreshLibraryMetadataRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .path: + return try serializePathParameterSerializable(self, with: format) + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetRefreshLibraryMetadataRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetRefreshLibraryMetadataRequest: PathParameterSerializable { + func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { + return [ + "sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)), + ].compactMapValues { $0 } + } +} + +extension Operations.GetRefreshLibraryMetadataRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: force, named: "force", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift index a5c1f1f..c8afdde 100644 --- a/Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetResourcesStatisticsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetResourcesStatisticsRequest+Serialization.swift index fd5dee8..9923434 100644 --- a/Sources/Plexswift/internal/models/GetResourcesStatisticsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetResourcesStatisticsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/SearchLibraryRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetSearchLibraryRequest+Serialization.swift similarity index 71% rename from Sources/Plexswift/internal/models/SearchLibraryRequest+Serialization.swift rename to Sources/Plexswift/internal/models/GetSearchLibraryRequest+Serialization.swift index ce7e5b5..29e5997 100644 --- a/Sources/Plexswift/internal/models/SearchLibraryRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetSearchLibraryRequest+Serialization.swift @@ -1,9 +1,9 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation -extension Operations.SearchLibraryRequest: Serializable { +extension Operations.GetSearchLibraryRequest: Serializable { func serialize(with format: SerializableFormat) throws -> String { switch format { case .path: @@ -11,7 +11,7 @@ extension Operations.SearchLibraryRequest: Serializable { case .query: return try serializeQueryParameterSerializable(self, with: format) case .header, .multipart, .form: - throw SerializationError.invalidSerializationParameter(type: "Operations.SearchLibraryRequest", format: format.formatDescription) + throw SerializationError.invalidSerializationParameter(type: "Operations.GetSearchLibraryRequest", format: format.formatDescription) } } @@ -20,15 +20,15 @@ extension Operations.SearchLibraryRequest: Serializable { } } -extension Operations.SearchLibraryRequest: PathParameterSerializable { +extension Operations.GetSearchLibraryRequest: PathParameterSerializable { func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { return [ - "sectionId": try sectionId.serialize(with: formatOverride ?? .path(explode: false)), + "sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)), ].compactMapValues { $0 } } } -extension Operations.SearchLibraryRequest: QueryParameterSerializable { +extension Operations.GetSearchLibraryRequest: QueryParameterSerializable { func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { let builder = QueryParameterBuilder() try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) diff --git a/Sources/Plexswift/internal/models/GetSearchResultsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetSearchResultsRequest+Serialization.swift index 36926c9..a255d2b 100644 --- a/Sources/Plexswift/internal/models/GetSearchResultsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetSearchResultsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetServerResourcesRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetServerResourcesRequest+Serialization.swift new file mode 100644 index 0000000..0c0c9bb --- /dev/null +++ b/Sources/Plexswift/internal/models/GetServerResourcesRequest+Serialization.swift @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetServerResourcesRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .path, .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetServerResourcesRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetServerResourcesRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: includeHttps, named: "includeHttps", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeIPv6, named: "includeIPv6", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: includeRelay, named: "includeRelay", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexClientIdentifier, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetSessionHistoryRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetSessionHistoryRequest+Serialization.swift index 61a3688..169a043 100644 --- a/Sources/Plexswift/internal/models/GetSessionHistoryRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetSessionHistoryRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift index 2e58a04..69ff7bb 100644 --- a/Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetStatisticsRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetStatisticsRequest+Serialization.swift index 13cfc64..003b06c 100644 --- a/Sources/Plexswift/internal/models/GetStatisticsRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetStatisticsRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetThumbImageRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetThumbImageRequest+Serialization.swift new file mode 100644 index 0000000..e481f78 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetThumbImageRequest+Serialization.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetThumbImageRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .path: + return try serializePathParameterSerializable(self, with: format) + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetThumbImageRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetThumbImageRequest: PathParameterSerializable { + func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { + return [ + "ratingKey": try ratingKey.serialize(with: formatOverride ?? .path(explode: false)), + ].compactMapValues { $0 } + } +} + +extension Operations.GetThumbImageRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: height, named: "height", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: minSize, named: "minSize", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: upscale, named: "upscale", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: width, named: "width", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetTimelineRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetTimelineRequest+Serialization.swift index 3558d05..411d38e 100644 --- a/Sources/Plexswift/internal/models/GetTimelineRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetTimelineRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetTokenByPinIdRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetTokenByPinIdRequest+Serialization.swift new file mode 100644 index 0000000..220b8ac --- /dev/null +++ b/Sources/Plexswift/internal/models/GetTokenByPinIdRequest+Serialization.swift @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetTokenByPinIdRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .path: + return try serializePathParameterSerializable(self, with: format) + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.GetTokenByPinIdRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.GetTokenByPinIdRequest: PathParameterSerializable { + func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { + return [ + "pinID": try pinID.serialize(with: formatOverride ?? .path(explode: false)), + ].compactMapValues { $0 } + } +} + +extension Operations.GetTokenByPinIdRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: xPlexClientIdentifier, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationResponseStatus+Serialization.swift b/Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationResponseStatus+Serialization.swift new file mode 100644 index 0000000..4a48aa8 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationResponseStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetTokenDetailsAuthenticationResponseStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationStatus+Serialization.swift b/Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationStatus+Serialization.swift new file mode 100644 index 0000000..f145eb7 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetTokenDetailsAuthenticationStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetTokenDetailsAuthenticationStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/GetTokenDetailsFeatures+Serialization.swift b/Sources/Plexswift/internal/models/GetTokenDetailsFeatures+Serialization.swift new file mode 100644 index 0000000..056db80 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetTokenDetailsFeatures+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetTokenDetailsFeatures: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/GetTokenDetailsStatus+Serialization.swift b/Sources/Plexswift/internal/models/GetTokenDetailsStatus+Serialization.swift new file mode 100644 index 0000000..f2f2bc1 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetTokenDetailsStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetTokenDetailsStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/GetTokenRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetTokenRequest+Serialization.swift deleted file mode 100644 index 943d5c9..0000000 --- a/Sources/Plexswift/internal/models/GetTokenRequest+Serialization.swift +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - - -import Foundation - -extension Operations.GetTokenRequest: Serializable { - func serialize(with format: SerializableFormat) throws -> String { - switch format { - case .path: - return try serializePathParameterSerializable(self, with: format) - case .header: - return serializeModel(with: try serializedHeaderParameters(), format: format) - case .query, .multipart, .form: - throw SerializationError.invalidSerializationParameter(type: "Operations.GetTokenRequest", format: format.formatDescription) - } - } -} - -extension Operations.GetTokenRequest: PathParameterSerializable { - func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { - return [ - "pinID": try pinID.serialize(with: formatOverride ?? .path(explode: false)), - ].compactMapValues { $0 } - } -} - -extension Operations.GetTokenRequest: HeaderParameterSerializable { - func serializedHeaderParameters() throws -> [SerializedParameter] { - return [ - SerializedParameter(name: "X-Plex-Client-Identifier", serialized: try xPlexClientIdentifier?.serialize(with: .header(explode: false))) - ] - } -} diff --git a/Sources/Plexswift/internal/models/GetTopWatchedContentQueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/GetTopWatchedContentQueryParamType+Serialization.swift new file mode 100644 index 0000000..e8e1f03 --- /dev/null +++ b/Sources/Plexswift/internal/models/GetTopWatchedContentQueryParamType+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.GetTopWatchedContentQueryParamType: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/GetTopWatchedContentRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetTopWatchedContentRequest+Serialization.swift index 69d27cc..5853073 100644 --- a/Sources/Plexswift/internal/models/GetTopWatchedContentRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetTopWatchedContentRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetTransientTokenQueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/GetTransientTokenQueryParamType+Serialization.swift index 83fae08..38406f2 100644 --- a/Sources/Plexswift/internal/models/GetTransientTokenQueryParamType+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetTransientTokenQueryParamType+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetTransientTokenRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetTransientTokenRequest+Serialization.swift index 29ca8cd..c83a09f 100644 --- a/Sources/Plexswift/internal/models/GetTransientTokenRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetTransientTokenRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/GetWatchlistRequest+Serialization.swift b/Sources/Plexswift/internal/models/GetWatchListRequest+Serialization.swift similarity index 89% rename from Sources/Plexswift/internal/models/GetWatchlistRequest+Serialization.swift rename to Sources/Plexswift/internal/models/GetWatchListRequest+Serialization.swift index 56591b0..6abf1d9 100644 --- a/Sources/Plexswift/internal/models/GetWatchlistRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/GetWatchListRequest+Serialization.swift @@ -1,9 +1,9 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation -extension Operations.GetWatchlistRequest: Serializable { +extension Operations.GetWatchListRequest: Serializable { func serialize(with format: SerializableFormat) throws -> String { switch format { case .path: @@ -11,7 +11,7 @@ extension Operations.GetWatchlistRequest: Serializable { case .query: return try serializeQueryParameterSerializable(self, with: format) case .header, .multipart, .form: - throw SerializationError.invalidSerializationParameter(type: "Operations.GetWatchlistRequest", format: format.formatDescription) + throw SerializationError.invalidSerializationParameter(type: "Operations.GetWatchListRequest", format: format.formatDescription) } } @@ -20,7 +20,7 @@ extension Operations.GetWatchlistRequest: Serializable { } } -extension Operations.GetWatchlistRequest: PathParameterSerializable { +extension Operations.GetWatchListRequest: PathParameterSerializable { func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { return [ "filter": try filter.serialize(with: formatOverride ?? .path(explode: false)), @@ -28,7 +28,7 @@ extension Operations.GetWatchlistRequest: PathParameterSerializable { } } -extension Operations.GetWatchlistRequest: QueryParameterSerializable { +extension Operations.GetWatchListRequest: QueryParameterSerializable { func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { let builder = QueryParameterBuilder() try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) diff --git a/Sources/Plexswift/internal/models/IncludeCollections+Serialization.swift b/Sources/Plexswift/internal/models/IncludeCollections+Serialization.swift index eb56046..04d0b41 100644 --- a/Sources/Plexswift/internal/models/IncludeCollections+Serialization.swift +++ b/Sources/Plexswift/internal/models/IncludeCollections+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/IncludeDetails+Serialization.swift b/Sources/Plexswift/internal/models/IncludeDetails+Serialization.swift index 47565cb..a9dc0d3 100644 --- a/Sources/Plexswift/internal/models/IncludeDetails+Serialization.swift +++ b/Sources/Plexswift/internal/models/IncludeDetails+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift b/Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift index 0787f07..1f16511 100644 --- a/Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift +++ b/Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/IncludeGuids+Serialization.swift b/Sources/Plexswift/internal/models/IncludeGuids+Serialization.swift new file mode 100644 index 0000000..853b922 --- /dev/null +++ b/Sources/Plexswift/internal/models/IncludeGuids+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.IncludeGuids: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/IncludeHttps+Serialization.swift b/Sources/Plexswift/internal/models/IncludeHttps+Serialization.swift new file mode 100644 index 0000000..7ac6785 --- /dev/null +++ b/Sources/Plexswift/internal/models/IncludeHttps+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.IncludeHttps: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/IncludeIPv6+Serialization.swift b/Sources/Plexswift/internal/models/IncludeIPv6+Serialization.swift new file mode 100644 index 0000000..d3b67e4 --- /dev/null +++ b/Sources/Plexswift/internal/models/IncludeIPv6+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.IncludeIPv6: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/IncludeMeta+Serialization.swift b/Sources/Plexswift/internal/models/IncludeMeta+Serialization.swift new file mode 100644 index 0000000..99294fb --- /dev/null +++ b/Sources/Plexswift/internal/models/IncludeMeta+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.IncludeMeta: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/IncludeRelay+Serialization.swift b/Sources/Plexswift/internal/models/IncludeRelay+Serialization.swift new file mode 100644 index 0000000..8268275 --- /dev/null +++ b/Sources/Plexswift/internal/models/IncludeRelay+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.IncludeRelay: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/InternalPaymentMethod+Serialization.swift b/Sources/Plexswift/internal/models/InternalPaymentMethod+Serialization.swift new file mode 100644 index 0000000..2aada05 --- /dev/null +++ b/Sources/Plexswift/internal/models/InternalPaymentMethod+Serialization.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.InternalPaymentMethod: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return "" + } +} diff --git a/Sources/Plexswift/internal/models/Level+Serialization.swift b/Sources/Plexswift/internal/models/Level+Serialization.swift index 3d8ca8c..21c8168 100644 --- a/Sources/Plexswift/internal/models/Level+Serialization.swift +++ b/Sources/Plexswift/internal/models/Level+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/LibrarySectionID+Serialization.swift b/Sources/Plexswift/internal/models/LibrarySectionID+Serialization.swift index 4b6ba60..2e338f0 100644 --- a/Sources/Plexswift/internal/models/LibrarySectionID+Serialization.swift +++ b/Sources/Plexswift/internal/models/LibrarySectionID+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Libtype+Serialization.swift b/Sources/Plexswift/internal/models/Libtype+Serialization.swift index c091faf..7f80d0a 100644 --- a/Sources/Plexswift/internal/models/Libtype+Serialization.swift +++ b/Sources/Plexswift/internal/models/Libtype+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/LogLineRequest+Serialization.swift b/Sources/Plexswift/internal/models/LogLineRequest+Serialization.swift index ad1ee47..46aafd6 100644 --- a/Sources/Plexswift/internal/models/LogLineRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/LogLineRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/MailingListStatus+Serialization.swift b/Sources/Plexswift/internal/models/MailingListStatus+Serialization.swift new file mode 100644 index 0000000..4f40cb4 --- /dev/null +++ b/Sources/Plexswift/internal/models/MailingListStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.MailingListStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/MarkPlayedRequest+Serialization.swift b/Sources/Plexswift/internal/models/MarkPlayedRequest+Serialization.swift index d62a7d2..4375091 100644 --- a/Sources/Plexswift/internal/models/MarkPlayedRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/MarkPlayedRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/MarkUnplayedRequest+Serialization.swift b/Sources/Plexswift/internal/models/MarkUnplayedRequest+Serialization.swift index 058d0ab..3aa01a6 100644 --- a/Sources/Plexswift/internal/models/MarkUnplayedRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/MarkUnplayedRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/MediaReviewsVisibility+Serialization.swift b/Sources/Plexswift/internal/models/MediaReviewsVisibility+Serialization.swift new file mode 100644 index 0000000..15fde3d --- /dev/null +++ b/Sources/Plexswift/internal/models/MediaReviewsVisibility+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.MediaReviewsVisibility: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/MinSize+Serialization.swift b/Sources/Plexswift/internal/models/MinSize+Serialization.swift index 5fbfa07..50fdfb5 100644 --- a/Sources/Plexswift/internal/models/MinSize+Serialization.swift +++ b/Sources/Plexswift/internal/models/MinSize+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift b/Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift index b2e3a6d..9712b7a 100644 --- a/Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift +++ b/Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift b/Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift index 58a0fe4..259b6b0 100644 --- a/Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift +++ b/Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/PerformSearchRequest+Serialization.swift b/Sources/Plexswift/internal/models/PerformSearchRequest+Serialization.swift index 776412e..b8a7c13 100644 --- a/Sources/Plexswift/internal/models/PerformSearchRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/PerformSearchRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/PerformVoiceSearchRequest+Serialization.swift b/Sources/Plexswift/internal/models/PerformVoiceSearchRequest+Serialization.swift index 3572928..e7b51dc 100644 --- a/Sources/Plexswift/internal/models/PerformVoiceSearchRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/PerformVoiceSearchRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/PlaylistType+Serialization.swift b/Sources/Plexswift/internal/models/PlaylistType+Serialization.swift index 73ba482..91d014c 100644 --- a/Sources/Plexswift/internal/models/PlaylistType+Serialization.swift +++ b/Sources/Plexswift/internal/models/PlaylistType+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationFeatures+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationFeatures+Serialization.swift new file mode 100644 index 0000000..c1bd3c9 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationFeatures+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataAuthenticationFeatures: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationResponseStatus+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationResponseStatus+Serialization.swift new file mode 100644 index 0000000..6bc2779 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationResponseStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataAuthenticationResponseStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationStatus+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationStatus+Serialization.swift new file mode 100644 index 0000000..d2df02e --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataAuthenticationStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataAuthenticationStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataAutoSelectSubtitle+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataAutoSelectSubtitle+Serialization.swift new file mode 100644 index 0000000..5e3ad6a --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataAutoSelectSubtitle+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataAutoSelectSubtitle: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleAccessibility+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleAccessibility+Serialization.swift new file mode 100644 index 0000000..a948b63 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleAccessibility+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataDefaultSubtitleAccessibility: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleForced+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleForced+Serialization.swift new file mode 100644 index 0000000..73f5b71 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataDefaultSubtitleForced+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataDefaultSubtitleForced: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataFeatures+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataFeatures+Serialization.swift new file mode 100644 index 0000000..27cd7e8 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataFeatures+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataFeatures: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataMailingListStatus+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataMailingListStatus+Serialization.swift new file mode 100644 index 0000000..48b9001 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataMailingListStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataMailingListStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataMediaReviewsVisibility+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataMediaReviewsVisibility+Serialization.swift new file mode 100644 index 0000000..8c3f7e1 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataMediaReviewsVisibility+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataMediaReviewsVisibility: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataRequest+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataRequest+Serialization.swift new file mode 100644 index 0000000..99001ed --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataRequest+Serialization.swift @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataRequest: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .query: + return try serializeQueryParameterSerializable(self, with: format) + case .path, .header, .multipart, .form: + throw SerializationError.invalidSerializationParameter(type: "Operations.PostUsersSignInDataRequest", format: format.formatDescription) + } + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return try serializedQueryParameters(with: nil, formatOverride: format) + } +} + +extension Operations.PostUsersSignInDataRequest: QueryParameterSerializable { + func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] { + let builder = QueryParameterBuilder() + try builder.addQueryParameters(from: xPlexClientIdentifier, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults) + return builder.build() + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataRequestBody+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataRequestBody+Serialization.swift new file mode 100644 index 0000000..2d510cb --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataRequestBody+Serialization.swift @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataRequestBody: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + switch format { + case .form: + return serializeModel(with: try serializedFormParameters(formatOverride: format), format: format) + case .path, .query, .header, .multipart: + throw SerializationError.invalidSerializationParameter(type: "Operations.PostUsersSignInDataRequestBody", format: format.formatDescription) + } + } +} + +extension Operations.PostUsersSignInDataRequestBody: FormBodySerializable { + func serializedFormParameters(formatOverride: SerializableFormat?) throws -> [SerializedParameter] { + return [ + SerializedParameter(name: "login", serialized: try login.serialize(with: .form(explode: true))), + SerializedParameter(name: "password", serialized: try password.serialize(with: .form(explode: true))), + SerializedParameter(name: "rememberMe", serialized: try rememberMe?.serialize(with: .form(explode: true))), + SerializedParameter(name: "verificationCode", serialized: try verificationCode?.serialize(with: .form(explode: true))) + ] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataState+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataState+Serialization.swift new file mode 100644 index 0000000..6140f14 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataState+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataState: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataStatus+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataStatus+Serialization.swift new file mode 100644 index 0000000..c189d32 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataStatus+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataStatus: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/PostUsersSignInDataWatchedIndicator+Serialization.swift b/Sources/Plexswift/internal/models/PostUsersSignInDataWatchedIndicator+Serialization.swift new file mode 100644 index 0000000..7889028 --- /dev/null +++ b/Sources/Plexswift/internal/models/PostUsersSignInDataWatchedIndicator+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.PostUsersSignInDataWatchedIndicator: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/QueryParamFilter+Serialization.swift b/Sources/Plexswift/internal/models/QueryParamFilter+Serialization.swift new file mode 100644 index 0000000..87ec1d7 --- /dev/null +++ b/Sources/Plexswift/internal/models/QueryParamFilter+Serialization.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.QueryParamFilter: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return "" + } +} diff --git a/Sources/Plexswift/internal/models/QueryParamForce+Serialization.swift b/Sources/Plexswift/internal/models/QueryParamForce+Serialization.swift new file mode 100644 index 0000000..7f49089 --- /dev/null +++ b/Sources/Plexswift/internal/models/QueryParamForce+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.QueryParamForce: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/QueryParamOnlyTransient+Serialization.swift b/Sources/Plexswift/internal/models/QueryParamOnlyTransient+Serialization.swift index 19d0840..7a07e07 100644 --- a/Sources/Plexswift/internal/models/QueryParamOnlyTransient+Serialization.swift +++ b/Sources/Plexswift/internal/models/QueryParamOnlyTransient+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/QueryParamSmart+Serialization.swift b/Sources/Plexswift/internal/models/QueryParamSmart+Serialization.swift index fd65c5c..cc13b40 100644 --- a/Sources/Plexswift/internal/models/QueryParamSmart+Serialization.swift +++ b/Sources/Plexswift/internal/models/QueryParamSmart+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/QueryParamType+Serialization.swift b/Sources/Plexswift/internal/models/QueryParamType+Serialization.swift index b5fbf4c..0b3beab 100644 --- a/Sources/Plexswift/internal/models/QueryParamType+Serialization.swift +++ b/Sources/Plexswift/internal/models/QueryParamType+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/RefreshLibraryRequest+Serialization.swift b/Sources/Plexswift/internal/models/RefreshLibraryRequest+Serialization.swift deleted file mode 100644 index 9d1a0de..0000000 --- a/Sources/Plexswift/internal/models/RefreshLibraryRequest+Serialization.swift +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - - -import Foundation - -extension Operations.RefreshLibraryRequest: Serializable { - func serialize(with format: SerializableFormat) throws -> String { - switch format { - case .path: - return try serializePathParameterSerializable(self, with: format) - case .query, .header, .multipart, .form: - throw SerializationError.invalidSerializationParameter(type: "Operations.RefreshLibraryRequest", format: format.formatDescription) - } - } -} - -extension Operations.RefreshLibraryRequest: PathParameterSerializable { - func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] { - return [ - "sectionId": try sectionIdWrapper.serialize(with: formatOverride ?? .path(explode: false)), - ].compactMapValues { $0 } - } -} diff --git a/Sources/Plexswift/internal/models/Scope+Serialization.swift b/Sources/Plexswift/internal/models/Scope+Serialization.swift index 97d3d18..669e367 100644 --- a/Sources/Plexswift/internal/models/Scope+Serialization.swift +++ b/Sources/Plexswift/internal/models/Scope+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Security+Serialization.swift b/Sources/Plexswift/internal/models/Security+Serialization.swift index 432a3e3..c8a4c36 100644 --- a/Sources/Plexswift/internal/models/Security+Serialization.swift +++ b/Sources/Plexswift/internal/models/Security+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/SharedServers+Serialization.swift b/Sources/Plexswift/internal/models/SharedServers+Serialization.swift new file mode 100644 index 0000000..a0fcaa3 --- /dev/null +++ b/Sources/Plexswift/internal/models/SharedServers+Serialization.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.SharedServers: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return "" + } +} diff --git a/Sources/Plexswift/internal/models/SharedSources+Serialization.swift b/Sources/Plexswift/internal/models/SharedSources+Serialization.swift new file mode 100644 index 0000000..79990f1 --- /dev/null +++ b/Sources/Plexswift/internal/models/SharedSources+Serialization.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.SharedSources: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return "" + } +} diff --git a/Sources/Plexswift/internal/models/Skip+Serialization.swift b/Sources/Plexswift/internal/models/Skip+Serialization.swift index 908f34b..e868688 100644 --- a/Sources/Plexswift/internal/models/Skip+Serialization.swift +++ b/Sources/Plexswift/internal/models/Skip+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Smart+Serialization.swift b/Sources/Plexswift/internal/models/Smart+Serialization.swift index fc08986..bf872ee 100644 --- a/Sources/Plexswift/internal/models/Smart+Serialization.swift +++ b/Sources/Plexswift/internal/models/Smart+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/StartTaskRequest+Serialization.swift b/Sources/Plexswift/internal/models/StartTaskRequest+Serialization.swift index 6d73658..f8c7eab 100644 --- a/Sources/Plexswift/internal/models/StartTaskRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/StartTaskRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/StartUniversalTranscodeRequest+Serialization.swift b/Sources/Plexswift/internal/models/StartUniversalTranscodeRequest+Serialization.swift index 4e05cf8..a39eaa3 100644 --- a/Sources/Plexswift/internal/models/StartUniversalTranscodeRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/StartUniversalTranscodeRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/State+Serialization.swift b/Sources/Plexswift/internal/models/State+Serialization.swift index 193eab7..e3daf4d 100644 --- a/Sources/Plexswift/internal/models/State+Serialization.swift +++ b/Sources/Plexswift/internal/models/State+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Status+Serialization.swift b/Sources/Plexswift/internal/models/Status+Serialization.swift new file mode 100644 index 0000000..b4c8e54 --- /dev/null +++ b/Sources/Plexswift/internal/models/Status+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.Status: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/internal/models/StopTaskRequest+Serialization.swift b/Sources/Plexswift/internal/models/StopTaskRequest+Serialization.swift index 22d098e..8217a66 100644 --- a/Sources/Plexswift/internal/models/StopTaskRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/StopTaskRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/StopTranscodeSessionRequest+Serialization.swift b/Sources/Plexswift/internal/models/StopTranscodeSessionRequest+Serialization.swift index 14d3e65..7fc11bd 100644 --- a/Sources/Plexswift/internal/models/StopTranscodeSessionRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/StopTranscodeSessionRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Tag+Serialization.swift b/Sources/Plexswift/internal/models/Tag+Serialization.swift index eb04237..628c62f 100644 --- a/Sources/Plexswift/internal/models/Tag+Serialization.swift +++ b/Sources/Plexswift/internal/models/Tag+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/TaskName+Serialization.swift b/Sources/Plexswift/internal/models/TaskName+Serialization.swift index e191cdc..4ea7f7f 100644 --- a/Sources/Plexswift/internal/models/TaskName+Serialization.swift +++ b/Sources/Plexswift/internal/models/TaskName+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Tonight+Serialization.swift b/Sources/Plexswift/internal/models/Tonight+Serialization.swift index 446dbd6..6d20c5b 100644 --- a/Sources/Plexswift/internal/models/Tonight+Serialization.swift +++ b/Sources/Plexswift/internal/models/Tonight+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Trials+Serialization.swift b/Sources/Plexswift/internal/models/Trials+Serialization.swift new file mode 100644 index 0000000..54aa17c --- /dev/null +++ b/Sources/Plexswift/internal/models/Trials+Serialization.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.Trials: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return "" + } +} diff --git a/Sources/Plexswift/internal/models/TypeModel+Serialization.swift b/Sources/Plexswift/internal/models/TypeModel+Serialization.swift index ee1f54d..645645e 100644 --- a/Sources/Plexswift/internal/models/TypeModel+Serialization.swift +++ b/Sources/Plexswift/internal/models/TypeModel+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/UpdatePlayProgressRequest+Serialization.swift b/Sources/Plexswift/internal/models/UpdatePlayProgressRequest+Serialization.swift index 2c0eff0..c4628c2 100644 --- a/Sources/Plexswift/internal/models/UpdatePlayProgressRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/UpdatePlayProgressRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/UpdatePlaylistRequest+Serialization.swift b/Sources/Plexswift/internal/models/UpdatePlaylistRequest+Serialization.swift index cd1c7ff..13206b3 100644 --- a/Sources/Plexswift/internal/models/UpdatePlaylistRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/UpdatePlaylistRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/UploadPlaylistRequest+Serialization.swift b/Sources/Plexswift/internal/models/UploadPlaylistRequest+Serialization.swift index 143439a..1e337d0 100644 --- a/Sources/Plexswift/internal/models/UploadPlaylistRequest+Serialization.swift +++ b/Sources/Plexswift/internal/models/UploadPlaylistRequest+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/Upscale+Serialization.swift b/Sources/Plexswift/internal/models/Upscale+Serialization.swift index b3da9c1..039ce1a 100644 --- a/Sources/Plexswift/internal/models/Upscale+Serialization.swift +++ b/Sources/Plexswift/internal/models/Upscale+Serialization.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/internal/models/WatchedIndicator+Serialization.swift b/Sources/Plexswift/internal/models/WatchedIndicator+Serialization.swift new file mode 100644 index 0000000..e95504a --- /dev/null +++ b/Sources/Plexswift/internal/models/WatchedIndicator+Serialization.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + + +import Foundation + +extension Operations.WatchedIndicator: Serializable { + func serialize(with format: SerializableFormat) throws -> String { + return try rawValue.serialize(with: format) + } + + func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] { + return [QueryParameter(key: [], serialized: try serialize(with: format))] + } +} diff --git a/Sources/Plexswift/models/ModelScopes.swift b/Sources/Plexswift/models/ModelScopes.swift index 17a84a2..bfe7876 100644 --- a/Sources/Plexswift/models/ModelScopes.swift +++ b/Sources/Plexswift/models/ModelScopes.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/Plexswift/models/operations/Account.swift b/Sources/Plexswift/models/operations/Account.swift index 98cd01c..261becc 100644 --- a/Sources/Plexswift/models/operations/Account.swift +++ b/Sources/Plexswift/models/operations/Account.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -27,8 +27,7 @@ extension Operations { self.subtitleMode = subtitleMode self.thumb = thumb } - } -} + }} extension Operations.Account: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Activity.swift b/Sources/Plexswift/models/operations/Activity.swift index 32ef466..adbf91e 100644 --- a/Sources/Plexswift/models/operations/Activity.swift +++ b/Sources/Plexswift/models/operations/Activity.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -29,8 +29,7 @@ extension Operations { self._userID = DecimalSerialized(wrappedValue: userID) self.uuid = uuid } - } -} + }} extension Operations.Activity: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsBadRequest.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsBadRequest.swift new file mode 100644 index 0000000..3c333b7 --- /dev/null +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct AddPlaylistContentsBadRequest { + public let errors: [Operations.AddPlaylistContentsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.AddPlaylistContentsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.AddPlaylistContentsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsErrors.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsErrors.swift index 6193c4c..852b491 100644 --- a/Sources/Plexswift/models/operations/AddPlaylistContentsErrors.swift +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct AddPlaylistContentsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.AddPlaylistContentsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.AddPlaylistContentsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.AddPlaylistContentsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsMediaContainer.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsMediaContainer.swift index 36e0a74..4e029ed 100644 --- a/Sources/Plexswift/models/operations/AddPlaylistContentsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,8 +19,7 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} extension Operations.AddPlaylistContentsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsMetadata.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsMetadata.swift index 7c03003..e5059fb 100644 --- a/Sources/Plexswift/models/operations/AddPlaylistContentsMetadata.swift +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -37,8 +37,7 @@ extension Operations { self.type = type self.updatedAt = updatedAt } - } -} + }} extension Operations.AddPlaylistContentsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsErrors.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsErrors.swift new file mode 100644 index 0000000..0db64e9 --- /dev/null +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct AddPlaylistContentsPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.AddPlaylistContentsPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsResponseBody.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsResponseBody.swift deleted file mode 100644 index b37dacb..0000000 --- a/Sources/Plexswift/models/operations/AddPlaylistContentsPlaylistsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct AddPlaylistContentsPlaylistsResponseBody { - public let errors: [Operations.AddPlaylistContentsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.AddPlaylistContentsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.AddPlaylistContentsPlaylistsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsRequest.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsRequest.swift index 0c525fa..fa07d29 100644 --- a/Sources/Plexswift/models/operations/AddPlaylistContentsRequest.swift +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self.uri = uri self._playQueueID = DecimalSerialized(wrappedValue: playQueueID) } - } -} + }} extension Operations.AddPlaylistContentsRequest { var playlistIDWrapper: DecimalSerialized { return _playlistID diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsResponse.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsResponse.swift index fb08d76..b5db920 100644 --- a/Sources/Plexswift/models/operations/AddPlaylistContentsResponse.swift +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum AddPlaylistContentsResponse { case empty - case twoHundredApplicationJsonObject(Operations.AddPlaylistContentsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.AddPlaylistContentsPlaylistsResponseBody) + case badRequest(Operations.AddPlaylistContentsBadRequest) + case object(Operations.AddPlaylistContentsResponseBody) + case unauthorized(Operations.AddPlaylistContentsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.AddPlaylistContentsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.AddPlaylistContentsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.AddPlaylistContentsPlaylistsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.AddPlaylistContentsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.AddPlaylistContentsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsResponseBody.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsResponseBody.swift index 70f37a2..0807b37 100644 --- a/Sources/Plexswift/models/operations/AddPlaylistContentsResponseBody.swift +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.AddPlaylistContentsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.AddPlaylistContentsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/AddPlaylistContentsUnauthorized.swift b/Sources/Plexswift/models/operations/AddPlaylistContentsUnauthorized.swift new file mode 100644 index 0000000..ed90b3c --- /dev/null +++ b/Sources/Plexswift/models/operations/AddPlaylistContentsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct AddPlaylistContentsUnauthorized { + public let errors: [Operations.AddPlaylistContentsPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.AddPlaylistContentsPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.AddPlaylistContentsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/ApplyUpdatesBadRequest.swift b/Sources/Plexswift/models/operations/ApplyUpdatesBadRequest.swift new file mode 100644 index 0000000..74385aa --- /dev/null +++ b/Sources/Plexswift/models/operations/ApplyUpdatesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct ApplyUpdatesBadRequest { + public let errors: [Operations.ApplyUpdatesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.ApplyUpdatesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.ApplyUpdatesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift b/Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift index 0e19064..83ff3bf 100644 --- a/Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift +++ b/Sources/Plexswift/models/operations/ApplyUpdatesErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct ApplyUpdatesErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.ApplyUpdatesErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.ApplyUpdatesErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.ApplyUpdatesErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/ApplyUpdatesRequest.swift b/Sources/Plexswift/models/operations/ApplyUpdatesRequest.swift index 4fb8af9..8aba2bc 100644 --- a/Sources/Plexswift/models/operations/ApplyUpdatesRequest.swift +++ b/Sources/Plexswift/models/operations/ApplyUpdatesRequest.swift @@ -1,23 +1,22 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct ApplyUpdatesRequest: APIValue { - /// Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + /// Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. public let skip: Operations.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 let tonight: Operations.Tonight? /// Creates an object with the specified parameters /// - /// - Parameter skip: Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + /// - Parameter skip: Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. /// - Parameter 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 init(skip: Operations.Skip? = nil, tonight: Operations.Tonight? = nil) { self.skip = skip self.tonight = tonight } - } -} + }} diff --git a/Sources/Plexswift/models/operations/ApplyUpdatesResponse.swift b/Sources/Plexswift/models/operations/ApplyUpdatesResponse.swift index 1bde175..98f1768 100644 --- a/Sources/Plexswift/models/operations/ApplyUpdatesResponse.swift +++ b/Sources/Plexswift/models/operations/ApplyUpdatesResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum ApplyUpdatesResponse { case empty - case object(Operations.ApplyUpdatesResponseBody) + case badRequest(Operations.ApplyUpdatesBadRequest) + case unauthorized(Operations.ApplyUpdatesUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.ApplyUpdatesResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.ApplyUpdatesBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.ApplyUpdatesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsServerResponseBody.swift b/Sources/Plexswift/models/operations/ApplyUpdatesUnauthorized.swift similarity index 50% rename from Sources/Plexswift/models/operations/GetAvailableClientsServerResponseBody.swift rename to Sources/Plexswift/models/operations/ApplyUpdatesUnauthorized.swift index 1f4fdbc..142c191 100644 --- a/Sources/Plexswift/models/operations/GetAvailableClientsServerResponseBody.swift +++ b/Sources/Plexswift/models/operations/ApplyUpdatesUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetAvailableClientsServerResponseBody { - public let errors: [Operations.GetAvailableClientsErrors]? + public struct ApplyUpdatesUnauthorized { + public let errors: [Operations.ApplyUpdatesUpdaterErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetAvailableClientsErrors]? = nil) { + public init(errors: [Operations.ApplyUpdatesUpdaterErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetAvailableClientsServerResponseBody: Codable { +extension Operations.ApplyUpdatesUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/ApplyUpdatesUpdaterErrors.swift b/Sources/Plexswift/models/operations/ApplyUpdatesUpdaterErrors.swift new file mode 100644 index 0000000..bdd7aea --- /dev/null +++ b/Sources/Plexswift/models/operations/ApplyUpdatesUpdaterErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct ApplyUpdatesUpdaterErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.ApplyUpdatesUpdaterErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/AutoSelectSubtitle.swift b/Sources/Plexswift/models/operations/AutoSelectSubtitle.swift new file mode 100644 index 0000000..a68aeba --- /dev/null +++ b/Sources/Plexswift/models/operations/AutoSelectSubtitle.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + public enum AutoSelectSubtitle: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/Billing.swift b/Sources/Plexswift/models/operations/Billing.swift new file mode 100644 index 0000000..7c92b40 --- /dev/null +++ b/Sources/Plexswift/models/operations/Billing.swift @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Billing { + public let internalPaymentMethod: Operations.InternalPaymentMethod + public let paymentMethodId: Int + + /// Creates an object with the specified parameters + /// + /// + public init(internalPaymentMethod: Operations.InternalPaymentMethod, paymentMethodId: Int) { + self.internalPaymentMethod = internalPaymentMethod + self.paymentMethodId = paymentMethodId + } + }} + +extension Operations.Billing: Codable { + enum CodingKeys: String, CodingKey { + case internalPaymentMethod + case paymentMethodId + } +} + diff --git a/Sources/Plexswift/models/operations/ButlerTask.swift b/Sources/Plexswift/models/operations/ButlerTask.swift index 307829b..bc29a6a 100644 --- a/Sources/Plexswift/models/operations/ButlerTask.swift +++ b/Sources/Plexswift/models/operations/ButlerTask.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -24,8 +24,7 @@ extension Operations { self.scheduleRandomized = scheduleRandomized self.title = title } - } -} + }} extension Operations.ButlerTask: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/ButlerTasks.swift b/Sources/Plexswift/models/operations/ButlerTasks.swift index 8b0628b..5a51959 100644 --- a/Sources/Plexswift/models/operations/ButlerTasks.swift +++ b/Sources/Plexswift/models/operations/ButlerTasks.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(butlerTask: [Operations.ButlerTask]? = nil) { self.butlerTask = butlerTask } - } -} + }} extension Operations.ButlerTasks: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/CancelServerActivitiesActivitiesErrors.swift b/Sources/Plexswift/models/operations/CancelServerActivitiesActivitiesErrors.swift new file mode 100644 index 0000000..03130e6 --- /dev/null +++ b/Sources/Plexswift/models/operations/CancelServerActivitiesActivitiesErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct CancelServerActivitiesActivitiesErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.CancelServerActivitiesActivitiesErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/CancelServerActivitiesBadRequest.swift b/Sources/Plexswift/models/operations/CancelServerActivitiesBadRequest.swift new file mode 100644 index 0000000..e0ab715 --- /dev/null +++ b/Sources/Plexswift/models/operations/CancelServerActivitiesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct CancelServerActivitiesBadRequest { + public let errors: [Operations.CancelServerActivitiesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.CancelServerActivitiesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.CancelServerActivitiesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/CancelServerActivitiesErrors.swift b/Sources/Plexswift/models/operations/CancelServerActivitiesErrors.swift index 986b1b8..c4cb1a9 100644 --- a/Sources/Plexswift/models/operations/CancelServerActivitiesErrors.swift +++ b/Sources/Plexswift/models/operations/CancelServerActivitiesErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct CancelServerActivitiesErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.CancelServerActivitiesErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.CancelServerActivitiesErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.CancelServerActivitiesErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/CancelServerActivitiesRequest.swift b/Sources/Plexswift/models/operations/CancelServerActivitiesRequest.swift index aafd1e2..fa12afb 100644 --- a/Sources/Plexswift/models/operations/CancelServerActivitiesRequest.swift +++ b/Sources/Plexswift/models/operations/CancelServerActivitiesRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,5 +15,4 @@ extension Operations { public init(activityUUID: String) { self.activityUUID = activityUUID } - } -} + }} diff --git a/Sources/Plexswift/models/operations/CancelServerActivitiesResponse.swift b/Sources/Plexswift/models/operations/CancelServerActivitiesResponse.swift index a58ea73..d12b7f8 100644 --- a/Sources/Plexswift/models/operations/CancelServerActivitiesResponse.swift +++ b/Sources/Plexswift/models/operations/CancelServerActivitiesResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum CancelServerActivitiesResponse { case empty - case object(Operations.CancelServerActivitiesResponseBody) + case badRequest(Operations.CancelServerActivitiesBadRequest) + case unauthorized(Operations.CancelServerActivitiesUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.CancelServerActivitiesResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.CancelServerActivitiesBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.CancelServerActivitiesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/CancelServerActivitiesUnauthorized.swift b/Sources/Plexswift/models/operations/CancelServerActivitiesUnauthorized.swift new file mode 100644 index 0000000..62905e1 --- /dev/null +++ b/Sources/Plexswift/models/operations/CancelServerActivitiesUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct CancelServerActivitiesUnauthorized { + public let errors: [Operations.CancelServerActivitiesActivitiesErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.CancelServerActivitiesActivitiesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.CancelServerActivitiesUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/CheckForUpdatesBadRequest.swift b/Sources/Plexswift/models/operations/CheckForUpdatesBadRequest.swift new file mode 100644 index 0000000..d95f41f --- /dev/null +++ b/Sources/Plexswift/models/operations/CheckForUpdatesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct CheckForUpdatesBadRequest { + public let errors: [Operations.CheckForUpdatesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.CheckForUpdatesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.CheckForUpdatesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/CheckForUpdatesErrors.swift b/Sources/Plexswift/models/operations/CheckForUpdatesErrors.swift index 567c5cd..1948ce8 100644 --- a/Sources/Plexswift/models/operations/CheckForUpdatesErrors.swift +++ b/Sources/Plexswift/models/operations/CheckForUpdatesErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct CheckForUpdatesErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.CheckForUpdatesErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.CheckForUpdatesErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.CheckForUpdatesErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/CheckForUpdatesRequest.swift b/Sources/Plexswift/models/operations/CheckForUpdatesRequest.swift index 26099c5..23e89d2 100644 --- a/Sources/Plexswift/models/operations/CheckForUpdatesRequest.swift +++ b/Sources/Plexswift/models/operations/CheckForUpdatesRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,5 +15,4 @@ extension Operations { public init(download: Operations.Download? = nil) { self.download = download } - } -} + }} diff --git a/Sources/Plexswift/models/operations/CheckForUpdatesResponse.swift b/Sources/Plexswift/models/operations/CheckForUpdatesResponse.swift index 88aaf44..381364e 100644 --- a/Sources/Plexswift/models/operations/CheckForUpdatesResponse.swift +++ b/Sources/Plexswift/models/operations/CheckForUpdatesResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum CheckForUpdatesResponse { case empty - case object(Operations.CheckForUpdatesResponseBody) + case badRequest(Operations.CheckForUpdatesBadRequest) + case unauthorized(Operations.CheckForUpdatesUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.CheckForUpdatesResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.CheckForUpdatesBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.CheckForUpdatesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/CancelServerActivitiesResponseBody.swift b/Sources/Plexswift/models/operations/CheckForUpdatesUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/CancelServerActivitiesResponseBody.swift rename to Sources/Plexswift/models/operations/CheckForUpdatesUnauthorized.swift index e3965cb..4541826 100644 --- a/Sources/Plexswift/models/operations/CancelServerActivitiesResponseBody.swift +++ b/Sources/Plexswift/models/operations/CheckForUpdatesUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct CancelServerActivitiesResponseBody { - public let errors: [Operations.CancelServerActivitiesErrors]? + public struct CheckForUpdatesUnauthorized { + public let errors: [Operations.CheckForUpdatesUpdaterErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.CancelServerActivitiesErrors]? = nil) { + public init(errors: [Operations.CheckForUpdatesUpdaterErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.CancelServerActivitiesResponseBody: Codable { +extension Operations.CheckForUpdatesUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/CheckForUpdatesUpdaterErrors.swift b/Sources/Plexswift/models/operations/CheckForUpdatesUpdaterErrors.swift new file mode 100644 index 0000000..3f110a3 --- /dev/null +++ b/Sources/Plexswift/models/operations/CheckForUpdatesUpdaterErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct CheckForUpdatesUpdaterErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.CheckForUpdatesUpdaterErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/ClearPlaylistContentsBadRequest.swift b/Sources/Plexswift/models/operations/ClearPlaylistContentsBadRequest.swift new file mode 100644 index 0000000..8a6d6e7 --- /dev/null +++ b/Sources/Plexswift/models/operations/ClearPlaylistContentsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct ClearPlaylistContentsBadRequest { + public let errors: [Operations.ClearPlaylistContentsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.ClearPlaylistContentsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.ClearPlaylistContentsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/ClearPlaylistContentsErrors.swift b/Sources/Plexswift/models/operations/ClearPlaylistContentsErrors.swift index 5d2a9c6..8e53779 100644 --- a/Sources/Plexswift/models/operations/ClearPlaylistContentsErrors.swift +++ b/Sources/Plexswift/models/operations/ClearPlaylistContentsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct ClearPlaylistContentsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.ClearPlaylistContentsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.ClearPlaylistContentsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.ClearPlaylistContentsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/ClearPlaylistContentsPlaylistsErrors.swift b/Sources/Plexswift/models/operations/ClearPlaylistContentsPlaylistsErrors.swift new file mode 100644 index 0000000..0886e6f --- /dev/null +++ b/Sources/Plexswift/models/operations/ClearPlaylistContentsPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct ClearPlaylistContentsPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.ClearPlaylistContentsPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/ClearPlaylistContentsRequest.swift b/Sources/Plexswift/models/operations/ClearPlaylistContentsRequest.swift index 36024da..9d6cb33 100644 --- a/Sources/Plexswift/models/operations/ClearPlaylistContentsRequest.swift +++ b/Sources/Plexswift/models/operations/ClearPlaylistContentsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { public init(playlistID: Double) { self._playlistID = DecimalSerialized(wrappedValue: playlistID) } - } -} + }} extension Operations.ClearPlaylistContentsRequest { var playlistIDWrapper: DecimalSerialized { return _playlistID diff --git a/Sources/Plexswift/models/operations/ClearPlaylistContentsResponse.swift b/Sources/Plexswift/models/operations/ClearPlaylistContentsResponse.swift index 4ff7584..450f455 100644 --- a/Sources/Plexswift/models/operations/ClearPlaylistContentsResponse.swift +++ b/Sources/Plexswift/models/operations/ClearPlaylistContentsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum ClearPlaylistContentsResponse { case empty - case object(Operations.ClearPlaylistContentsResponseBody) + case badRequest(Operations.ClearPlaylistContentsBadRequest) + case unauthorized(Operations.ClearPlaylistContentsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.ClearPlaylistContentsResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.ClearPlaylistContentsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.ClearPlaylistContentsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/ClearPlaylistContentsUnauthorized.swift b/Sources/Plexswift/models/operations/ClearPlaylistContentsUnauthorized.swift new file mode 100644 index 0000000..d51639c --- /dev/null +++ b/Sources/Plexswift/models/operations/ClearPlaylistContentsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct ClearPlaylistContentsUnauthorized { + public let errors: [Operations.ClearPlaylistContentsPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.ClearPlaylistContentsPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.ClearPlaylistContentsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/Connections.swift b/Sources/Plexswift/models/operations/Connections.swift new file mode 100644 index 0000000..5ae3038 --- /dev/null +++ b/Sources/Plexswift/models/operations/Connections.swift @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Connections { + public let address: String + public let iPv6: Bool + public let local: Bool + @DecimalSerialized + public private(set) var port: Double + public let `protocol`: String + public let relay: Bool + public let uri: String + + /// Creates an object with the specified parameters + /// + /// + public init(address: String, iPv6: Bool, local: Bool, port: Double, `protocol`: String, relay: Bool, uri: String) { + self.address = address + self.iPv6 = iPv6 + self.local = local + self._port = DecimalSerialized(wrappedValue: port) + self.`protocol` = `protocol` + self.relay = relay + self.uri = uri + } + }} + +extension Operations.Connections: Codable { + enum CodingKeys: String, CodingKey { + case address + case iPv6 = "IPv6" + case local + case port + case `protocol` = "protocol" + case relay + case uri + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.address = try container.decode(String.self, forKey: .address) + self.iPv6 = try container.decode(Bool.self, forKey: .iPv6) + self.local = try container.decode(Bool.self, forKey: .local) + self._port = try container.decode(DecimalSerialized.self, forKey: .port) + self.`protocol` = try container.decode(String.self, forKey: .`protocol`) + self.relay = try container.decode(Bool.self, forKey: .relay) + self.uri = try container.decode(String.self, forKey: .uri) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.address, forKey: .address) + try container.encode(self.iPv6, forKey: .iPv6) + try container.encode(self.local, forKey: .local) + try container.encode(self._port, forKey: .port) + try container.encode(self.`protocol`, forKey: .`protocol`) + try container.encode(self.relay, forKey: .relay) + try container.encode(self.uri, forKey: .uri) + } +} + +extension Operations.Connections { + var portWrapper: DecimalSerialized { + return _port + } +} diff --git a/Sources/Plexswift/models/operations/Context.swift b/Sources/Plexswift/models/operations/Context.swift index afda430..07e48bb 100644 --- a/Sources/Plexswift/models/operations/Context.swift +++ b/Sources/Plexswift/models/operations/Context.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(librarySectionID: String? = nil) { self.librarySectionID = librarySectionID } - } -} + }} extension Operations.Context: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Country.swift b/Sources/Plexswift/models/operations/Country.swift index c1c9262..6f003fc 100644 --- a/Sources/Plexswift/models/operations/Country.swift +++ b/Sources/Plexswift/models/operations/Country.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.Country: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/CreatePlaylistBadRequest.swift b/Sources/Plexswift/models/operations/CreatePlaylistBadRequest.swift new file mode 100644 index 0000000..42ae935 --- /dev/null +++ b/Sources/Plexswift/models/operations/CreatePlaylistBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct CreatePlaylistBadRequest { + public let errors: [Operations.CreatePlaylistErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.CreatePlaylistErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.CreatePlaylistBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/CreatePlaylistErrors.swift b/Sources/Plexswift/models/operations/CreatePlaylistErrors.swift index 10da4d8..173ab49 100644 --- a/Sources/Plexswift/models/operations/CreatePlaylistErrors.swift +++ b/Sources/Plexswift/models/operations/CreatePlaylistErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct CreatePlaylistErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.CreatePlaylistErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.CreatePlaylistErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.CreatePlaylistErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/CreatePlaylistMediaContainer.swift b/Sources/Plexswift/models/operations/CreatePlaylistMediaContainer.swift index a6af143..312abed 100644 --- a/Sources/Plexswift/models/operations/CreatePlaylistMediaContainer.swift +++ b/Sources/Plexswift/models/operations/CreatePlaylistMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} extension Operations.CreatePlaylistMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/CreatePlaylistMetadata.swift b/Sources/Plexswift/models/operations/CreatePlaylistMetadata.swift index 4cb9a52..5d0a90e 100644 --- a/Sources/Plexswift/models/operations/CreatePlaylistMetadata.swift +++ b/Sources/Plexswift/models/operations/CreatePlaylistMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -43,8 +43,7 @@ extension Operations { self.updatedAt = updatedAt self.viewCount = viewCount } - } -} + }} extension Operations.CreatePlaylistMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/CreatePlaylistPlaylistsErrors.swift b/Sources/Plexswift/models/operations/CreatePlaylistPlaylistsErrors.swift new file mode 100644 index 0000000..323073a --- /dev/null +++ b/Sources/Plexswift/models/operations/CreatePlaylistPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct CreatePlaylistPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.CreatePlaylistPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/CreatePlaylistPlaylistsResponseBody.swift b/Sources/Plexswift/models/operations/CreatePlaylistPlaylistsResponseBody.swift deleted file mode 100644 index e00283d..0000000 --- a/Sources/Plexswift/models/operations/CreatePlaylistPlaylistsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct CreatePlaylistPlaylistsResponseBody { - public let errors: [Operations.CreatePlaylistErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.CreatePlaylistErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.CreatePlaylistPlaylistsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/CreatePlaylistQueryParamType.swift b/Sources/Plexswift/models/operations/CreatePlaylistQueryParamType.swift new file mode 100644 index 0000000..95bac92 --- /dev/null +++ b/Sources/Plexswift/models/operations/CreatePlaylistQueryParamType.swift @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// type of playlist to create + public enum CreatePlaylistQueryParamType: String, Codable, APIValue { + case audio = "audio" + case video = "video" + case photo = "photo" + }} diff --git a/Sources/Plexswift/models/operations/CreatePlaylistRequest.swift b/Sources/Plexswift/models/operations/CreatePlaylistRequest.swift index 23a240c..f3a6703 100644 --- a/Sources/Plexswift/models/operations/CreatePlaylistRequest.swift +++ b/Sources/Plexswift/models/operations/CreatePlaylistRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -10,7 +10,7 @@ extension Operations { /// name of the playlist public let title: String /// type of playlist to create - public let type: Operations.QueryParamType + public let type: Operations.CreatePlaylistQueryParamType /// the content URI for the playlist public let uri: String /// the play queue to copy to a playlist @@ -25,15 +25,14 @@ extension Operations { /// - Parameter uri: the content URI for the playlist /// - Parameter playQueueID: the play queue to copy to a playlist /// - public init(smart: Operations.Smart, title: String, type: Operations.QueryParamType, uri: String, playQueueID: Double? = nil) { + public init(smart: Operations.Smart, title: String, type: Operations.CreatePlaylistQueryParamType, uri: String, playQueueID: Double? = nil) { self.smart = smart self.title = title self.type = type self.uri = uri self._playQueueID = DecimalSerialized(wrappedValue: playQueueID) } - } -} + }} extension Operations.CreatePlaylistRequest { var playQueueIDWrapper: DecimalSerialized { return _playQueueID diff --git a/Sources/Plexswift/models/operations/CreatePlaylistResponse.swift b/Sources/Plexswift/models/operations/CreatePlaylistResponse.swift index 39d7e85..7287224 100644 --- a/Sources/Plexswift/models/operations/CreatePlaylistResponse.swift +++ b/Sources/Plexswift/models/operations/CreatePlaylistResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum CreatePlaylistResponse { case empty - case twoHundredApplicationJsonObject(Operations.CreatePlaylistResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.CreatePlaylistPlaylistsResponseBody) + case badRequest(Operations.CreatePlaylistBadRequest) + case object(Operations.CreatePlaylistResponseBody) + case unauthorized(Operations.CreatePlaylistUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.CreatePlaylistResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.CreatePlaylistBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.CreatePlaylistPlaylistsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.CreatePlaylistResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.CreatePlaylistUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/CreatePlaylistResponseBody.swift b/Sources/Plexswift/models/operations/CreatePlaylistResponseBody.swift index 8b9aea6..77acc0d 100644 --- a/Sources/Plexswift/models/operations/CreatePlaylistResponseBody.swift +++ b/Sources/Plexswift/models/operations/CreatePlaylistResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.CreatePlaylistMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.CreatePlaylistResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/StartUniversalTranscodeResponseBody.swift b/Sources/Plexswift/models/operations/CreatePlaylistUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/StartUniversalTranscodeResponseBody.swift rename to Sources/Plexswift/models/operations/CreatePlaylistUnauthorized.swift index e669659..c7bc83d 100644 --- a/Sources/Plexswift/models/operations/StartUniversalTranscodeResponseBody.swift +++ b/Sources/Plexswift/models/operations/CreatePlaylistUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct StartUniversalTranscodeResponseBody { - public let errors: [Operations.StartUniversalTranscodeErrors]? + public struct CreatePlaylistUnauthorized { + public let errors: [Operations.CreatePlaylistPlaylistsErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.StartUniversalTranscodeErrors]? = nil) { + public init(errors: [Operations.CreatePlaylistPlaylistsErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.StartUniversalTranscodeResponseBody: Codable { +extension Operations.CreatePlaylistUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/DefaultSubtitleAccessibility.swift b/Sources/Plexswift/models/operations/DefaultSubtitleAccessibility.swift new file mode 100644 index 0000000..a05ca7a --- /dev/null +++ b/Sources/Plexswift/models/operations/DefaultSubtitleAccessibility.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + public enum DefaultSubtitleAccessibility: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/DefaultSubtitleForced.swift b/Sources/Plexswift/models/operations/DefaultSubtitleForced.swift new file mode 100644 index 0000000..2f48fc3 --- /dev/null +++ b/Sources/Plexswift/models/operations/DefaultSubtitleForced.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + public enum DefaultSubtitleForced: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/DeleteLibraryBadRequest.swift b/Sources/Plexswift/models/operations/DeleteLibraryBadRequest.swift new file mode 100644 index 0000000..461b80c --- /dev/null +++ b/Sources/Plexswift/models/operations/DeleteLibraryBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct DeleteLibraryBadRequest { + public let errors: [Operations.DeleteLibraryErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.DeleteLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.DeleteLibraryBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/DeleteLibraryErrors.swift b/Sources/Plexswift/models/operations/DeleteLibraryErrors.swift index 837de55..c826b3d 100644 --- a/Sources/Plexswift/models/operations/DeleteLibraryErrors.swift +++ b/Sources/Plexswift/models/operations/DeleteLibraryErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct DeleteLibraryErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.DeleteLibraryErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.DeleteLibraryErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.DeleteLibraryErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/DeleteLibraryLibraryErrors.swift b/Sources/Plexswift/models/operations/DeleteLibraryLibraryErrors.swift new file mode 100644 index 0000000..e0a59eb --- /dev/null +++ b/Sources/Plexswift/models/operations/DeleteLibraryLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct DeleteLibraryLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.DeleteLibraryLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/DeleteLibraryRequest.swift b/Sources/Plexswift/models/operations/DeleteLibraryRequest.swift index 2dd3589..8e0e38c 100644 --- a/Sources/Plexswift/models/operations/DeleteLibraryRequest.swift +++ b/Sources/Plexswift/models/operations/DeleteLibraryRequest.swift @@ -1,25 +1,22 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct DeleteLibraryRequest: APIValue { - /// the Id of the library to query - @DecimalSerialized - public private(set) var sectionId: Double + /// The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + public let sectionKey: Int /// Creates an object with the specified parameters /// - /// - Parameter sectionId: the Id of the library to query + /// - Parameter sectionKey: The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// /// - public init(sectionId: Double) { - self._sectionId = DecimalSerialized(wrappedValue: sectionId) + public init(sectionKey: Int) { + self.sectionKey = sectionKey } - } -} -extension Operations.DeleteLibraryRequest { - var sectionIdWrapper: DecimalSerialized { - return _sectionId - } -} + }} diff --git a/Sources/Plexswift/models/operations/DeleteLibraryResponse.swift b/Sources/Plexswift/models/operations/DeleteLibraryResponse.swift index aca4a6c..14734a8 100644 --- a/Sources/Plexswift/models/operations/DeleteLibraryResponse.swift +++ b/Sources/Plexswift/models/operations/DeleteLibraryResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum DeleteLibraryResponse { case empty - case object(Operations.DeleteLibraryResponseBody) + case badRequest(Operations.DeleteLibraryBadRequest) + case unauthorized(Operations.DeleteLibraryUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.DeleteLibraryResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.DeleteLibraryBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.DeleteLibraryUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/StopTranscodeSessionResponseBody.swift b/Sources/Plexswift/models/operations/DeleteLibraryUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/StopTranscodeSessionResponseBody.swift rename to Sources/Plexswift/models/operations/DeleteLibraryUnauthorized.swift index 35b0d8b..2fc2ef4 100644 --- a/Sources/Plexswift/models/operations/StopTranscodeSessionResponseBody.swift +++ b/Sources/Plexswift/models/operations/DeleteLibraryUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct StopTranscodeSessionResponseBody { - public let errors: [Operations.StopTranscodeSessionErrors]? + public struct DeleteLibraryUnauthorized { + public let errors: [Operations.DeleteLibraryLibraryErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.StopTranscodeSessionErrors]? = nil) { + public init(errors: [Operations.DeleteLibraryLibraryErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.StopTranscodeSessionResponseBody: Codable { +extension Operations.DeleteLibraryUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/DeletePlaylistBadRequest.swift b/Sources/Plexswift/models/operations/DeletePlaylistBadRequest.swift new file mode 100644 index 0000000..94d3246 --- /dev/null +++ b/Sources/Plexswift/models/operations/DeletePlaylistBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct DeletePlaylistBadRequest { + public let errors: [Operations.DeletePlaylistErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.DeletePlaylistErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.DeletePlaylistBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/DeletePlaylistErrors.swift b/Sources/Plexswift/models/operations/DeletePlaylistErrors.swift index c85aed2..689681c 100644 --- a/Sources/Plexswift/models/operations/DeletePlaylistErrors.swift +++ b/Sources/Plexswift/models/operations/DeletePlaylistErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct DeletePlaylistErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.DeletePlaylistErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.DeletePlaylistErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.DeletePlaylistErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/DeletePlaylistPlaylistsErrors.swift b/Sources/Plexswift/models/operations/DeletePlaylistPlaylistsErrors.swift new file mode 100644 index 0000000..5bec73b --- /dev/null +++ b/Sources/Plexswift/models/operations/DeletePlaylistPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct DeletePlaylistPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.DeletePlaylistPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/DeletePlaylistRequest.swift b/Sources/Plexswift/models/operations/DeletePlaylistRequest.swift index 163bce4..fc9a79a 100644 --- a/Sources/Plexswift/models/operations/DeletePlaylistRequest.swift +++ b/Sources/Plexswift/models/operations/DeletePlaylistRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { public init(playlistID: Double) { self._playlistID = DecimalSerialized(wrappedValue: playlistID) } - } -} + }} extension Operations.DeletePlaylistRequest { var playlistIDWrapper: DecimalSerialized { return _playlistID diff --git a/Sources/Plexswift/models/operations/DeletePlaylistResponse.swift b/Sources/Plexswift/models/operations/DeletePlaylistResponse.swift index 91a5198..6a89707 100644 --- a/Sources/Plexswift/models/operations/DeletePlaylistResponse.swift +++ b/Sources/Plexswift/models/operations/DeletePlaylistResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum DeletePlaylistResponse { case empty - case object(Operations.DeletePlaylistResponseBody) + case badRequest(Operations.DeletePlaylistBadRequest) + case unauthorized(Operations.DeletePlaylistUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.DeletePlaylistResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.DeletePlaylistBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.DeletePlaylistUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/DeletePlaylistUnauthorized.swift b/Sources/Plexswift/models/operations/DeletePlaylistUnauthorized.swift new file mode 100644 index 0000000..3fca145 --- /dev/null +++ b/Sources/Plexswift/models/operations/DeletePlaylistUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct DeletePlaylistUnauthorized { + public let errors: [Operations.DeletePlaylistPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.DeletePlaylistPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.DeletePlaylistUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/Device.swift b/Sources/Plexswift/models/operations/Device.swift index fc25e0b..ab137c7 100644 --- a/Sources/Plexswift/models/operations/Device.swift +++ b/Sources/Plexswift/models/operations/Device.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,8 +23,7 @@ extension Operations { self.name = name self.platform = platform } - } -} + }} extension Operations.Device: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Director.swift b/Sources/Plexswift/models/operations/Director.swift index b60d46e..13cf63f 100644 --- a/Sources/Plexswift/models/operations/Director.swift +++ b/Sources/Plexswift/models/operations/Director.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.Director: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Directory.swift b/Sources/Plexswift/models/operations/Directory.swift index 11a6224..b70470b 100644 --- a/Sources/Plexswift/models/operations/Directory.swift +++ b/Sources/Plexswift/models/operations/Directory.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -18,8 +18,7 @@ extension Operations { self.key = key self.title = title } - } -} + }} extension Operations.Directory: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Download.swift b/Sources/Plexswift/models/operations/Download.swift index 0447c4d..7647e68 100644 --- a/Sources/Plexswift/models/operations/Download.swift +++ b/Sources/Plexswift/models/operations/Download.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum Download: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/EnablePaperTrailBadRequest.swift b/Sources/Plexswift/models/operations/EnablePaperTrailBadRequest.swift new file mode 100644 index 0000000..324280e --- /dev/null +++ b/Sources/Plexswift/models/operations/EnablePaperTrailBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct EnablePaperTrailBadRequest { + public let errors: [Operations.EnablePaperTrailErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.EnablePaperTrailErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.EnablePaperTrailBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/EnablePaperTrailErrors.swift b/Sources/Plexswift/models/operations/EnablePaperTrailErrors.swift index eaf0884..e51a52c 100644 --- a/Sources/Plexswift/models/operations/EnablePaperTrailErrors.swift +++ b/Sources/Plexswift/models/operations/EnablePaperTrailErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct EnablePaperTrailErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.EnablePaperTrailErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.EnablePaperTrailErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.EnablePaperTrailErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/EnablePaperTrailLogErrors.swift b/Sources/Plexswift/models/operations/EnablePaperTrailLogErrors.swift new file mode 100644 index 0000000..28810f9 --- /dev/null +++ b/Sources/Plexswift/models/operations/EnablePaperTrailLogErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct EnablePaperTrailLogErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.EnablePaperTrailLogErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/EnablePaperTrailResponse.swift b/Sources/Plexswift/models/operations/EnablePaperTrailResponse.swift index 10786cc..fe32cb6 100644 --- a/Sources/Plexswift/models/operations/EnablePaperTrailResponse.swift +++ b/Sources/Plexswift/models/operations/EnablePaperTrailResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum EnablePaperTrailResponse { case empty - case object(Operations.EnablePaperTrailResponseBody) + case badRequest(Operations.EnablePaperTrailBadRequest) + case unauthorized(Operations.EnablePaperTrailUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.EnablePaperTrailResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.EnablePaperTrailBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.EnablePaperTrailUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenLibraryResponseBody.swift b/Sources/Plexswift/models/operations/EnablePaperTrailUnauthorized.swift similarity index 50% rename from Sources/Plexswift/models/operations/GetMetadataChildrenLibraryResponseBody.swift rename to Sources/Plexswift/models/operations/EnablePaperTrailUnauthorized.swift index 3e127d7..c54e00a 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenLibraryResponseBody.swift +++ b/Sources/Plexswift/models/operations/EnablePaperTrailUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetMetadataChildrenLibraryResponseBody { - public let errors: [Operations.GetMetadataChildrenErrors]? + public struct EnablePaperTrailUnauthorized { + public let errors: [Operations.EnablePaperTrailLogErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetMetadataChildrenErrors]? = nil) { + public init(errors: [Operations.EnablePaperTrailLogErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetMetadataChildrenLibraryResponseBody: Codable { +extension Operations.EnablePaperTrailUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/Errors.swift b/Sources/Plexswift/models/operations/Errors.swift index d96b5bd..43db6cf 100644 --- a/Sources/Plexswift/models/operations/Errors.swift +++ b/Sources/Plexswift/models/operations/Errors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct Errors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.Errors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.Errors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.Errors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/Feature.swift b/Sources/Plexswift/models/operations/Feature.swift new file mode 100644 index 0000000..c889529 --- /dev/null +++ b/Sources/Plexswift/models/operations/Feature.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Feature { + public let directory: [Operations.GetMediaProvidersDirectory]? + public let key: String? + public let type: String? + + /// Creates an object with the specified parameters + /// + /// + public init(directory: [Operations.GetMediaProvidersDirectory]? = nil, key: String? = nil, type: String? = nil) { + self.directory = directory + self.key = key + self.type = type + } + }} + +extension Operations.Feature: Codable { + enum CodingKeys: String, CodingKey { + case directory = "Directory" + case key + case type + } +} + diff --git a/Sources/Plexswift/models/operations/Features.swift b/Sources/Plexswift/models/operations/Features.swift new file mode 100644 index 0000000..6eef09f --- /dev/null +++ b/Sources/Plexswift/models/operations/Features.swift @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum Features: String, Codable, APIValue { + case androidDolbyVision = "Android - Dolby Vision" + case androidPiP = "Android - PiP" + case cuSunset = "CU Sunset" + case hrkEnableEur = "HRK_enable_EUR" + case trebleShowFeatures = "TREBLE-show-features" + case adCountdownTimer = "ad-countdown-timer" + case adaptiveBitrate = "adaptive_bitrate" + case amazonLoopDebug = "amazon-loop-debug" + case avodAdAnalysis = "avod-ad-analysis" + case avodNewMedia = "avod-new-media" + case blacklistGetSignin = "blacklist_get_signin" + case clientRadioStations = "client-radio-stations" + case cloudflareTurnstileRequired = "cloudflare-turnstile-required" + case collections = "collections" + case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications" + case communityAccessPlexTv = "community_access_plex_tv" + case companionsSonos = "companions_sonos" + case customHomeRemoval = "custom-home-removal" + case disableHomeUserFriendships = "disable_home_user_friendships" + case disableSharingFriendships = "disable_sharing_friendships" + case drmSupport = "drm_support" + case excludeRestrictions = "exclude restrictions" + case federatedAuth = "federated-auth" + case friendRequestPushNotifications = "friend_request_push_notifications" + case guidedUpgrade = "guided-upgrade" + case home = "home" + case increasePasswordComplexity = "increase-password-complexity" + case ios14PrivacyBanner = "ios14-privacy-banner" + case iterableNotificationTokens = "iterable-notification-tokens" + case keepPaymentMethod = "keep-payment-method" + case kevinBacon = "kevin-bacon" + case koreaConsent = "korea-consent" + case leIsrgRootX1 = "le_isrg_root_x1" + case letsEncrypt = "lets_encrypt" + case lightningDvrPivot = "lightning-dvr-pivot" + case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments" + case livetv = "livetv" + case metadataSearch = "metadata_search" + case newPlexPassPrices = "new_plex_pass_prices" + case newsProviderSunsetModal = "news-provider-sunset-modal" + case photosFavorites = "photos-favorites" + case photosMetadataEdition = "photos-metadata-edition" + case pmsHealth = "pms_health" + case radio = "radio" + case rateLimitClientToken = "rate-limit-client-token" + case scrobblingServicePlexTv = "scrobbling-service-plex-tv" + case sharedServerNotification = "shared_server_notification" + case sharedSourceNotification = "shared_source_notification" + case signinWithApple = "signin_with_apple" + case springServeAdProvider = "spring_serve_ad_provider" + case transcoderCache = "transcoder_cache" + case tunerSharing = "tuner-sharing" + case twoFactorAuthentication = "two-factor-authentication" + case unsupportedtuners = "unsupportedtuners" + case upgrade3Ds2 = "upgrade-3ds2" + case vodSchema = "vod-schema" + case vodCloudflare = "vod_cloudflare" + case watchTogetherInvite = "watch-together-invite" + case webServerDashboard = "web_server_dashboard" + }} diff --git a/Sources/Plexswift/models/operations/Field.swift b/Sources/Plexswift/models/operations/Field.swift index bd8c0c3..aecc5e9 100644 --- a/Sources/Plexswift/models/operations/Field.swift +++ b/Sources/Plexswift/models/operations/Field.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,8 +19,7 @@ extension Operations { self.title = title self.type = type } - } -} + }} extension Operations.Field: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/FieldType.swift b/Sources/Plexswift/models/operations/FieldType.swift index 381c51a..67a6ac1 100644 --- a/Sources/Plexswift/models/operations/FieldType.swift +++ b/Sources/Plexswift/models/operations/FieldType.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.`operator` = `operator` self.type = type } - } -} + }} extension Operations.FieldType: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Filter.swift b/Sources/Plexswift/models/operations/Filter.swift index 14a6965..eecfc52 100644 --- a/Sources/Plexswift/models/operations/Filter.swift +++ b/Sources/Plexswift/models/operations/Filter.swift @@ -1,21 +1,11 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { - /// Filters content by field and direction/equality - /// (Unknown if viewedAt is the only supported column) - /// - public struct Filter { - - /// Creates an object - /// - /// - public init() { - } - } -} - -extension Operations.Filter: Codable { -} - + /// Filter + public enum Filter: String, Codable, APIValue { + case all = "all" + case available = "available" + case released = "released" + }} diff --git a/Sources/Plexswift/models/operations/Force.swift b/Sources/Plexswift/models/operations/Force.swift index 0a6df9c..c81e23a 100644 --- a/Sources/Plexswift/models/operations/Force.swift +++ b/Sources/Plexswift/models/operations/Force.swift @@ -1,15 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { - /// Force overwriting of duplicate playlists. - /// By default, a playlist file uploaded with the same path will overwrite the existing playlist. - /// The `force` argument is used to disable overwriting. - /// If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - /// + /// Force the refresh even if the library is already being refreshed. public enum Force: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/Friend.swift b/Sources/Plexswift/models/operations/Friend.swift new file mode 100644 index 0000000..8e56de2 --- /dev/null +++ b/Sources/Plexswift/models/operations/Friend.swift @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Friend { + /// The account email address + public let email: String + /// The account full name + public let friendlyName: String + /// If the account is a Plex Home user + public let home: Bool + /// The Plex account ID + public let id: Int + /// If the account is a Plex Home managed user + public let restricted: Bool + public let sharedServers: [Operations.SharedServers] + public let sharedSources: [Operations.SharedSources] + /// Current friend request status + public let status: Operations.Status + /// URL of the account thumbnail + public let thumb: String + /// The title of the account (username or friendly name) + public let title: String + /// The account username + public let username: String + /// The account Universally Unique Identifier (UUID) + public let uuid: String + + /// Creates an object with the specified parameters + /// + /// - Parameter email: The account email address + /// - Parameter friendlyName: The account full name + /// - Parameter home: If the account is a Plex Home user + /// - Parameter id: The Plex account ID + /// - Parameter restricted: If the account is a Plex Home managed user + /// - Parameter status: Current friend request status + /// - Parameter thumb: URL of the account thumbnail + /// - Parameter title: The title of the account (username or friendly name) + /// - Parameter username: The account username + /// - Parameter uuid: The account Universally Unique Identifier (UUID) + /// + public init(email: String, friendlyName: String, home: Bool, id: Int, restricted: Bool, sharedServers: [Operations.SharedServers], sharedSources: [Operations.SharedSources], status: Operations.Status, thumb: String, title: String, username: String, uuid: String) { + self.email = email + self.friendlyName = friendlyName + self.home = home + self.id = id + self.restricted = restricted + self.sharedServers = sharedServers + self.sharedSources = sharedSources + self.status = status + self.thumb = thumb + self.title = title + self.username = username + self.uuid = uuid + } + }} + +extension Operations.Friend: Codable { + enum CodingKeys: String, CodingKey { + case email + case friendlyName + case home + case id + case restricted + case sharedServers + case sharedSources + case status + case thumb + case title + case username + case uuid + } +} + diff --git a/Sources/Plexswift/models/operations/Genre.swift b/Sources/Plexswift/models/operations/Genre.swift index 2f1afe5..a872c36 100644 --- a/Sources/Plexswift/models/operations/Genre.swift +++ b/Sources/Plexswift/models/operations/Genre.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.Genre: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GeoData.swift b/Sources/Plexswift/models/operations/GeoData.swift new file mode 100644 index 0000000..daced60 --- /dev/null +++ b/Sources/Plexswift/models/operations/GeoData.swift @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Geo location data + public struct GeoData { + /// The name of the city. + public let city: String + /// The ISO 3166-1 alpha-2 code of the country. + public let code: String + /// The continent code where the country is located. + public let continentCode: String + /// The geographical coordinates (latitude, longitude) of the location. + public let coordinates: String + /// The official name of the country. + public let country: String + /// Indicates if the country is a member of the European Union. + public let europeanUnionMember: Bool + /// Indicates if the country has privacy restrictions. + public let inPrivacyRestrictedCountry: Bool + /// Indicates if the region has privacy restrictions. + public let inPrivacyRestrictedRegion: Bool + /// The postal code of the location. + public let postalCode: Int + /// The name of the primary administrative subdivision. + public let subdivisions: String + /// The time zone of the country. + public let timeZone: String + + /// Creates an object with the specified parameters + /// + /// - Parameter city: The name of the city. + /// - Parameter code: The ISO 3166-1 alpha-2 code of the country. + /// - Parameter continentCode: The continent code where the country is located. + /// - Parameter coordinates: The geographical coordinates (latitude, longitude) of the location. + /// - Parameter country: The official name of the country. + /// - Parameter europeanUnionMember: Indicates if the country is a member of the European Union. + /// - Parameter inPrivacyRestrictedCountry: Indicates if the country has privacy restrictions. + /// - Parameter inPrivacyRestrictedRegion: Indicates if the region has privacy restrictions. + /// - Parameter postalCode: The postal code of the location. + /// - Parameter subdivisions: The name of the primary administrative subdivision. + /// - Parameter timeZone: The time zone of the country. + /// + public init(city: String, code: String, continentCode: String, coordinates: String, country: String, europeanUnionMember: Bool, inPrivacyRestrictedCountry: Bool, inPrivacyRestrictedRegion: Bool, postalCode: Int, subdivisions: String, timeZone: String) { + self.city = city + self.code = code + self.continentCode = continentCode + self.coordinates = coordinates + self.country = country + self.europeanUnionMember = europeanUnionMember + self.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry + self.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion + self.postalCode = postalCode + self.subdivisions = subdivisions + self.timeZone = timeZone + } + }} + +extension Operations.GeoData: Codable { + enum CodingKeys: String, CodingKey { + case city + case code + case continentCode = "continent_code" + case coordinates + case country + case europeanUnionMember = "european_union_member" + case inPrivacyRestrictedCountry = "in_privacy_restricted_country" + case inPrivacyRestrictedRegion = "in_privacy_restricted_region" + case postalCode = "postal_code" + case subdivisions + case timeZone = "time_zone" + } +} + diff --git a/Sources/Plexswift/models/operations/GetAllLibrariesBadRequest.swift b/Sources/Plexswift/models/operations/GetAllLibrariesBadRequest.swift new file mode 100644 index 0000000..2da17fc --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAllLibrariesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetAllLibrariesBadRequest { + public let errors: [Operations.GetAllLibrariesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetAllLibrariesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetAllLibrariesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibrariesDirectory.swift b/Sources/Plexswift/models/operations/GetAllLibrariesDirectory.swift similarity index 77% rename from Sources/Plexswift/models/operations/GetLibrariesDirectory.swift rename to Sources/Plexswift/models/operations/GetAllLibrariesDirectory.swift index eeeb8f5..c2905dc 100644 --- a/Sources/Plexswift/models/operations/GetLibrariesDirectory.swift +++ b/Sources/Plexswift/models/operations/GetAllLibrariesDirectory.swift @@ -1,36 +1,42 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetLibrariesDirectory { + public struct GetAllLibrariesDirectory { public let agent: String? public let allowSync: Bool? public let art: String? public let composite: String? public let content: Bool? public let contentChangedAt: Int? + /// Unix epoch datetime public let createdAt: Int? public let directory: Bool? public let filters: Bool? public let hidden: Int? public let key: String? public let language: String? - public let location: [Operations.GetLibrariesLocation]? + public let location: [Operations.Location]? public let refreshing: Bool? + /// Unix epoch datetime public let scannedAt: Int? public let scanner: String? public let thumb: String? public let title: String? public let type: String? + /// Unix epoch datetime public let updatedAt: Int? public let uuid: String? /// Creates an object with the specified parameters /// + /// - Parameter createdAt: Unix epoch datetime + /// - Parameter scannedAt: Unix epoch datetime + /// - Parameter updatedAt: Unix epoch datetime /// - public init(agent: String? = nil, allowSync: Bool? = nil, art: String? = nil, composite: String? = nil, content: Bool? = nil, contentChangedAt: Int? = nil, createdAt: Int? = nil, directory: Bool? = nil, filters: Bool? = nil, hidden: Int? = nil, key: String? = nil, language: String? = nil, location: [Operations.GetLibrariesLocation]? = nil, refreshing: Bool? = nil, scannedAt: Int? = nil, scanner: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, uuid: String? = nil) { + public init(agent: String? = nil, allowSync: Bool? = nil, art: String? = nil, composite: String? = nil, content: Bool? = nil, contentChangedAt: Int? = nil, createdAt: Int? = nil, directory: Bool? = nil, filters: Bool? = nil, hidden: Int? = nil, key: String? = nil, language: String? = nil, location: [Operations.Location]? = nil, refreshing: Bool? = nil, scannedAt: Int? = nil, scanner: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, uuid: String? = nil) { self.agent = agent self.allowSync = allowSync self.art = art @@ -53,10 +59,9 @@ extension Operations { self.updatedAt = updatedAt self.uuid = uuid } - } -} + }} -extension Operations.GetLibrariesDirectory: Codable { +extension Operations.GetAllLibrariesDirectory: Codable { enum CodingKeys: String, CodingKey { case agent case allowSync diff --git a/Sources/Plexswift/models/operations/GetAllLibrariesErrors.swift b/Sources/Plexswift/models/operations/GetAllLibrariesErrors.swift new file mode 100644 index 0000000..20fb016 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAllLibrariesErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetAllLibrariesErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetAllLibrariesErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetAllLibrariesLibraryErrors.swift b/Sources/Plexswift/models/operations/GetAllLibrariesLibraryErrors.swift new file mode 100644 index 0000000..b3cd27e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAllLibrariesLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetAllLibrariesLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetAllLibrariesLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetAllLibrariesMediaContainer.swift b/Sources/Plexswift/models/operations/GetAllLibrariesMediaContainer.swift new file mode 100644 index 0000000..0e0fb22 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAllLibrariesMediaContainer.swift @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetAllLibrariesMediaContainer { + public let allowSync: Bool + public let size: Int + public let title1: String + public let directory: [Operations.GetAllLibrariesDirectory]? + + /// Creates an object with the specified parameters + /// + /// + public init(allowSync: Bool, size: Int, title1: String, directory: [Operations.GetAllLibrariesDirectory]? = nil) { + self.allowSync = allowSync + self.size = size + self.title1 = title1 + self.directory = directory + } + }} + +extension Operations.GetAllLibrariesMediaContainer: Codable { + enum CodingKeys: String, CodingKey { + case allowSync + case size + case title1 + case directory = "Directory" + } +} + diff --git a/Sources/Plexswift/models/operations/GetAllLibrariesResponse.swift b/Sources/Plexswift/models/operations/GetAllLibrariesResponse.swift new file mode 100644 index 0000000..3a193ed --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAllLibrariesResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetAllLibrariesResponse { + case empty + case badRequest(Operations.GetAllLibrariesBadRequest) + case object(Operations.GetAllLibrariesResponseBody) + case unauthorized(Operations.GetAllLibrariesUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetAllLibrariesBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetAllLibrariesResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetAllLibrariesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetAllLibrariesResponseBody.swift b/Sources/Plexswift/models/operations/GetAllLibrariesResponseBody.swift new file mode 100644 index 0000000..d2dc383 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAllLibrariesResponseBody.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The libraries available on the Server + public struct GetAllLibrariesResponseBody { + public let mediaContainer: Operations.GetAllLibrariesMediaContainer? + + /// Creates an object with the specified parameters + /// + /// + public init(mediaContainer: Operations.GetAllLibrariesMediaContainer? = nil) { + self.mediaContainer = mediaContainer + } + }} + +extension Operations.GetAllLibrariesResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case mediaContainer = "MediaContainer" + } +} + diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsResponseBody.swift b/Sources/Plexswift/models/operations/GetAllLibrariesUnauthorized.swift similarity index 50% rename from Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsResponseBody.swift rename to Sources/Plexswift/models/operations/GetAllLibrariesUnauthorized.swift index 5f9bbf7..cf333a8 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetAllLibrariesUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetBandwidthStatisticsStatisticsResponseBody { - public let errors: [Operations.GetBandwidthStatisticsErrors]? + public struct GetAllLibrariesUnauthorized { + public let errors: [Operations.GetAllLibrariesLibraryErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetBandwidthStatisticsErrors]? = nil) { + public init(errors: [Operations.GetAllLibrariesLibraryErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetBandwidthStatisticsStatisticsResponseBody: Codable { +extension Operations.GetAllLibrariesUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsBadRequest.swift b/Sources/Plexswift/models/operations/GetAvailableClientsBadRequest.swift new file mode 100644 index 0000000..cb0828e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAvailableClientsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetAvailableClientsBadRequest { + public let errors: [Operations.GetAvailableClientsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetAvailableClientsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetAvailableClientsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsErrors.swift b/Sources/Plexswift/models/operations/GetAvailableClientsErrors.swift index bad8616..4fdade3 100644 --- a/Sources/Plexswift/models/operations/GetAvailableClientsErrors.swift +++ b/Sources/Plexswift/models/operations/GetAvailableClientsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetAvailableClientsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetAvailableClientsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetAvailableClientsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetAvailableClientsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsMediaContainer.swift b/Sources/Plexswift/models/operations/GetAvailableClientsMediaContainer.swift index bdd448e..633a2f6 100644 --- a/Sources/Plexswift/models/operations/GetAvailableClientsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetAvailableClientsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { self.server = server self._size = DecimalSerialized(wrappedValue: size) } - } -} + }} extension Operations.GetAvailableClientsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift b/Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift index c71e2a0..8e81bf9 100644 --- a/Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift +++ b/Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetAvailableClientsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetAvailableClientsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetAvailableClientsServerResponseBody) + case badRequest(Operations.GetAvailableClientsBadRequest) + case object(Operations.GetAvailableClientsResponseBody) + case unauthorized(Operations.GetAvailableClientsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetAvailableClientsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetAvailableClientsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetAvailableClientsServerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetAvailableClientsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetAvailableClientsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift b/Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift index 2488206..b555892 100644 --- a/Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetAvailableClientsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetAvailableClientsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsServerErrors.swift b/Sources/Plexswift/models/operations/GetAvailableClientsServerErrors.swift new file mode 100644 index 0000000..bbb0103 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAvailableClientsServerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetAvailableClientsServerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetAvailableClientsServerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetAvailableClientsUnauthorized.swift b/Sources/Plexswift/models/operations/GetAvailableClientsUnauthorized.swift new file mode 100644 index 0000000..0635768 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetAvailableClientsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetAvailableClientsUnauthorized { + public let errors: [Operations.GetAvailableClientsServerErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetAvailableClientsServerErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetAvailableClientsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsAccount.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsAccount.swift index 3719aaa..c0ab26a 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsAccount.swift +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsAccount.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -27,8 +27,7 @@ extension Operations { self.subtitleMode = subtitleMode self.thumb = thumb } - } -} + }} extension Operations.GetBandwidthStatisticsAccount: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsBadRequest.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsBadRequest.swift new file mode 100644 index 0000000..41ee1a4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetBandwidthStatisticsBadRequest { + public let errors: [Operations.GetBandwidthStatisticsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetBandwidthStatisticsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetBandwidthStatisticsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsDevice.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsDevice.swift index b4bee38..f4d0d76 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsDevice.swift +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsDevice.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -21,8 +21,7 @@ extension Operations { self.name = name self.platform = platform } - } -} + }} extension Operations.GetBandwidthStatisticsDevice: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsErrors.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsErrors.swift index 35836e7..8c78ece 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsErrors.swift +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetBandwidthStatisticsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetBandwidthStatisticsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetBandwidthStatisticsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetBandwidthStatisticsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsMediaContainer.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsMediaContainer.swift index e0662dd..47a1f36 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,8 +19,7 @@ extension Operations { self.size = size self.statisticsBandwidth = statisticsBandwidth } - } -} + }} extension Operations.GetBandwidthStatisticsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsRequest.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsRequest.swift index 18a084f..8490b83 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsRequest.swift +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,5 +19,4 @@ extension Operations { public init(timespan: Int? = nil) { self.timespan = timespan } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponse.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponse.swift index 8bb4bba..e723868 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponse.swift +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetBandwidthStatisticsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetBandwidthStatisticsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetBandwidthStatisticsStatisticsResponseBody) + case badRequest(Operations.GetBandwidthStatisticsBadRequest) + case object(Operations.GetBandwidthStatisticsResponseBody) + case unauthorized(Operations.GetBandwidthStatisticsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetBandwidthStatisticsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetBandwidthStatisticsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetBandwidthStatisticsStatisticsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetBandwidthStatisticsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetBandwidthStatisticsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponseBody.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponseBody.swift index 41259f5..34572b5 100644 --- a/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetBandwidthStatisticsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetBandwidthStatisticsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsErrors.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsErrors.swift new file mode 100644 index 0000000..30352df --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetBandwidthStatisticsStatisticsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetBandwidthStatisticsStatisticsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetBandwidthStatisticsUnauthorized.swift b/Sources/Plexswift/models/operations/GetBandwidthStatisticsUnauthorized.swift new file mode 100644 index 0000000..4148dc6 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBandwidthStatisticsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetBandwidthStatisticsUnauthorized { + public let errors: [Operations.GetBandwidthStatisticsStatisticsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetBandwidthStatisticsStatisticsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetBandwidthStatisticsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetBannerImageBadRequest.swift b/Sources/Plexswift/models/operations/GetBannerImageBadRequest.swift new file mode 100644 index 0000000..a472d38 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBannerImageBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetBannerImageBadRequest { + public let errors: [Operations.GetBannerImageErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetBannerImageErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetBannerImageBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetBannerImageErrors.swift b/Sources/Plexswift/models/operations/GetBannerImageErrors.swift new file mode 100644 index 0000000..cb0dd03 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBannerImageErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetBannerImageErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetBannerImageErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetBannerImageMediaErrors.swift b/Sources/Plexswift/models/operations/GetBannerImageMediaErrors.swift new file mode 100644 index 0000000..7f6f411 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBannerImageMediaErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetBannerImageMediaErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetBannerImageMediaErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetBannerImageRequest.swift b/Sources/Plexswift/models/operations/GetBannerImageRequest.swift new file mode 100644 index 0000000..9067741 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBannerImageRequest.swift @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetBannerImageRequest: APIValue { + public let height: Int + public let minSize: Int + /// the id of the library item to return the children of. + public let ratingKey: Int + public let upscale: Int + public let width: Int + /// Plex Authentication Token + public let xPlexToken: String + + /// Creates an object with the specified parameters + /// + /// - Parameter ratingKey: the id of the library item to return the children of. + /// - Parameter xPlexToken: Plex Authentication Token + /// + public init(height: Int, minSize: Int, ratingKey: Int, upscale: Int, width: Int, xPlexToken: String) { + self.height = height + self.minSize = minSize + self.ratingKey = ratingKey + self.upscale = upscale + self.width = width + self.xPlexToken = xPlexToken + } + }} diff --git a/Sources/Plexswift/models/operations/GetBannerImageResponse.swift b/Sources/Plexswift/models/operations/GetBannerImageResponse.swift new file mode 100644 index 0000000..fee39fb --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBannerImageResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetBannerImageResponse { + case empty + case badRequest(Operations.GetBannerImageBadRequest) + case bytes(Data) + case unauthorized(Operations.GetBannerImageUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetBannerImageBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func bytes() throws -> Data { + guard case .bytes(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetBannerImageUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetBannerImageUnauthorized.swift b/Sources/Plexswift/models/operations/GetBannerImageUnauthorized.swift new file mode 100644 index 0000000..8b0bc8a --- /dev/null +++ b/Sources/Plexswift/models/operations/GetBannerImageUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetBannerImageUnauthorized { + public let errors: [Operations.GetBannerImageMediaErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetBannerImageMediaErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetBannerImageUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetButlerTasksBadRequest.swift b/Sources/Plexswift/models/operations/GetButlerTasksBadRequest.swift new file mode 100644 index 0000000..793147e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetButlerTasksBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetButlerTasksBadRequest { + public let errors: [Operations.GetButlerTasksErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetButlerTasksErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetButlerTasksBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetButlerTasksButlerErrors.swift b/Sources/Plexswift/models/operations/GetButlerTasksButlerErrors.swift new file mode 100644 index 0000000..50cf7f4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetButlerTasksButlerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetButlerTasksButlerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetButlerTasksButlerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetButlerTasksButlerResponseBody.swift b/Sources/Plexswift/models/operations/GetButlerTasksButlerResponseBody.swift deleted file mode 100644 index f4df845..0000000 --- a/Sources/Plexswift/models/operations/GetButlerTasksButlerResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetButlerTasksButlerResponseBody { - public let errors: [Operations.GetButlerTasksErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetButlerTasksErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetButlerTasksButlerResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetButlerTasksErrors.swift b/Sources/Plexswift/models/operations/GetButlerTasksErrors.swift index 47401fd..f19d3f9 100644 --- a/Sources/Plexswift/models/operations/GetButlerTasksErrors.swift +++ b/Sources/Plexswift/models/operations/GetButlerTasksErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetButlerTasksErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetButlerTasksErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetButlerTasksErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetButlerTasksErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetButlerTasksResponse.swift b/Sources/Plexswift/models/operations/GetButlerTasksResponse.swift index f9136ca..e4b45d7 100644 --- a/Sources/Plexswift/models/operations/GetButlerTasksResponse.swift +++ b/Sources/Plexswift/models/operations/GetButlerTasksResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetButlerTasksResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetButlerTasksResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetButlerTasksButlerResponseBody) + case badRequest(Operations.GetButlerTasksBadRequest) + case object(Operations.GetButlerTasksResponseBody) + case unauthorized(Operations.GetButlerTasksUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetButlerTasksResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetButlerTasksBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetButlerTasksButlerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetButlerTasksResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetButlerTasksUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetButlerTasksResponseBody.swift b/Sources/Plexswift/models/operations/GetButlerTasksResponseBody.swift index 42320c3..a682c0e 100644 --- a/Sources/Plexswift/models/operations/GetButlerTasksResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetButlerTasksResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(butlerTasks: Operations.ButlerTasks? = nil) { self.butlerTasks = butlerTasks } - } -} + }} extension Operations.GetButlerTasksResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesServerResponseBody.swift b/Sources/Plexswift/models/operations/GetButlerTasksUnauthorized.swift similarity index 50% rename from Sources/Plexswift/models/operations/GetServerPreferencesServerResponseBody.swift rename to Sources/Plexswift/models/operations/GetButlerTasksUnauthorized.swift index 139f013..76ba76a 100644 --- a/Sources/Plexswift/models/operations/GetServerPreferencesServerResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetButlerTasksUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetServerPreferencesServerResponseBody { - public let errors: [Operations.GetServerPreferencesErrors]? + public struct GetButlerTasksUnauthorized { + public let errors: [Operations.GetButlerTasksButlerErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetServerPreferencesErrors]? = nil) { + public init(errors: [Operations.GetButlerTasksButlerErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetServerPreferencesServerResponseBody: Codable { +extension Operations.GetButlerTasksUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetCompanionsDataBadRequest.swift b/Sources/Plexswift/models/operations/GetCompanionsDataBadRequest.swift new file mode 100644 index 0000000..5e78770 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetCompanionsDataBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetCompanionsDataBadRequest { + public let errors: [Operations.GetCompanionsDataErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetCompanionsDataErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetCompanionsDataBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetCompanionsDataErrors.swift b/Sources/Plexswift/models/operations/GetCompanionsDataErrors.swift new file mode 100644 index 0000000..da747c4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetCompanionsDataErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetCompanionsDataErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetCompanionsDataErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetCompanionsDataPlexErrors.swift b/Sources/Plexswift/models/operations/GetCompanionsDataPlexErrors.swift new file mode 100644 index 0000000..b58d54a --- /dev/null +++ b/Sources/Plexswift/models/operations/GetCompanionsDataPlexErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetCompanionsDataPlexErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetCompanionsDataPlexErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetCompanionsDataResponse.swift b/Sources/Plexswift/models/operations/GetCompanionsDataResponse.swift new file mode 100644 index 0000000..c91aaee --- /dev/null +++ b/Sources/Plexswift/models/operations/GetCompanionsDataResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetCompanionsDataResponse { + case empty + case badRequest(Operations.GetCompanionsDataBadRequest) + case responseBodies([Operations.ResponseBody]) + case unauthorized(Operations.GetCompanionsDataUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetCompanionsDataBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func responseBodies() throws -> [Operations.ResponseBody] { + guard case .responseBodies(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetCompanionsDataUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetCompanionsDataUnauthorized.swift b/Sources/Plexswift/models/operations/GetCompanionsDataUnauthorized.swift new file mode 100644 index 0000000..dea21c0 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetCompanionsDataUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetCompanionsDataUnauthorized { + public let errors: [Operations.GetCompanionsDataPlexErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetCompanionsDataPlexErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetCompanionsDataUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetDevicesBadRequest.swift b/Sources/Plexswift/models/operations/GetDevicesBadRequest.swift new file mode 100644 index 0000000..f2193ca --- /dev/null +++ b/Sources/Plexswift/models/operations/GetDevicesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetDevicesBadRequest { + public let errors: [Operations.GetDevicesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetDevicesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetDevicesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetDevicesErrors.swift b/Sources/Plexswift/models/operations/GetDevicesErrors.swift index 84fbc59..ebd065d 100644 --- a/Sources/Plexswift/models/operations/GetDevicesErrors.swift +++ b/Sources/Plexswift/models/operations/GetDevicesErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetDevicesErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetDevicesErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetDevicesErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetDevicesErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetDevicesMediaContainer.swift b/Sources/Plexswift/models/operations/GetDevicesMediaContainer.swift index d08deb4..5f6ca92 100644 --- a/Sources/Plexswift/models/operations/GetDevicesMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetDevicesMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -18,8 +18,7 @@ extension Operations { self.identifier = identifier self._size = DecimalSerialized(wrappedValue: size) } - } -} + }} extension Operations.GetDevicesMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetDevicesResponse.swift b/Sources/Plexswift/models/operations/GetDevicesResponse.swift index 5245aa3..b1d32e1 100644 --- a/Sources/Plexswift/models/operations/GetDevicesResponse.swift +++ b/Sources/Plexswift/models/operations/GetDevicesResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetDevicesResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetDevicesResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetDevicesServerResponseBody) + case badRequest(Operations.GetDevicesBadRequest) + case object(Operations.GetDevicesResponseBody) + case unauthorized(Operations.GetDevicesUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetDevicesResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetDevicesBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetDevicesServerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetDevicesResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetDevicesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetDevicesResponseBody.swift b/Sources/Plexswift/models/operations/GetDevicesResponseBody.swift index ffd1c26..c12bd44 100644 --- a/Sources/Plexswift/models/operations/GetDevicesResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetDevicesResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetDevicesMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetDevicesResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetDevicesServerErrors.swift b/Sources/Plexswift/models/operations/GetDevicesServerErrors.swift new file mode 100644 index 0000000..3973383 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetDevicesServerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetDevicesServerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetDevicesServerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/EnablePaperTrailResponseBody.swift b/Sources/Plexswift/models/operations/GetDevicesUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/EnablePaperTrailResponseBody.swift rename to Sources/Plexswift/models/operations/GetDevicesUnauthorized.swift index 829bf57..1a37aec 100644 --- a/Sources/Plexswift/models/operations/EnablePaperTrailResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetDevicesUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct EnablePaperTrailResponseBody { - public let errors: [Operations.EnablePaperTrailErrors]? + public struct GetDevicesUnauthorized { + public let errors: [Operations.GetDevicesServerErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.EnablePaperTrailErrors]? = nil) { + public init(errors: [Operations.GetDevicesServerErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.EnablePaperTrailResponseBody: Codable { +extension Operations.GetDevicesUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetFileHashBadRequest.swift b/Sources/Plexswift/models/operations/GetFileHashBadRequest.swift new file mode 100644 index 0000000..4444880 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetFileHashBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetFileHashBadRequest { + public let errors: [Operations.GetFileHashErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetFileHashErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetFileHashBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetFileHashErrors.swift b/Sources/Plexswift/models/operations/GetFileHashErrors.swift index 1c7d6f0..abb7a7d 100644 --- a/Sources/Plexswift/models/operations/GetFileHashErrors.swift +++ b/Sources/Plexswift/models/operations/GetFileHashErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetFileHashErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetFileHashErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetFileHashErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetFileHashErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetFileHashLibraryErrors.swift b/Sources/Plexswift/models/operations/GetFileHashLibraryErrors.swift new file mode 100644 index 0000000..a26aeaf --- /dev/null +++ b/Sources/Plexswift/models/operations/GetFileHashLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetFileHashLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetFileHashLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetFileHashRequest.swift b/Sources/Plexswift/models/operations/GetFileHashRequest.swift index 43d3042..5bdbdb5 100644 --- a/Sources/Plexswift/models/operations/GetFileHashRequest.swift +++ b/Sources/Plexswift/models/operations/GetFileHashRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -20,8 +20,7 @@ extension Operations { self.url = url self._type = DecimalSerialized(wrappedValue: type) } - } -} + }} extension Operations.GetFileHashRequest { var typeWrapper: DecimalSerialized { return _type diff --git a/Sources/Plexswift/models/operations/GetFileHashResponse.swift b/Sources/Plexswift/models/operations/GetFileHashResponse.swift index 5bbb24d..ae70c6c 100644 --- a/Sources/Plexswift/models/operations/GetFileHashResponse.swift +++ b/Sources/Plexswift/models/operations/GetFileHashResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum GetFileHashResponse { case empty - case object(Operations.GetFileHashResponseBody) + case badRequest(Operations.GetFileHashBadRequest) + case unauthorized(Operations.GetFileHashUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.GetFileHashResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.GetFileHashBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetFileHashUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/PerformVoiceSearchResponseBody.swift b/Sources/Plexswift/models/operations/GetFileHashUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/PerformVoiceSearchResponseBody.swift rename to Sources/Plexswift/models/operations/GetFileHashUnauthorized.swift index c0e4afb..fb87e3e 100644 --- a/Sources/Plexswift/models/operations/PerformVoiceSearchResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetFileHashUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct PerformVoiceSearchResponseBody { - public let errors: [Operations.PerformVoiceSearchErrors]? + public struct GetFileHashUnauthorized { + public let errors: [Operations.GetFileHashLibraryErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.PerformVoiceSearchErrors]? = nil) { + public init(errors: [Operations.GetFileHashLibraryErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.PerformVoiceSearchResponseBody: Codable { +extension Operations.GetFileHashUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetGeoDataBadRequest.swift b/Sources/Plexswift/models/operations/GetGeoDataBadRequest.swift new file mode 100644 index 0000000..edcee86 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGeoDataBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetGeoDataBadRequest { + public let errors: [Operations.GetGeoDataErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetGeoDataErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetGeoDataBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetGeoDataErrors.swift b/Sources/Plexswift/models/operations/GetGeoDataErrors.swift new file mode 100644 index 0000000..abcdb33 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGeoDataErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetGeoDataErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetGeoDataErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetGeoDataGeoData.swift b/Sources/Plexswift/models/operations/GetGeoDataGeoData.swift new file mode 100644 index 0000000..52099b7 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGeoDataGeoData.swift @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Geo location data + public struct GetGeoDataGeoData { + /// The name of the city. + public let city: String + /// The ISO 3166-1 alpha-2 code of the country. + public let code: String + /// The continent code where the country is located. + public let continentCode: String + /// The geographical coordinates (latitude, longitude) of the location. + public let coordinates: String + /// The official name of the country. + public let country: String + /// Indicates if the country is a member of the European Union. + public let europeanUnionMember: Bool + /// Indicates if the country has privacy restrictions. + public let inPrivacyRestrictedCountry: Bool + /// Indicates if the region has privacy restrictions. + public let inPrivacyRestrictedRegion: Bool + /// The postal code of the location. + public let postalCode: Int + /// The name of the primary administrative subdivision. + public let subdivisions: String + /// The time zone of the country. + public let timeZone: String + + /// Creates an object with the specified parameters + /// + /// - Parameter city: The name of the city. + /// - Parameter code: The ISO 3166-1 alpha-2 code of the country. + /// - Parameter continentCode: The continent code where the country is located. + /// - Parameter coordinates: The geographical coordinates (latitude, longitude) of the location. + /// - Parameter country: The official name of the country. + /// - Parameter europeanUnionMember: Indicates if the country is a member of the European Union. + /// - Parameter inPrivacyRestrictedCountry: Indicates if the country has privacy restrictions. + /// - Parameter inPrivacyRestrictedRegion: Indicates if the region has privacy restrictions. + /// - Parameter postalCode: The postal code of the location. + /// - Parameter subdivisions: The name of the primary administrative subdivision. + /// - Parameter timeZone: The time zone of the country. + /// + public init(city: String, code: String, continentCode: String, coordinates: String, country: String, europeanUnionMember: Bool, inPrivacyRestrictedCountry: Bool, inPrivacyRestrictedRegion: Bool, postalCode: Int, subdivisions: String, timeZone: String) { + self.city = city + self.code = code + self.continentCode = continentCode + self.coordinates = coordinates + self.country = country + self.europeanUnionMember = europeanUnionMember + self.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry + self.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion + self.postalCode = postalCode + self.subdivisions = subdivisions + self.timeZone = timeZone + } + }} + +extension Operations.GetGeoDataGeoData: Codable { + enum CodingKeys: String, CodingKey { + case city + case code + case continentCode = "continent_code" + case coordinates + case country + case europeanUnionMember = "european_union_member" + case inPrivacyRestrictedCountry = "in_privacy_restricted_country" + case inPrivacyRestrictedRegion = "in_privacy_restricted_region" + case postalCode = "postal_code" + case subdivisions + case timeZone = "time_zone" + } +} + diff --git a/Sources/Plexswift/models/operations/GetGeoDataPlexErrors.swift b/Sources/Plexswift/models/operations/GetGeoDataPlexErrors.swift new file mode 100644 index 0000000..fd74d90 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGeoDataPlexErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetGeoDataPlexErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetGeoDataPlexErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetGeoDataResponse.swift b/Sources/Plexswift/models/operations/GetGeoDataResponse.swift new file mode 100644 index 0000000..44eb273 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGeoDataResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetGeoDataResponse { + case empty + case badRequest(Operations.GetGeoDataBadRequest) + case geoData(Operations.GetGeoDataGeoData) + case unauthorized(Operations.GetGeoDataUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetGeoDataBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func geoData() throws -> Operations.GetGeoDataGeoData { + guard case .geoData(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetGeoDataUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/DeletePlaylistResponseBody.swift b/Sources/Plexswift/models/operations/GetGeoDataUnauthorized.swift similarity index 52% rename from Sources/Plexswift/models/operations/DeletePlaylistResponseBody.swift rename to Sources/Plexswift/models/operations/GetGeoDataUnauthorized.swift index 585ea7d..1480057 100644 --- a/Sources/Plexswift/models/operations/DeletePlaylistResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetGeoDataUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct DeletePlaylistResponseBody { - public let errors: [Operations.DeletePlaylistErrors]? + public struct GetGeoDataUnauthorized { + public let errors: [Operations.GetGeoDataPlexErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.DeletePlaylistErrors]? = nil) { + public init(errors: [Operations.GetGeoDataPlexErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.DeletePlaylistResponseBody: Codable { +extension Operations.GetGeoDataUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsBadRequest.swift b/Sources/Plexswift/models/operations/GetGlobalHubsBadRequest.swift new file mode 100644 index 0000000..6a7e7f0 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGlobalHubsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetGlobalHubsBadRequest { + public let errors: [Operations.GetGlobalHubsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetGlobalHubsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetGlobalHubsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsErrors.swift b/Sources/Plexswift/models/operations/GetGlobalHubsErrors.swift index cca3898..5dd74eb 100644 --- a/Sources/Plexswift/models/operations/GetGlobalHubsErrors.swift +++ b/Sources/Plexswift/models/operations/GetGlobalHubsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetGlobalHubsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetGlobalHubsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetGlobalHubsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetGlobalHubsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsHubsErrors.swift b/Sources/Plexswift/models/operations/GetGlobalHubsHubsErrors.swift new file mode 100644 index 0000000..c675274 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetGlobalHubsHubsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetGlobalHubsHubsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetGlobalHubsHubsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsHubsResponseBody.swift b/Sources/Plexswift/models/operations/GetGlobalHubsHubsResponseBody.swift deleted file mode 100644 index f13246c..0000000 --- a/Sources/Plexswift/models/operations/GetGlobalHubsHubsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetGlobalHubsHubsResponseBody { - public let errors: [Operations.GetGlobalHubsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetGlobalHubsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetGlobalHubsHubsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsMediaContainer.swift b/Sources/Plexswift/models/operations/GetGlobalHubsMediaContainer.swift index 5ac33b0..dda5d7d 100644 --- a/Sources/Plexswift/models/operations/GetGlobalHubsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetGlobalHubsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,8 +19,7 @@ extension Operations { self.identifier = identifier self.size = size } - } -} + }} extension Operations.GetGlobalHubsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsMetadata.swift b/Sources/Plexswift/models/operations/GetGlobalHubsMetadata.swift index e571262..61e136f 100644 --- a/Sources/Plexswift/models/operations/GetGlobalHubsMetadata.swift +++ b/Sources/Plexswift/models/operations/GetGlobalHubsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -45,8 +45,7 @@ extension Operations { self.updatedAt = updatedAt self.viewCount = viewCount } - } -} + }} extension Operations.GetGlobalHubsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsRequest.swift b/Sources/Plexswift/models/operations/GetGlobalHubsRequest.swift index 949ca40..2dc3110 100644 --- a/Sources/Plexswift/models/operations/GetGlobalHubsRequest.swift +++ b/Sources/Plexswift/models/operations/GetGlobalHubsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -20,8 +20,7 @@ extension Operations { self._count = DecimalSerialized(wrappedValue: count) self.onlyTransient = onlyTransient } - } -} + }} extension Operations.GetGlobalHubsRequest { var countWrapper: DecimalSerialized { return _count diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsResponse.swift b/Sources/Plexswift/models/operations/GetGlobalHubsResponse.swift index 41707b4..f74cbb9 100644 --- a/Sources/Plexswift/models/operations/GetGlobalHubsResponse.swift +++ b/Sources/Plexswift/models/operations/GetGlobalHubsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetGlobalHubsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetGlobalHubsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetGlobalHubsHubsResponseBody) + case badRequest(Operations.GetGlobalHubsBadRequest) + case object(Operations.GetGlobalHubsResponseBody) + case unauthorized(Operations.GetGlobalHubsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetGlobalHubsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetGlobalHubsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetGlobalHubsHubsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetGlobalHubsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetGlobalHubsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetGlobalHubsResponseBody.swift b/Sources/Plexswift/models/operations/GetGlobalHubsResponseBody.swift index b1805c5..86aa26c 100644 --- a/Sources/Plexswift/models/operations/GetGlobalHubsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetGlobalHubsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetGlobalHubsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetGlobalHubsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTransientTokenResponseBody.swift b/Sources/Plexswift/models/operations/GetGlobalHubsUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/GetTransientTokenResponseBody.swift rename to Sources/Plexswift/models/operations/GetGlobalHubsUnauthorized.swift index ac7797b..b68e71b 100644 --- a/Sources/Plexswift/models/operations/GetTransientTokenResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetGlobalHubsUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetTransientTokenResponseBody { - public let errors: [Operations.GetTransientTokenErrors]? + public struct GetGlobalHubsUnauthorized { + public let errors: [Operations.GetGlobalHubsHubsErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetTransientTokenErrors]? = nil) { + public init(errors: [Operations.GetGlobalHubsHubsErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetTransientTokenResponseBody: Codable { +extension Operations.GetGlobalHubsUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetHomeDataBadRequest.swift b/Sources/Plexswift/models/operations/GetHomeDataBadRequest.swift new file mode 100644 index 0000000..48cee78 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetHomeDataBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetHomeDataBadRequest { + public let errors: [Operations.GetHomeDataErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetHomeDataErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetHomeDataBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetHomeDataErrors.swift b/Sources/Plexswift/models/operations/GetHomeDataErrors.swift index ef32a63..7efb286 100644 --- a/Sources/Plexswift/models/operations/GetHomeDataErrors.swift +++ b/Sources/Plexswift/models/operations/GetHomeDataErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetHomeDataErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetHomeDataErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetHomeDataErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetHomeDataErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetHomeDataPlexErrors.swift b/Sources/Plexswift/models/operations/GetHomeDataPlexErrors.swift new file mode 100644 index 0000000..d718826 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetHomeDataPlexErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetHomeDataPlexErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetHomeDataPlexErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetHomeDataPlexResponseBody.swift b/Sources/Plexswift/models/operations/GetHomeDataPlexResponseBody.swift deleted file mode 100644 index 51518bf..0000000 --- a/Sources/Plexswift/models/operations/GetHomeDataPlexResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetHomeDataPlexResponseBody { - public let errors: [Operations.GetHomeDataErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetHomeDataErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetHomeDataPlexResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetHomeDataResponse.swift b/Sources/Plexswift/models/operations/GetHomeDataResponse.swift index 304860f..ba25cc4 100644 --- a/Sources/Plexswift/models/operations/GetHomeDataResponse.swift +++ b/Sources/Plexswift/models/operations/GetHomeDataResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetHomeDataResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetHomeDataResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetHomeDataPlexResponseBody) + case badRequest(Operations.GetHomeDataBadRequest) + case object(Operations.GetHomeDataResponseBody) + case unauthorized(Operations.GetHomeDataUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetHomeDataResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetHomeDataBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetHomeDataPlexResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetHomeDataResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetHomeDataUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetHomeDataResponseBody.swift b/Sources/Plexswift/models/operations/GetHomeDataResponseBody.swift index 0b3df3a..a683bda 100644 --- a/Sources/Plexswift/models/operations/GetHomeDataResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetHomeDataResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self.name = name self.subscription = subscription } - } -} + }} extension Operations.GetHomeDataResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/CheckForUpdatesResponseBody.swift b/Sources/Plexswift/models/operations/GetHomeDataUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/CheckForUpdatesResponseBody.swift rename to Sources/Plexswift/models/operations/GetHomeDataUnauthorized.swift index 7d7076e..c545cf7 100644 --- a/Sources/Plexswift/models/operations/CheckForUpdatesResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetHomeDataUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct CheckForUpdatesResponseBody { - public let errors: [Operations.CheckForUpdatesErrors]? + public struct GetHomeDataUnauthorized { + public let errors: [Operations.GetHomeDataPlexErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.CheckForUpdatesErrors]? = nil) { + public init(errors: [Operations.GetHomeDataPlexErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.CheckForUpdatesResponseBody: Codable { +extension Operations.GetHomeDataUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetLibrariesErrors.swift b/Sources/Plexswift/models/operations/GetLibrariesErrors.swift deleted file mode 100644 index 8a3e157..0000000 --- a/Sources/Plexswift/models/operations/GetLibrariesErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetLibrariesErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.GetLibrariesErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.GetLibrariesErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetLibrariesLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetLibrariesLibraryResponseBody.swift deleted file mode 100644 index 66f72e6..0000000 --- a/Sources/Plexswift/models/operations/GetLibrariesLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetLibrariesLibraryResponseBody { - public let errors: [Operations.GetLibrariesErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetLibrariesErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetLibrariesLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetLibrariesLocation.swift b/Sources/Plexswift/models/operations/GetLibrariesLocation.swift deleted file mode 100644 index 3da9161..0000000 --- a/Sources/Plexswift/models/operations/GetLibrariesLocation.swift +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetLibrariesLocation { - public let id: Int? - public let path: String? - - /// Creates an object with the specified parameters - /// - /// - public init(id: Int? = nil, path: String? = nil) { - self.id = id - self.path = path - } - } -} - -extension Operations.GetLibrariesLocation: Codable { - enum CodingKeys: String, CodingKey { - case id - case path - } -} - diff --git a/Sources/Plexswift/models/operations/GetLibrariesMediaContainer.swift b/Sources/Plexswift/models/operations/GetLibrariesMediaContainer.swift deleted file mode 100644 index 4cf99e5..0000000 --- a/Sources/Plexswift/models/operations/GetLibrariesMediaContainer.swift +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetLibrariesMediaContainer { - public let allowSync: Bool? - public let directory: [Operations.GetLibrariesDirectory]? - public let size: Int? - public let title1: String? - - /// Creates an object with the specified parameters - /// - /// - public init(allowSync: Bool? = nil, directory: [Operations.GetLibrariesDirectory]? = nil, size: Int? = nil, title1: String? = nil) { - self.allowSync = allowSync - self.directory = directory - self.size = size - self.title1 = title1 - } - } -} - -extension Operations.GetLibrariesMediaContainer: Codable { - enum CodingKeys: String, CodingKey { - case allowSync - case directory = "Directory" - case size - case title1 - } -} - diff --git a/Sources/Plexswift/models/operations/GetLibrariesResponse.swift b/Sources/Plexswift/models/operations/GetLibrariesResponse.swift deleted file mode 100644 index a8679c3..0000000 --- a/Sources/Plexswift/models/operations/GetLibrariesResponse.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A response model - public enum GetLibrariesResponse { - case empty - case twoHundredApplicationJsonObject(Operations.GetLibrariesResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetLibrariesLibraryResponseBody) - - var isEmpty: Bool { - if case .empty = self { - return true - } else { - return false - } - } - - public func twoHundredApplicationJsonObject() throws -> Operations.GetLibrariesResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetLibrariesLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - } -} diff --git a/Sources/Plexswift/models/operations/GetLibrariesResponseBody.swift b/Sources/Plexswift/models/operations/GetLibrariesResponseBody.swift deleted file mode 100644 index 73fde21..0000000 --- a/Sources/Plexswift/models/operations/GetLibrariesResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// The libraries available on the Server - public struct GetLibrariesResponseBody { - public let mediaContainer: Operations.GetLibrariesMediaContainer? - - /// Creates an object with the specified parameters - /// - /// - public init(mediaContainer: Operations.GetLibrariesMediaContainer? = nil) { - self.mediaContainer = mediaContainer - } - } -} - -extension Operations.GetLibrariesResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case mediaContainer = "MediaContainer" - } -} - diff --git a/Sources/Plexswift/models/operations/GetLibraryDetailsBadRequest.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsBadRequest.swift new file mode 100644 index 0000000..175bb21 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetLibraryDetailsBadRequest { + public let errors: [Operations.GetLibraryDetailsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetLibraryDetailsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetLibraryDetailsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryDirectory.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsDirectory.swift similarity index 81% rename from Sources/Plexswift/models/operations/GetLibraryDirectory.swift rename to Sources/Plexswift/models/operations/GetLibraryDetailsDirectory.swift index 9e0b9c9..fa66939 100644 --- a/Sources/Plexswift/models/operations/GetLibraryDirectory.swift +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsDirectory.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetLibraryDirectory { + public struct GetLibraryDetailsDirectory { public let key: String? public let prompt: String? public let search: Bool? @@ -21,10 +21,9 @@ extension Operations { self.secondary = secondary self.title = title } - } -} + }} -extension Operations.GetLibraryDirectory: Codable { +extension Operations.GetLibraryDetailsDirectory: Codable { enum CodingKeys: String, CodingKey { case key case prompt diff --git a/Sources/Plexswift/models/operations/GetLibraryDetailsErrors.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsErrors.swift new file mode 100644 index 0000000..5e70ab4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetLibraryDetailsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetLibraryDetailsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryFilter.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsFilter.swift similarity index 81% rename from Sources/Plexswift/models/operations/GetLibraryFilter.swift rename to Sources/Plexswift/models/operations/GetLibraryDetailsFilter.swift index b9081e8..55d2ede 100644 --- a/Sources/Plexswift/models/operations/GetLibraryFilter.swift +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsFilter.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetLibraryFilter { + public struct GetLibraryDetailsFilter { public let filter: String? public let filterType: String? public let key: String? @@ -21,10 +21,9 @@ extension Operations { self.title = title self.type = type } - } -} + }} -extension Operations.GetLibraryFilter: Codable { +extension Operations.GetLibraryDetailsFilter: Codable { enum CodingKeys: String, CodingKey { case filter case filterType diff --git a/Sources/Plexswift/models/operations/GetLibraryDetailsLibraryErrors.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsLibraryErrors.swift new file mode 100644 index 0000000..9acc40e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetLibraryDetailsLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetLibraryDetailsLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryMediaContainer.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsMediaContainer.swift similarity index 70% rename from Sources/Plexswift/models/operations/GetLibraryMediaContainer.swift rename to Sources/Plexswift/models/operations/GetLibraryDetailsMediaContainer.swift index f2d6383..a8f6e8b 100644 --- a/Sources/Plexswift/models/operations/GetLibraryMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsMediaContainer.swift @@ -1,14 +1,14 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetLibraryMediaContainer { + public struct GetLibraryDetailsMediaContainer { public let allowSync: Bool? public let art: String? public let content: String? - public let directory: [Operations.GetLibraryDirectory]? + public let directory: [Operations.GetLibraryDetailsDirectory]? public let fieldType: [Operations.FieldType]? public let identifier: String? public let librarySectionID: Int? @@ -17,14 +17,14 @@ extension Operations { public let size: Int? public let thumb: String? public let title1: String? - public let type: [Operations.GetLibraryType]? + public let type: [Operations.GetLibraryDetailsType]? public let viewGroup: String? public let viewMode: Int? /// Creates an object with the specified parameters /// /// - public init(allowSync: Bool? = nil, art: String? = nil, content: String? = nil, directory: [Operations.GetLibraryDirectory]? = nil, fieldType: [Operations.FieldType]? = nil, identifier: String? = nil, librarySectionID: Int? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, size: Int? = nil, thumb: String? = nil, title1: String? = nil, type: [Operations.GetLibraryType]? = nil, viewGroup: String? = nil, viewMode: Int? = nil) { + public init(allowSync: Bool? = nil, art: String? = nil, content: String? = nil, directory: [Operations.GetLibraryDetailsDirectory]? = nil, fieldType: [Operations.FieldType]? = nil, identifier: String? = nil, librarySectionID: Int? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, size: Int? = nil, thumb: String? = nil, title1: String? = nil, type: [Operations.GetLibraryDetailsType]? = nil, viewGroup: String? = nil, viewMode: Int? = nil) { self.allowSync = allowSync self.art = art self.content = content @@ -41,10 +41,9 @@ extension Operations { self.viewGroup = viewGroup self.viewMode = viewMode } - } -} + }} -extension Operations.GetLibraryMediaContainer: Codable { +extension Operations.GetLibraryDetailsMediaContainer: Codable { enum CodingKeys: String, CodingKey { case allowSync case art diff --git a/Sources/Plexswift/models/operations/GetLibraryRequest.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsRequest.swift similarity index 54% rename from Sources/Plexswift/models/operations/GetLibraryRequest.swift rename to Sources/Plexswift/models/operations/GetLibraryDetailsRequest.swift index 2f33d5c..79ae536 100644 --- a/Sources/Plexswift/models/operations/GetLibraryRequest.swift +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsRequest.swift @@ -1,13 +1,14 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetLibraryRequest: APIValue { - /// the Id of the library to query - @DecimalSerialized - public private(set) var sectionId: Double + public struct GetLibraryDetailsRequest: APIValue { + /// The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + public let sectionKey: Int /// 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. /// @@ -15,19 +16,15 @@ extension Operations { /// Creates an object with the specified parameters /// - /// - Parameter sectionId: the Id of the library to query + /// - Parameter sectionKey: The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// /// - Parameter 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 init(sectionId: Double, includeDetails: Operations.IncludeDetails? = nil) { - self._sectionId = DecimalSerialized(wrappedValue: sectionId) + public init(sectionKey: Int, includeDetails: Operations.IncludeDetails? = nil) { + self.sectionKey = sectionKey self.includeDetails = includeDetails } - } -} -extension Operations.GetLibraryRequest { - var sectionIdWrapper: DecimalSerialized { - return _sectionId - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetLibraryDetailsResponse.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsResponse.swift new file mode 100644 index 0000000..9f5e930 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetLibraryDetailsResponse { + case empty + case badRequest(Operations.GetLibraryDetailsBadRequest) + case object(Operations.GetLibraryDetailsResponseBody) + case unauthorized(Operations.GetLibraryDetailsUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetLibraryDetailsBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetLibraryDetailsResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetLibraryDetailsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetLibraryDetailsResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsResponseBody.swift new file mode 100644 index 0000000..fe3ab73 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsResponseBody.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The details of the library + public struct GetLibraryDetailsResponseBody { + public let mediaContainer: Operations.GetLibraryDetailsMediaContainer? + + /// Creates an object with the specified parameters + /// + /// + public init(mediaContainer: Operations.GetLibraryDetailsMediaContainer? = nil) { + self.mediaContainer = mediaContainer + } + }} + +extension Operations.GetLibraryDetailsResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case mediaContainer = "MediaContainer" + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryType.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsType.swift similarity index 68% rename from Sources/Plexswift/models/operations/GetLibraryType.swift rename to Sources/Plexswift/models/operations/GetLibraryDetailsType.swift index 5470ead..b7847d2 100644 --- a/Sources/Plexswift/models/operations/GetLibraryType.swift +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsType.swift @@ -1,13 +1,13 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetLibraryType { + public struct GetLibraryDetailsType { public let active: Bool? public let field: [Operations.Field]? - public let filter: [Operations.GetLibraryFilter]? + public let filter: [Operations.GetLibraryDetailsFilter]? public let key: String? public let sort: [Operations.Sort]? public let title: String? @@ -16,7 +16,7 @@ extension Operations { /// Creates an object with the specified parameters /// /// - public init(active: Bool? = nil, field: [Operations.Field]? = nil, filter: [Operations.GetLibraryFilter]? = nil, key: String? = nil, sort: [Operations.Sort]? = nil, title: String? = nil, type: String? = nil) { + public init(active: Bool? = nil, field: [Operations.Field]? = nil, filter: [Operations.GetLibraryDetailsFilter]? = nil, key: String? = nil, sort: [Operations.Sort]? = nil, title: String? = nil, type: String? = nil) { self.active = active self.field = field self.filter = filter @@ -25,10 +25,9 @@ extension Operations { self.title = title self.type = type } - } -} + }} -extension Operations.GetLibraryType: Codable { +extension Operations.GetLibraryDetailsType: Codable { enum CodingKeys: String, CodingKey { case active case field = "Field" diff --git a/Sources/Plexswift/models/operations/GetLibraryDetailsUnauthorized.swift b/Sources/Plexswift/models/operations/GetLibraryDetailsUnauthorized.swift new file mode 100644 index 0000000..50e9ffd --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryDetailsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetLibraryDetailsUnauthorized { + public let errors: [Operations.GetLibraryDetailsLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetLibraryDetailsLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetLibraryDetailsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryErrors.swift b/Sources/Plexswift/models/operations/GetLibraryErrors.swift deleted file mode 100644 index 4149c36..0000000 --- a/Sources/Plexswift/models/operations/GetLibraryErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetLibraryErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.GetLibraryErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.GetLibraryErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsBadRequest.swift b/Sources/Plexswift/models/operations/GetLibraryHubsBadRequest.swift new file mode 100644 index 0000000..a7a765e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryHubsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetLibraryHubsBadRequest { + public let errors: [Operations.GetLibraryHubsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetLibraryHubsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetLibraryHubsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsCountry.swift b/Sources/Plexswift/models/operations/GetLibraryHubsCountry.swift index b68faf5..225e0b3 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsCountry.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsCountry.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryHubsCountry: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsDirector.swift b/Sources/Plexswift/models/operations/GetLibraryHubsDirector.swift index 19d8fa8..29beb6e 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsDirector.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsDirector.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryHubsDirector: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsErrors.swift b/Sources/Plexswift/models/operations/GetLibraryHubsErrors.swift index e8e6bd2..c5da6a6 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsErrors.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetLibraryHubsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetLibraryHubsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetLibraryHubsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetLibraryHubsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsGenre.swift b/Sources/Plexswift/models/operations/GetLibraryHubsGenre.swift index 255db54..6281302 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsGenre.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsGenre.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryHubsGenre: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsHub.swift b/Sources/Plexswift/models/operations/GetLibraryHubsHub.swift index 7d69992..000cc52 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsHub.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsHub.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -35,8 +35,7 @@ extension Operations { self.title = title self.type = type } - } -} + }} extension Operations.GetLibraryHubsHub: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsHubsErrors.swift b/Sources/Plexswift/models/operations/GetLibraryHubsHubsErrors.swift new file mode 100644 index 0000000..c8e9589 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryHubsHubsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetLibraryHubsHubsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetLibraryHubsHubsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsHubsResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryHubsHubsResponseBody.swift deleted file mode 100644 index 6d29527..0000000 --- a/Sources/Plexswift/models/operations/GetLibraryHubsHubsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetLibraryHubsHubsResponseBody { - public let errors: [Operations.GetLibraryHubsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetLibraryHubsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetLibraryHubsHubsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift b/Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift index d9408b1..792f6b0 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -46,8 +46,7 @@ extension Operations { self.videoResolution = videoResolution self.width = width } - } -} + }} extension Operations.GetLibraryHubsMedia: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsMediaContainer.swift b/Sources/Plexswift/models/operations/GetLibraryHubsMediaContainer.swift index 5fb3b88..0cda407 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self.librarySectionUUID = librarySectionUUID self.size = size } - } -} + }} extension Operations.GetLibraryHubsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift b/Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift index e510a0f..8e43e90 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -82,8 +82,7 @@ extension Operations { self.writer = writer self.year = year } - } -} + }} extension Operations.GetLibraryHubsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsPart.swift b/Sources/Plexswift/models/operations/GetLibraryHubsPart.swift index 56f873d..932ce64 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsPart.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsPart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -31,8 +31,7 @@ extension Operations { self.size = size self.videoProfile = videoProfile } - } -} + }} extension Operations.GetLibraryHubsPart: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsRequest.swift b/Sources/Plexswift/models/operations/GetLibraryHubsRequest.swift index e6955c9..08f0ad3 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsRequest.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self._count = DecimalSerialized(wrappedValue: count) self.onlyTransient = onlyTransient } - } -} + }} extension Operations.GetLibraryHubsRequest { var sectionIdWrapper: DecimalSerialized { return _sectionId diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsResponse.swift b/Sources/Plexswift/models/operations/GetLibraryHubsResponse.swift index 9ecec6d..48f6bd1 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsResponse.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetLibraryHubsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetLibraryHubsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetLibraryHubsHubsResponseBody) + case badRequest(Operations.GetLibraryHubsBadRequest) + case object(Operations.GetLibraryHubsResponseBody) + case unauthorized(Operations.GetLibraryHubsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetLibraryHubsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetLibraryHubsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetLibraryHubsHubsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetLibraryHubsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetLibraryHubsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryHubsResponseBody.swift index 43c45f5..312a3de 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetLibraryHubsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetLibraryHubsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsRole.swift b/Sources/Plexswift/models/operations/GetLibraryHubsRole.swift index e15f574..b81898b 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsRole.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsRole.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryHubsRole: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/UpdatePlayProgressResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryHubsUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/UpdatePlayProgressResponseBody.swift rename to Sources/Plexswift/models/operations/GetLibraryHubsUnauthorized.swift index ef1b6d6..114404d 100644 --- a/Sources/Plexswift/models/operations/UpdatePlayProgressResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct UpdatePlayProgressResponseBody { - public let errors: [Operations.UpdatePlayProgressErrors]? + public struct GetLibraryHubsUnauthorized { + public let errors: [Operations.GetLibraryHubsHubsErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.UpdatePlayProgressErrors]? = nil) { + public init(errors: [Operations.GetLibraryHubsHubsErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.UpdatePlayProgressResponseBody: Codable { +extension Operations.GetLibraryHubsUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetLibraryHubsWriter.swift b/Sources/Plexswift/models/operations/GetLibraryHubsWriter.swift index 8807ba0..474fbdf 100644 --- a/Sources/Plexswift/models/operations/GetLibraryHubsWriter.swift +++ b/Sources/Plexswift/models/operations/GetLibraryHubsWriter.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryHubsWriter: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsBadRequest.swift b/Sources/Plexswift/models/operations/GetLibraryItemsBadRequest.swift new file mode 100644 index 0000000..6a419a2 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryItemsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetLibraryItemsBadRequest { + public let errors: [Operations.GetLibraryItemsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetLibraryItemsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetLibraryItemsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsCountry.swift b/Sources/Plexswift/models/operations/GetLibraryItemsCountry.swift index e64a8c2..621c7d6 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsCountry.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsCountry.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryItemsCountry: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsDirector.swift b/Sources/Plexswift/models/operations/GetLibraryItemsDirector.swift index 918baff..00fffbb 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsDirector.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsDirector.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryItemsDirector: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsErrors.swift b/Sources/Plexswift/models/operations/GetLibraryItemsErrors.swift index f963dd7..157256b 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsErrors.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetLibraryItemsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetLibraryItemsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetLibraryItemsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetLibraryItemsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsGenre.swift b/Sources/Plexswift/models/operations/GetLibraryItemsGenre.swift index 6b721eb..794c3e8 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsGenre.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsGenre.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryItemsGenre: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsLibraryErrors.swift b/Sources/Plexswift/models/operations/GetLibraryItemsLibraryErrors.swift new file mode 100644 index 0000000..a0e4f53 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetLibraryItemsLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetLibraryItemsLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetLibraryItemsLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryItemsLibraryResponseBody.swift deleted file mode 100644 index 1df251b..0000000 --- a/Sources/Plexswift/models/operations/GetLibraryItemsLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetLibraryItemsLibraryResponseBody { - public let errors: [Operations.GetLibraryItemsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetLibraryItemsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetLibraryItemsLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsMedia.swift b/Sources/Plexswift/models/operations/GetLibraryItemsMedia.swift index d93f1ef..b15b2a8 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsMedia.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -40,8 +40,7 @@ extension Operations { self.videoResolution = videoResolution self.width = width } - } -} + }} extension Operations.GetLibraryItemsMedia: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsMediaContainer.swift b/Sources/Plexswift/models/operations/GetLibraryItemsMediaContainer.swift index f1c6e5f..db09bbf 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -43,8 +43,7 @@ extension Operations { self.viewGroup = viewGroup self.viewMode = viewMode } - } -} + }} extension Operations.GetLibraryItemsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsMetadata.swift b/Sources/Plexswift/models/operations/GetLibraryItemsMetadata.swift index 8715075..a4079c9 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsMetadata.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -128,8 +128,7 @@ extension Operations { self.writer = writer self.year = year } - } -} + }} extension Operations.GetLibraryItemsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsPart.swift b/Sources/Plexswift/models/operations/GetLibraryItemsPart.swift index d6a96ce..f20683f 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsPart.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsPart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self.size = size self.videoProfile = videoProfile } - } -} + }} extension Operations.GetLibraryItemsPart: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift b/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift index c7b59e9..09a19b3 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsRequest.swift @@ -1,29 +1,74 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetLibraryItemsRequest: APIValue { - /// the Id of the library to query - public let sectionId: AnyValue + /// The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + public let sectionKey: Int /// A key representing a specific tag within the section. public let tag: Operations.Tag + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public let type: Operations.TypeModel /// Adds the Guids object to the response /// - public let includeGuids: Int? + public let includeGuids: Operations.IncludeGuids? + /// Adds the Meta object to the response + /// + public let includeMeta: Operations.IncludeMeta? + /// The number of items to return. If not specified, all items will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 50 + /// + public let xPlexContainerSize: Int? + /// The index of the first item to return. If not specified, the first item will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 0 + /// + public let xPlexContainerStart: Int? /// Creates an object with the specified parameters /// - /// - Parameter sectionId: the Id of the library to query + /// - Parameter sectionKey: The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// /// - Parameter tag: A key representing a specific tag within the section. + /// - Parameter type: The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// /// - Parameter includeGuids: Adds the Guids object to the response /// + /// - Parameter includeMeta: Adds the Meta object to the response + /// + /// - Parameter xPlexContainerSize: The number of items to return. If not specified, all items will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 50 + /// + /// - Parameter xPlexContainerStart: The index of the first item to return. If not specified, the first item will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 0 + /// /// - public init(sectionId: AnyValue, tag: Operations.Tag, includeGuids: Int? = nil) { - self.sectionId = sectionId + public init(sectionKey: Int, tag: Operations.Tag, type: Operations.TypeModel, includeGuids: Operations.IncludeGuids? = nil, includeMeta: Operations.IncludeMeta? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) { + self.sectionKey = sectionKey self.tag = tag + self.type = type self.includeGuids = includeGuids + self.includeMeta = includeMeta + self.xPlexContainerSize = xPlexContainerSize + self.xPlexContainerStart = xPlexContainerStart } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsResponse.swift b/Sources/Plexswift/models/operations/GetLibraryItemsResponse.swift index 8c9bdcf..3bde2be 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsResponse.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetLibraryItemsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetLibraryItemsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetLibraryItemsLibraryResponseBody) + case badRequest(Operations.GetLibraryItemsBadRequest) + case object(Operations.GetLibraryItemsResponseBody) + case unauthorized(Operations.GetLibraryItemsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetLibraryItemsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetLibraryItemsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetLibraryItemsLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetLibraryItemsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetLibraryItemsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryItemsResponseBody.swift index 9442744..6ceb245 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetLibraryItemsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetLibraryItemsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsRole.swift b/Sources/Plexswift/models/operations/GetLibraryItemsRole.swift index c99840b..ac8023c 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsRole.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsRole.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryItemsRole: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryItemsUnauthorized.swift similarity index 50% rename from Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsResponseBody.swift rename to Sources/Plexswift/models/operations/GetLibraryItemsUnauthorized.swift index 1102d83..a45e8c9 100644 --- a/Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetResourcesStatisticsStatisticsResponseBody { - public let errors: [Operations.GetResourcesStatisticsErrors]? + public struct GetLibraryItemsUnauthorized { + public let errors: [Operations.GetLibraryItemsLibraryErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetResourcesStatisticsErrors]? = nil) { + public init(errors: [Operations.GetLibraryItemsLibraryErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetResourcesStatisticsStatisticsResponseBody: Codable { +extension Operations.GetLibraryItemsUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift b/Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift index 4125cea..259a6f9 100644 --- a/Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift +++ b/Sources/Plexswift/models/operations/GetLibraryItemsWriter.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetLibraryItemsWriter: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetLibraryLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryLibraryResponseBody.swift deleted file mode 100644 index ef59db6..0000000 --- a/Sources/Plexswift/models/operations/GetLibraryLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetLibraryLibraryResponseBody { - public let errors: [Operations.GetLibraryErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetLibraryErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetLibraryLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetLibraryResponse.swift b/Sources/Plexswift/models/operations/GetLibraryResponse.swift deleted file mode 100644 index 7fe3f6c..0000000 --- a/Sources/Plexswift/models/operations/GetLibraryResponse.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A response model - public enum GetLibraryResponse { - case empty - case twoHundredApplicationJsonObject(Operations.GetLibraryResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetLibraryLibraryResponseBody) - - var isEmpty: Bool { - if case .empty = self { - return true - } else { - return false - } - } - - public func twoHundredApplicationJsonObject() throws -> Operations.GetLibraryResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetLibraryLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - } -} diff --git a/Sources/Plexswift/models/operations/GetLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetLibraryResponseBody.swift deleted file mode 100644 index 0173c58..0000000 --- a/Sources/Plexswift/models/operations/GetLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// The details of the library - public struct GetLibraryResponseBody { - public let mediaContainer: Operations.GetLibraryMediaContainer? - - /// Creates an object with the specified parameters - /// - /// - public init(mediaContainer: Operations.GetLibraryMediaContainer? = nil) { - self.mediaContainer = mediaContainer - } - } -} - -extension Operations.GetLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case mediaContainer = "MediaContainer" - } -} - diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersBadRequest.swift b/Sources/Plexswift/models/operations/GetMediaProvidersBadRequest.swift new file mode 100644 index 0000000..c49ecf0 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetMediaProvidersBadRequest { + public let errors: [Operations.GetMediaProvidersErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetMediaProvidersErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMediaProvidersBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersDirectory.swift b/Sources/Plexswift/models/operations/GetMediaProvidersDirectory.swift new file mode 100644 index 0000000..2f94967 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersDirectory.swift @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaProvidersDirectory { + public let agent: String? + public let hubKey: String? + public let id: String? + public let key: String? + public let language: String? + public let pivot: [Operations.Pivot]? + public let refreshing: Bool? + public let scannedAt: Int? + public let scanner: String? + public let subtype: String? + public let title: String? + public let type: String? + public let updatedAt: Int? + public let uuid: String? + + /// Creates an object with the specified parameters + /// + /// + public init(agent: String? = nil, hubKey: String? = nil, id: String? = nil, key: String? = nil, language: String? = nil, pivot: [Operations.Pivot]? = nil, refreshing: Bool? = nil, scannedAt: Int? = nil, scanner: String? = nil, subtype: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, uuid: String? = nil) { + self.agent = agent + self.hubKey = hubKey + self.id = id + self.key = key + self.language = language + self.pivot = pivot + self.refreshing = refreshing + self.scannedAt = scannedAt + self.scanner = scanner + self.subtype = subtype + self.title = title + self.type = type + self.updatedAt = updatedAt + self.uuid = uuid + } + }} + +extension Operations.GetMediaProvidersDirectory: Codable { + enum CodingKeys: String, CodingKey { + case agent + case hubKey + case id + case key + case language + case pivot = "Pivot" + case refreshing + case scannedAt + case scanner + case subtype + case title + case type + case updatedAt + case uuid + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersErrors.swift b/Sources/Plexswift/models/operations/GetMediaProvidersErrors.swift new file mode 100644 index 0000000..583a620 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaProvidersErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMediaProvidersErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersMediaContainer.swift b/Sources/Plexswift/models/operations/GetMediaProvidersMediaContainer.swift new file mode 100644 index 0000000..ed3216c --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersMediaContainer.swift @@ -0,0 +1,152 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaProvidersMediaContainer { + public let allowCameraUpload: Bool? + public let allowChannelAccess: Bool? + public let allowSharing: Bool? + public let allowSync: Bool? + public let allowTuners: Bool? + public let backgroundProcessing: Bool? + public let certificate: Bool? + public let companionProxy: Bool? + public let countryCode: String? + public let diagnostics: String? + public let eventStream: Bool? + public let friendlyName: String? + public let livetv: Int? + public let machineIdentifier: String? + public let mediaProvider: [Operations.MediaProvider]? + public let musicAnalysis: Int? + public let myPlex: Bool? + public let myPlexMappingState: String? + public let myPlexSigninState: String? + public let myPlexSubscription: Bool? + public let myPlexUsername: String? + public let offlineTranscode: Int? + public let ownerFeatures: String? + public let platform: String? + public let platformVersion: String? + public let pluginHost: Bool? + public let pushNotifications: Bool? + public let readOnlyLibraries: Bool? + public let size: Int? + public let streamingBrainABRVersion: Int? + public let streamingBrainVersion: Int? + public let sync: Bool? + public let transcoderActiveVideoSessions: Int? + public let transcoderAudio: Bool? + public let transcoderLyrics: Bool? + public let transcoderSubtitles: Bool? + public let transcoderVideo: Bool? + public let transcoderVideoBitrates: String? + public let transcoderVideoQualities: String? + public let transcoderVideoResolutions: String? + public let updatedAt: Int? + public let updater: Bool? + public let version: String? + public let voiceSearch: Bool? + + /// Creates an object with the specified parameters + /// + /// + public init(allowCameraUpload: Bool? = nil, allowChannelAccess: Bool? = nil, allowSharing: Bool? = nil, allowSync: Bool? = nil, allowTuners: Bool? = nil, backgroundProcessing: Bool? = nil, certificate: Bool? = nil, companionProxy: Bool? = nil, countryCode: String? = nil, diagnostics: String? = nil, eventStream: Bool? = nil, friendlyName: String? = nil, livetv: Int? = nil, machineIdentifier: String? = nil, mediaProvider: [Operations.MediaProvider]? = nil, musicAnalysis: Int? = nil, myPlex: Bool? = nil, myPlexMappingState: String? = nil, myPlexSigninState: String? = nil, myPlexSubscription: Bool? = nil, myPlexUsername: String? = nil, offlineTranscode: Int? = nil, ownerFeatures: String? = nil, platform: String? = nil, platformVersion: String? = nil, pluginHost: Bool? = nil, pushNotifications: Bool? = nil, readOnlyLibraries: Bool? = nil, size: Int? = nil, streamingBrainABRVersion: Int? = nil, streamingBrainVersion: Int? = nil, sync: Bool? = nil, transcoderActiveVideoSessions: Int? = nil, transcoderAudio: Bool? = nil, transcoderLyrics: Bool? = nil, transcoderSubtitles: Bool? = nil, transcoderVideo: Bool? = nil, transcoderVideoBitrates: String? = nil, transcoderVideoQualities: String? = nil, transcoderVideoResolutions: String? = nil, updatedAt: Int? = nil, updater: Bool? = nil, version: String? = nil, voiceSearch: Bool? = nil) { + self.allowCameraUpload = allowCameraUpload + self.allowChannelAccess = allowChannelAccess + self.allowSharing = allowSharing + self.allowSync = allowSync + self.allowTuners = allowTuners + self.backgroundProcessing = backgroundProcessing + self.certificate = certificate + self.companionProxy = companionProxy + self.countryCode = countryCode + self.diagnostics = diagnostics + self.eventStream = eventStream + self.friendlyName = friendlyName + self.livetv = livetv + self.machineIdentifier = machineIdentifier + self.mediaProvider = mediaProvider + self.musicAnalysis = musicAnalysis + self.myPlex = myPlex + self.myPlexMappingState = myPlexMappingState + self.myPlexSigninState = myPlexSigninState + self.myPlexSubscription = myPlexSubscription + self.myPlexUsername = myPlexUsername + self.offlineTranscode = offlineTranscode + self.ownerFeatures = ownerFeatures + self.platform = platform + self.platformVersion = platformVersion + self.pluginHost = pluginHost + self.pushNotifications = pushNotifications + self.readOnlyLibraries = readOnlyLibraries + self.size = size + self.streamingBrainABRVersion = streamingBrainABRVersion + self.streamingBrainVersion = streamingBrainVersion + self.sync = sync + self.transcoderActiveVideoSessions = transcoderActiveVideoSessions + self.transcoderAudio = transcoderAudio + self.transcoderLyrics = transcoderLyrics + self.transcoderSubtitles = transcoderSubtitles + self.transcoderVideo = transcoderVideo + self.transcoderVideoBitrates = transcoderVideoBitrates + self.transcoderVideoQualities = transcoderVideoQualities + self.transcoderVideoResolutions = transcoderVideoResolutions + self.updatedAt = updatedAt + self.updater = updater + self.version = version + self.voiceSearch = voiceSearch + } + }} + +extension Operations.GetMediaProvidersMediaContainer: Codable { + enum CodingKeys: String, CodingKey { + case allowCameraUpload + case allowChannelAccess + case allowSharing + case allowSync + case allowTuners + case backgroundProcessing + case certificate + case companionProxy + case countryCode + case diagnostics + case eventStream + case friendlyName + case livetv + case machineIdentifier + case mediaProvider = "MediaProvider" + case musicAnalysis + case myPlex + case myPlexMappingState + case myPlexSigninState + case myPlexSubscription + case myPlexUsername + case offlineTranscode + case ownerFeatures + case platform + case platformVersion + case pluginHost + case pushNotifications + case readOnlyLibraries + case size + case streamingBrainABRVersion + case streamingBrainVersion + case sync + case transcoderActiveVideoSessions + case transcoderAudio + case transcoderLyrics + case transcoderSubtitles + case transcoderVideo + case transcoderVideoBitrates + case transcoderVideoQualities + case transcoderVideoResolutions + case updatedAt + case updater + case version + case voiceSearch + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersRequest.swift b/Sources/Plexswift/models/operations/GetMediaProvidersRequest.swift new file mode 100644 index 0000000..d361e73 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersRequest.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaProvidersRequest: APIValue { + /// Plex Authentication Token + public let xPlexToken: String + + /// Creates an object with the specified parameters + /// + /// - Parameter xPlexToken: Plex Authentication Token + /// + public init(xPlexToken: String) { + self.xPlexToken = xPlexToken + } + }} diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersResponse.swift b/Sources/Plexswift/models/operations/GetMediaProvidersResponse.swift new file mode 100644 index 0000000..8ef8adc --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetMediaProvidersResponse { + case empty + case badRequest(Operations.GetMediaProvidersBadRequest) + case object(Operations.GetMediaProvidersResponseBody) + case unauthorized(Operations.GetMediaProvidersUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetMediaProvidersBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetMediaProvidersResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetMediaProvidersUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersResponseBody.swift b/Sources/Plexswift/models/operations/GetMediaProvidersResponseBody.swift new file mode 100644 index 0000000..b0bc686 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersResponseBody.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Media providers and their features + public struct GetMediaProvidersResponseBody { + public let mediaContainer: Operations.GetMediaProvidersMediaContainer? + + /// Creates an object with the specified parameters + /// + /// + public init(mediaContainer: Operations.GetMediaProvidersMediaContainer? = nil) { + self.mediaContainer = mediaContainer + } + }} + +extension Operations.GetMediaProvidersResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case mediaContainer = "MediaContainer" + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersServerErrors.swift b/Sources/Plexswift/models/operations/GetMediaProvidersServerErrors.swift new file mode 100644 index 0000000..c04af0a --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersServerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMediaProvidersServerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMediaProvidersServerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMediaProvidersUnauthorized.swift b/Sources/Plexswift/models/operations/GetMediaProvidersUnauthorized.swift new file mode 100644 index 0000000..075aa9e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMediaProvidersUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetMediaProvidersUnauthorized { + public let errors: [Operations.GetMediaProvidersServerErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetMediaProvidersServerErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMediaProvidersUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift new file mode 100644 index 0000000..af3c39e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetMetaDataByRatingKeyBadRequest { + public let errors: [Operations.GetMetaDataByRatingKeyErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetMetaDataByRatingKeyErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMetaDataByRatingKeyBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataCountry.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift similarity index 73% rename from Sources/Plexswift/models/operations/GetMetadataCountry.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift index aa150b2..b469589 100644 --- a/Sources/Plexswift/models/operations/GetMetadataCountry.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyCountry.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataCountry { + public struct GetMetaDataByRatingKeyCountry { public let filter: String? public let id: Int? public let tag: String? @@ -17,10 +17,9 @@ extension Operations { self.id = id self.tag = tag } - } -} + }} -extension Operations.GetMetadataCountry: Codable { +extension Operations.GetMetaDataByRatingKeyCountry: Codable { enum CodingKeys: String, CodingKey { case filter case id diff --git a/Sources/Plexswift/models/operations/GetMetadataDirector.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift similarity index 79% rename from Sources/Plexswift/models/operations/GetMetadataDirector.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift index 629e6c0..79bc25d 100644 --- a/Sources/Plexswift/models/operations/GetMetadataDirector.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyDirector.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataDirector { + public struct GetMetaDataByRatingKeyDirector { public let filter: String? public let id: Int? public let tag: String? @@ -21,10 +21,9 @@ extension Operations { self.tagKey = tagKey self.thumb = thumb } - } -} + }} -extension Operations.GetMetadataDirector: Codable { +extension Operations.GetMetaDataByRatingKeyDirector: Codable { enum CodingKeys: String, CodingKey { case filter case id diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift new file mode 100644 index 0000000..8512052 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMetaDataByRatingKeyErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMetaDataByRatingKeyErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataGenre.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift similarity index 74% rename from Sources/Plexswift/models/operations/GetMetadataGenre.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift index c1ca6c8..f0e49d4 100644 --- a/Sources/Plexswift/models/operations/GetMetadataGenre.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyGenre.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataGenre { + public struct GetMetaDataByRatingKeyGenre { public let filter: String? public let id: Int? public let tag: String? @@ -17,10 +17,9 @@ extension Operations { self.id = id self.tag = tag } - } -} + }} -extension Operations.GetMetadataGenre: Codable { +extension Operations.GetMetaDataByRatingKeyGenre: Codable { enum CodingKeys: String, CodingKey { case filter case id diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift new file mode 100644 index 0000000..5dbe457 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMetaDataByRatingKeyLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMetaDataByRatingKeyLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataMedia.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift similarity index 91% rename from Sources/Plexswift/models/operations/GetMetadataMedia.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift index 32911c7..6b83077 100644 --- a/Sources/Plexswift/models/operations/GetMetadataMedia.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMedia.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataMedia { + public struct GetMetaDataByRatingKeyMedia { @DecimalSerialized public private(set) var aspectRatio: Double? public let audioChannels: Int? @@ -17,7 +17,7 @@ extension Operations { public let height: Int? public let id: Int? public let optimizedForStreaming: Int? - public let part: [Operations.GetMetadataPart]? + public let part: [Operations.GetMetaDataByRatingKeyPart]? public let videoCodec: String? public let videoFrameRate: String? public let videoProfile: String? @@ -27,7 +27,7 @@ extension Operations { /// Creates an object with the specified parameters /// /// - public init(aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, height: Int? = nil, id: Int? = nil, optimizedForStreaming: Int? = nil, part: [Operations.GetMetadataPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) { + public init(aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, container: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, height: Int? = nil, id: Int? = nil, optimizedForStreaming: Int? = nil, part: [Operations.GetMetaDataByRatingKeyPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) { self._aspectRatio = DecimalSerialized(wrappedValue: aspectRatio) self.audioChannels = audioChannels self.audioCodec = audioCodec @@ -46,10 +46,9 @@ extension Operations { self.videoResolution = videoResolution self.width = width } - } -} + }} -extension Operations.GetMetadataMedia: Codable { +extension Operations.GetMetaDataByRatingKeyMedia: Codable { enum CodingKeys: String, CodingKey { case aspectRatio case audioChannels @@ -83,7 +82,7 @@ extension Operations.GetMetadataMedia: Codable { self.height = try container.decodeIfPresent(Int.self, forKey: .height) self.id = try container.decodeIfPresent(Int.self, forKey: .id) self.optimizedForStreaming = try container.decodeIfPresent(Int.self, forKey: .optimizedForStreaming) - self.part = try container.decodeIfPresent([Operations.GetMetadataPart].self, forKey: .part) + self.part = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyPart].self, forKey: .part) self.videoCodec = try container.decodeIfPresent(String.self, forKey: .videoCodec) self.videoFrameRate = try container.decodeIfPresent(String.self, forKey: .videoFrameRate) self.videoProfile = try container.decodeIfPresent(String.self, forKey: .videoProfile) @@ -115,7 +114,7 @@ extension Operations.GetMetadataMedia: Codable { } } -extension Operations.GetMetadataMedia { +extension Operations.GetMetaDataByRatingKeyMedia { var aspectRatioWrapper: DecimalSerialized { return _aspectRatio } diff --git a/Sources/Plexswift/models/operations/GetMetadataMediaContainer.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift similarity index 81% rename from Sources/Plexswift/models/operations/GetMetadataMediaContainer.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift index eb89d52..2963989 100644 --- a/Sources/Plexswift/models/operations/GetMetadataMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMediaContainer.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataMediaContainer { + public struct GetMetaDataByRatingKeyMediaContainer { public let allowSync: Bool? public let identifier: String? public let librarySectionID: Int? @@ -12,13 +12,13 @@ extension Operations { public let librarySectionUUID: String? public let mediaTagPrefix: String? public let mediaTagVersion: Int? - public let metadata: [Operations.GetMetadataMetadata]? + public let metadata: [Operations.GetMetaDataByRatingKeyMetadata]? public let size: Int? /// Creates an object with the specified parameters /// /// - public init(allowSync: Bool? = nil, identifier: String? = nil, librarySectionID: Int? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetMetadataMetadata]? = nil, size: Int? = nil) { + public init(allowSync: Bool? = nil, identifier: String? = nil, librarySectionID: Int? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetMetaDataByRatingKeyMetadata]? = nil, size: Int? = nil) { self.allowSync = allowSync self.identifier = identifier self.librarySectionID = librarySectionID @@ -29,10 +29,9 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} -extension Operations.GetMetadataMediaContainer: Codable { +extension Operations.GetMetaDataByRatingKeyMediaContainer: Codable { enum CodingKeys: String, CodingKey { case allowSync case identifier diff --git a/Sources/Plexswift/models/operations/GetMetadataMetadata.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift similarity index 83% rename from Sources/Plexswift/models/operations/GetMetadataMetadata.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift index 4d26a1f..7016ce4 100644 --- a/Sources/Plexswift/models/operations/GetMetadataMetadata.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyMetadata.swift @@ -1,20 +1,20 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataMetadata { + public struct GetMetaDataByRatingKeyMetadata { public let addedAt: Int? public let art: String? @DecimalSerialized public private(set) var audienceRating: Double? public let audienceRatingImage: String? public let contentRating: String? - public let country: [Operations.GetMetadataCountry]? - public let director: [Operations.GetMetadataDirector]? + public let country: [Operations.GetMetaDataByRatingKeyCountry]? + public let director: [Operations.GetMetaDataByRatingKeyDirector]? public let duration: Int? - public let genre: [Operations.GetMetadataGenre]? + public let genre: [Operations.GetMetaDataByRatingKeyGenre]? public let guid: String? public let guids: [Operations.Guids]? public let hasPremiumPrimaryExtra: String? @@ -22,7 +22,7 @@ extension Operations { public let librarySectionID: Int? public let librarySectionKey: String? public let librarySectionTitle: String? - public let media: [Operations.GetMetadataMedia]? + public let media: [Operations.GetMetaDataByRatingKeyMedia]? @DateOnly public private(set) var originallyAvailableAt: Date? public let producer: [Operations.Producer]? @@ -31,7 +31,7 @@ extension Operations { public let ratingImage: String? public let ratingKey: String? public let ratings: [Operations.Ratings]? - public let role: [Operations.GetMetadataRole]? + public let role: [Operations.GetMetaDataByRatingKeyRole]? public let studio: String? public let summary: String? public let tagline: String? @@ -39,13 +39,13 @@ extension Operations { public let title: String? public let type: String? public let updatedAt: Int? - public let writer: [Operations.GetMetadataWriter]? + public let writer: [Operations.GetMetaDataByRatingKeyWriter]? public let year: Int? /// Creates an object with the specified parameters /// /// - public init(addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, contentRating: String? = nil, country: [Operations.GetMetadataCountry]? = nil, director: [Operations.GetMetadataDirector]? = nil, duration: Int? = nil, genre: [Operations.GetMetadataGenre]? = nil, guid: String? = nil, guids: [Operations.Guids]? = nil, hasPremiumPrimaryExtra: String? = nil, key: String? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetMetadataMedia]? = nil, originallyAvailableAt: Date? = nil, producer: [Operations.Producer]? = nil, rating: Double? = nil, ratingImage: String? = nil, ratingKey: String? = nil, ratings: [Operations.Ratings]? = nil, role: [Operations.GetMetadataRole]? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, writer: [Operations.GetMetadataWriter]? = nil, year: Int? = nil) { + public init(addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, contentRating: String? = nil, country: [Operations.GetMetaDataByRatingKeyCountry]? = nil, director: [Operations.GetMetaDataByRatingKeyDirector]? = nil, duration: Int? = nil, genre: [Operations.GetMetaDataByRatingKeyGenre]? = nil, guid: String? = nil, guids: [Operations.Guids]? = nil, hasPremiumPrimaryExtra: String? = nil, key: String? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetMetaDataByRatingKeyMedia]? = nil, originallyAvailableAt: Date? = nil, producer: [Operations.Producer]? = nil, rating: Double? = nil, ratingImage: String? = nil, ratingKey: String? = nil, ratings: [Operations.Ratings]? = nil, role: [Operations.GetMetaDataByRatingKeyRole]? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, writer: [Operations.GetMetaDataByRatingKeyWriter]? = nil, year: Int? = nil) { self.addedAt = addedAt self.art = art self._audienceRating = DecimalSerialized(wrappedValue: audienceRating) @@ -80,10 +80,9 @@ extension Operations { self.writer = writer self.year = year } - } -} + }} -extension Operations.GetMetadataMetadata: Codable { +extension Operations.GetMetaDataByRatingKeyMetadata: Codable { enum CodingKeys: String, CodingKey { case addedAt case art @@ -127,10 +126,10 @@ extension Operations.GetMetadataMetadata: Codable { self._audienceRating = try container.decodeIfPresent(DecimalSerialized.self, forKey: .audienceRating) ?? DecimalSerialized(wrappedValue: nil) self.audienceRatingImage = try container.decodeIfPresent(String.self, forKey: .audienceRatingImage) self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating) - self.country = try container.decodeIfPresent([Operations.GetMetadataCountry].self, forKey: .country) - self.director = try container.decodeIfPresent([Operations.GetMetadataDirector].self, forKey: .director) + self.country = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyCountry].self, forKey: .country) + self.director = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyDirector].self, forKey: .director) self.duration = try container.decodeIfPresent(Int.self, forKey: .duration) - self.genre = try container.decodeIfPresent([Operations.GetMetadataGenre].self, forKey: .genre) + self.genre = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyGenre].self, forKey: .genre) self.guid = try container.decodeIfPresent(String.self, forKey: .guid) self.guids = try container.decodeIfPresent([Operations.Guids].self, forKey: .guids) self.hasPremiumPrimaryExtra = try container.decodeIfPresent(String.self, forKey: .hasPremiumPrimaryExtra) @@ -138,14 +137,14 @@ extension Operations.GetMetadataMetadata: Codable { self.librarySectionID = try container.decodeIfPresent(Int.self, forKey: .librarySectionID) self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey) self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle) - self.media = try container.decodeIfPresent([Operations.GetMetadataMedia].self, forKey: .media) + self.media = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyMedia].self, forKey: .media) self._originallyAvailableAt = try container.decodeIfPresent(DateOnly.self, forKey: .originallyAvailableAt) ?? DateOnly(wrappedValue: nil) self.producer = try container.decodeIfPresent([Operations.Producer].self, forKey: .producer) self._rating = try container.decodeIfPresent(DecimalSerialized.self, forKey: .rating) ?? DecimalSerialized(wrappedValue: nil) self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage) self.ratingKey = try container.decodeIfPresent(String.self, forKey: .ratingKey) self.ratings = try container.decodeIfPresent([Operations.Ratings].self, forKey: .ratings) - self.role = try container.decodeIfPresent([Operations.GetMetadataRole].self, forKey: .role) + self.role = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyRole].self, forKey: .role) self.studio = try container.decodeIfPresent(String.self, forKey: .studio) self.summary = try container.decodeIfPresent(String.self, forKey: .summary) self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline) @@ -153,7 +152,7 @@ extension Operations.GetMetadataMetadata: Codable { self.title = try container.decodeIfPresent(String.self, forKey: .title) self.type = try container.decodeIfPresent(String.self, forKey: .type) self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt) - self.writer = try container.decodeIfPresent([Operations.GetMetadataWriter].self, forKey: .writer) + self.writer = try container.decodeIfPresent([Operations.GetMetaDataByRatingKeyWriter].self, forKey: .writer) self.year = try container.decodeIfPresent(Int.self, forKey: .year) } @@ -201,7 +200,7 @@ extension Operations.GetMetadataMetadata: Codable { } } -extension Operations.GetMetadataMetadata { +extension Operations.GetMetaDataByRatingKeyMetadata { var ratingWrapper: DecimalSerialized { return _rating } diff --git a/Sources/Plexswift/models/operations/GetMetadataPart.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift similarity index 89% rename from Sources/Plexswift/models/operations/GetMetadataPart.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift index 2480d57..2949e42 100644 --- a/Sources/Plexswift/models/operations/GetMetadataPart.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyPart.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataPart { + public struct GetMetaDataByRatingKeyPart { public let audioProfile: String? public let container: String? public let duration: Int? @@ -33,10 +33,9 @@ extension Operations { self.stream = stream self.videoProfile = videoProfile } - } -} + }} -extension Operations.GetMetadataPart: Codable { +extension Operations.GetMetaDataByRatingKeyPart: Codable { enum CodingKeys: String, CodingKey { case audioProfile case container diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift new file mode 100644 index 0000000..8631b29 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRequest.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMetaDataByRatingKeyRequest: APIValue { + /// the id of the library item to return the children of. + public let ratingKey: Int + + /// Creates an object with the specified parameters + /// + /// - Parameter ratingKey: the id of the library item to return the children of. + /// + public init(ratingKey: Int) { + self.ratingKey = ratingKey + } + }} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift new file mode 100644 index 0000000..18610ba --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetMetaDataByRatingKeyResponse { + case empty + case badRequest(Operations.GetMetaDataByRatingKeyBadRequest) + case object(Operations.GetMetaDataByRatingKeyResponseBody) + case unauthorized(Operations.GetMetaDataByRatingKeyUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetMetaDataByRatingKeyBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetMetaDataByRatingKeyResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetMetaDataByRatingKeyUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift new file mode 100644 index 0000000..b51ec28 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyResponseBody.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The metadata of the library item. + public struct GetMetaDataByRatingKeyResponseBody { + public let mediaContainer: Operations.GetMetaDataByRatingKeyMediaContainer? + + /// Creates an object with the specified parameters + /// + /// + public init(mediaContainer: Operations.GetMetaDataByRatingKeyMediaContainer? = nil) { + self.mediaContainer = mediaContainer + } + }} + +extension Operations.GetMetaDataByRatingKeyResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case mediaContainer = "MediaContainer" + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataRole.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift similarity index 82% rename from Sources/Plexswift/models/operations/GetMetadataRole.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift index 43582e3..bdd612a 100644 --- a/Sources/Plexswift/models/operations/GetMetadataRole.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyRole.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataRole { + public struct GetMetaDataByRatingKeyRole { public let filter: String? public let id: Int? public let role: String? @@ -23,10 +23,9 @@ extension Operations { self.tagKey = tagKey self.thumb = thumb } - } -} + }} -extension Operations.GetMetadataRole: Codable { +extension Operations.GetMetaDataByRatingKeyRole: Codable { enum CodingKeys: String, CodingKey { case filter case id diff --git a/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift new file mode 100644 index 0000000..2714f52 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetMetaDataByRatingKeyUnauthorized { + public let errors: [Operations.GetMetaDataByRatingKeyLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetMetaDataByRatingKeyLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMetaDataByRatingKeyUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataWriter.swift b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift similarity index 79% rename from Sources/Plexswift/models/operations/GetMetadataWriter.swift rename to Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift index ed85941..01d0cf9 100644 --- a/Sources/Plexswift/models/operations/GetMetadataWriter.swift +++ b/Sources/Plexswift/models/operations/GetMetaDataByRatingKeyWriter.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetMetadataWriter { + public struct GetMetaDataByRatingKeyWriter { public let filter: String? public let id: Int? public let tag: String? @@ -21,10 +21,9 @@ extension Operations { self.tagKey = tagKey self.thumb = thumb } - } -} + }} -extension Operations.GetMetadataWriter: Codable { +extension Operations.GetMetaDataByRatingKeyWriter: Codable { enum CodingKeys: String, CodingKey { case filter case id diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenBadRequest.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenBadRequest.swift new file mode 100644 index 0000000..11af987 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetMetadataChildrenBadRequest { + public let errors: [Operations.GetMetadataChildrenErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetMetadataChildrenErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMetadataChildrenBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenDirectory.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenDirectory.swift index afa0371..a732206 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenDirectory.swift +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenDirectory.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -21,8 +21,7 @@ extension Operations { self.title = title self.viewedLeafCount = viewedLeafCount } - } -} + }} extension Operations.GetMetadataChildrenDirectory: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenErrors.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenErrors.swift index ec97688..dd1fbe0 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenErrors.swift +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetMetadataChildrenErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetMetadataChildrenErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetMetadataChildrenErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetMetadataChildrenErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenLibraryErrors.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenLibraryErrors.swift new file mode 100644 index 0000000..e4b2166 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMetadataChildrenLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMetadataChildrenLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenMediaContainer.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenMediaContainer.swift index e39d1f0..e154111 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -57,8 +57,7 @@ extension Operations { self.viewGroup = viewGroup self.viewMode = viewMode } - } -} + }} extension Operations.GetMetadataChildrenMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenMetadata.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenMetadata.swift index 813c67f..6453566 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenMetadata.swift +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -65,8 +65,7 @@ extension Operations { self.viewCount = viewCount self.viewedLeafCount = viewedLeafCount } - } -} + }} extension Operations.GetMetadataChildrenMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenRequest.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenRequest.swift index 7450f1c..fd9ddde 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenRequest.swift +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -22,8 +22,7 @@ extension Operations { self._ratingKey = DecimalSerialized(wrappedValue: ratingKey) self.includeElements = includeElements } - } -} + }} extension Operations.GetMetadataChildrenRequest { var ratingKeyWrapper: DecimalSerialized { return _ratingKey diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenResponse.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenResponse.swift index 085effc..544e8e1 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenResponse.swift +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetMetadataChildrenResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetMetadataChildrenResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetMetadataChildrenLibraryResponseBody) + case badRequest(Operations.GetMetadataChildrenBadRequest) + case object(Operations.GetMetadataChildrenResponseBody) + case unauthorized(Operations.GetMetadataChildrenUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetMetadataChildrenResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetMetadataChildrenBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetMetadataChildrenLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetMetadataChildrenResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetMetadataChildrenUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenResponseBody.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenResponseBody.swift index b70c085..cf01ec7 100644 --- a/Sources/Plexswift/models/operations/GetMetadataChildrenResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetMetadataChildrenMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetMetadataChildrenResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetMetadataChildrenUnauthorized.swift b/Sources/Plexswift/models/operations/GetMetadataChildrenUnauthorized.swift new file mode 100644 index 0000000..1053ab2 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMetadataChildrenUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetMetadataChildrenUnauthorized { + public let errors: [Operations.GetMetadataChildrenLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetMetadataChildrenLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMetadataChildrenUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMetadataErrors.swift b/Sources/Plexswift/models/operations/GetMetadataErrors.swift deleted file mode 100644 index 8d184a9..0000000 --- a/Sources/Plexswift/models/operations/GetMetadataErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetadataErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.GetMetadataErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.GetMetadataErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetMetadataLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetMetadataLibraryResponseBody.swift deleted file mode 100644 index 5cea882..0000000 --- a/Sources/Plexswift/models/operations/GetMetadataLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetMetadataLibraryResponseBody { - public let errors: [Operations.GetMetadataErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetMetadataErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetMetadataLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetMetadataRequest.swift b/Sources/Plexswift/models/operations/GetMetadataRequest.swift deleted file mode 100644 index 47b2410..0000000 --- a/Sources/Plexswift/models/operations/GetMetadataRequest.swift +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetMetadataRequest: APIValue { - /// the id of the library item to return the children of. - @DecimalSerialized - public private(set) var ratingKey: Double - - /// Creates an object with the specified parameters - /// - /// - Parameter ratingKey: the id of the library item to return the children of. - /// - public init(ratingKey: Double) { - self._ratingKey = DecimalSerialized(wrappedValue: ratingKey) - } - } -} -extension Operations.GetMetadataRequest { - var ratingKeyWrapper: DecimalSerialized { - return _ratingKey - } -} diff --git a/Sources/Plexswift/models/operations/GetMetadataResponse.swift b/Sources/Plexswift/models/operations/GetMetadataResponse.swift deleted file mode 100644 index 25483ac..0000000 --- a/Sources/Plexswift/models/operations/GetMetadataResponse.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A response model - public enum GetMetadataResponse { - case empty - case twoHundredApplicationJsonObject(Operations.GetMetadataResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetMetadataLibraryResponseBody) - - var isEmpty: Bool { - if case .empty = self { - return true - } else { - return false - } - } - - public func twoHundredApplicationJsonObject() throws -> Operations.GetMetadataResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetMetadataLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - } -} diff --git a/Sources/Plexswift/models/operations/GetMetadataResponseBody.swift b/Sources/Plexswift/models/operations/GetMetadataResponseBody.swift deleted file mode 100644 index 10a1e92..0000000 --- a/Sources/Plexswift/models/operations/GetMetadataResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// The metadata of the library item. - public struct GetMetadataResponseBody { - public let mediaContainer: Operations.GetMetadataMediaContainer? - - /// Creates an object with the specified parameters - /// - /// - public init(mediaContainer: Operations.GetMetadataMediaContainer? = nil) { - self.mediaContainer = mediaContainer - } - } -} - -extension Operations.GetMetadataResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case mediaContainer = "MediaContainer" - } -} - diff --git a/Sources/Plexswift/models/operations/GetMyPlexAccountBadRequest.swift b/Sources/Plexswift/models/operations/GetMyPlexAccountBadRequest.swift new file mode 100644 index 0000000..3b72655 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMyPlexAccountBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetMyPlexAccountBadRequest { + public let errors: [Operations.GetMyPlexAccountErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetMyPlexAccountErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMyPlexAccountBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetMyPlexAccountErrors.swift b/Sources/Plexswift/models/operations/GetMyPlexAccountErrors.swift index 90bda09..704a0a2 100644 --- a/Sources/Plexswift/models/operations/GetMyPlexAccountErrors.swift +++ b/Sources/Plexswift/models/operations/GetMyPlexAccountErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetMyPlexAccountErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetMyPlexAccountErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetMyPlexAccountErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetMyPlexAccountErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetMyPlexAccountResponse.swift b/Sources/Plexswift/models/operations/GetMyPlexAccountResponse.swift index f8b03e7..a5b0e17 100644 --- a/Sources/Plexswift/models/operations/GetMyPlexAccountResponse.swift +++ b/Sources/Plexswift/models/operations/GetMyPlexAccountResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetMyPlexAccountResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetMyPlexAccountResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetMyPlexAccountServerResponseBody) + case badRequest(Operations.GetMyPlexAccountBadRequest) + case object(Operations.GetMyPlexAccountResponseBody) + case unauthorized(Operations.GetMyPlexAccountUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetMyPlexAccountResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetMyPlexAccountBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetMyPlexAccountServerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetMyPlexAccountResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetMyPlexAccountUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetMyPlexAccountResponseBody.swift b/Sources/Plexswift/models/operations/GetMyPlexAccountResponseBody.swift index b287fa7..23ea020 100644 --- a/Sources/Plexswift/models/operations/GetMyPlexAccountResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetMyPlexAccountResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(myPlex: Operations.MyPlex? = nil) { self.myPlex = myPlex } - } -} + }} extension Operations.GetMyPlexAccountResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetMyPlexAccountServerErrors.swift b/Sources/Plexswift/models/operations/GetMyPlexAccountServerErrors.swift new file mode 100644 index 0000000..b34d8eb --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMyPlexAccountServerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetMyPlexAccountServerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetMyPlexAccountServerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetMyPlexAccountServerResponseBody.swift b/Sources/Plexswift/models/operations/GetMyPlexAccountServerResponseBody.swift deleted file mode 100644 index 7591fd3..0000000 --- a/Sources/Plexswift/models/operations/GetMyPlexAccountServerResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetMyPlexAccountServerResponseBody { - public let errors: [Operations.GetMyPlexAccountErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetMyPlexAccountErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetMyPlexAccountServerResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetMyPlexAccountUnauthorized.swift b/Sources/Plexswift/models/operations/GetMyPlexAccountUnauthorized.swift new file mode 100644 index 0000000..cebf6ee --- /dev/null +++ b/Sources/Plexswift/models/operations/GetMyPlexAccountUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetMyPlexAccountUnauthorized { + public let errors: [Operations.GetMyPlexAccountServerErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetMyPlexAccountServerErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetMyPlexAccountUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetOnDeckBadRequest.swift b/Sources/Plexswift/models/operations/GetOnDeckBadRequest.swift new file mode 100644 index 0000000..74fb88e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetOnDeckBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetOnDeckBadRequest { + public let errors: [Operations.GetOnDeckErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetOnDeckErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetOnDeckBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetOnDeckErrors.swift b/Sources/Plexswift/models/operations/GetOnDeckErrors.swift index dfef9a4..016b8a7 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckErrors.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetOnDeckErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetOnDeckErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetOnDeckErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetOnDeckErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetOnDeckGuids.swift b/Sources/Plexswift/models/operations/GetOnDeckGuids.swift index daae031..c625bab 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckGuids.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckGuids.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(id: String? = nil) { self.id = id } - } -} + }} extension Operations.GetOnDeckGuids: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetOnDeckLibraryErrors.swift b/Sources/Plexswift/models/operations/GetOnDeckLibraryErrors.swift new file mode 100644 index 0000000..df2d53d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetOnDeckLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetOnDeckLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetOnDeckLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetOnDeckMedia.swift b/Sources/Plexswift/models/operations/GetOnDeckMedia.swift index 66398fc..4398ef9 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckMedia.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -48,8 +48,7 @@ extension Operations { self.videoResolution = videoResolution self._width = DecimalSerialized(wrappedValue: width) } - } -} + }} extension Operations.GetOnDeckMedia: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetOnDeckMediaContainer.swift b/Sources/Plexswift/models/operations/GetOnDeckMediaContainer.swift index 2c46400..a67816c 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -27,8 +27,7 @@ extension Operations { self.mixedParents = mixedParents self._size = DecimalSerialized(wrappedValue: size) } - } -} + }} extension Operations.GetOnDeckMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetOnDeckMetadata.swift b/Sources/Plexswift/models/operations/GetOnDeckMetadata.swift index f5140d8..3ee47e1 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckMetadata.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -95,8 +95,7 @@ extension Operations { self._updatedAt = DecimalSerialized(wrappedValue: updatedAt) self._year = DecimalSerialized(wrappedValue: year) } - } -} + }} extension Operations.GetOnDeckMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetOnDeckPart.swift b/Sources/Plexswift/models/operations/GetOnDeckPart.swift index 1d153cb..be56fbc 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckPart.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckPart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -32,8 +32,7 @@ extension Operations { self.stream = stream self.videoProfile = videoProfile } - } -} + }} extension Operations.GetOnDeckPart: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetOnDeckResponse.swift b/Sources/Plexswift/models/operations/GetOnDeckResponse.swift index 94876e1..437e745 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckResponse.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetOnDeckResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetOnDeckResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetOnDeckLibraryResponseBody) + case badRequest(Operations.GetOnDeckBadRequest) + case object(Operations.GetOnDeckResponseBody) + case unauthorized(Operations.GetOnDeckUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetOnDeckResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetOnDeckBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetOnDeckLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetOnDeckResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetOnDeckUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetOnDeckResponseBody.swift b/Sources/Plexswift/models/operations/GetOnDeckResponseBody.swift index cdc6cb9..5570454 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetOnDeckMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetOnDeckResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetOnDeckStream.swift b/Sources/Plexswift/models/operations/GetOnDeckStream.swift index 3280a5f..e31e774 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckStream.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckStream.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -69,8 +69,7 @@ extension Operations { self._streamType = DecimalSerialized(wrappedValue: streamType) self._width = DecimalSerialized(wrappedValue: width) } - } -} + }} extension Operations.GetOnDeckStream: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTimelineResponseBody.swift b/Sources/Plexswift/models/operations/GetOnDeckUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/GetTimelineResponseBody.swift rename to Sources/Plexswift/models/operations/GetOnDeckUnauthorized.swift index c1b26b7..7ece509 100644 --- a/Sources/Plexswift/models/operations/GetTimelineResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetOnDeckUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetTimelineResponseBody { - public let errors: [Operations.GetTimelineErrors]? + public struct GetOnDeckUnauthorized { + public let errors: [Operations.GetOnDeckLibraryErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetTimelineErrors]? = nil) { + public init(errors: [Operations.GetOnDeckLibraryErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetTimelineResponseBody: Codable { +extension Operations.GetOnDeckUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetPinAuthPinContainer.swift b/Sources/Plexswift/models/operations/GetPinAuthPinContainer.swift new file mode 100644 index 0000000..18f54c3 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPinAuthPinContainer.swift @@ -0,0 +1,104 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Requests a new pin id used in the authentication flow + public struct GetPinAuthPinContainer { + /// The X-Client-Identifier used in the request + public let clientIdentifier: String + public let code: String + @DateTime + public private(set) var createdAt: Date + @DateTime + public private(set) var expiresAt: Date + /// The number of seconds this pin expires, by default 900 seconds + public let expiresIn: Int + public let id: Int + /// Geo location data + public let location: Operations.GeoData + public let product: String + public let qr: String + public let trusted: Bool + public let authToken: AnyValue? + public let newRegistration: AnyValue? + + /// Creates an object with the specified parameters + /// + /// - Parameter clientIdentifier: The X-Client-Identifier used in the request + /// - Parameter expiresIn: The number of seconds this pin expires, by default 900 seconds + /// - Parameter location: Geo location data + /// + public init(clientIdentifier: String, code: String, createdAt: Date, expiresAt: Date, expiresIn: Int, id: Int, location: Operations.GeoData, product: String, qr: String, trusted: Bool, authToken: AnyValue? = nil, newRegistration: AnyValue? = nil) { + self.clientIdentifier = clientIdentifier + self.code = code + self._createdAt = DateTime(wrappedValue: createdAt) + self._expiresAt = DateTime(wrappedValue: expiresAt) + self.expiresIn = expiresIn + self.id = id + self.location = location + self.product = product + self.qr = qr + self.trusted = trusted + self.authToken = authToken + self.newRegistration = newRegistration + } + }} + +extension Operations.GetPinAuthPinContainer: Codable { + enum CodingKeys: String, CodingKey { + case clientIdentifier + case code + case createdAt + case expiresAt + case expiresIn + case id + case location + case product + case qr + case trusted + case authToken + case newRegistration + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.clientIdentifier = try container.decode(String.self, forKey: .clientIdentifier) + self.code = try container.decode(String.self, forKey: .code) + self._createdAt = try container.decode(DateTime.self, forKey: .createdAt) + self._expiresAt = try container.decode(DateTime.self, forKey: .expiresAt) + self.expiresIn = try container.decode(Int.self, forKey: .expiresIn) + self.id = try container.decode(Int.self, forKey: .id) + self.location = try container.decode(Operations.GeoData.self, forKey: .location) + self.product = try container.decode(String.self, forKey: .product) + self.qr = try container.decode(String.self, forKey: .qr) + self.trusted = try container.decode(Bool.self, forKey: .trusted) + self.authToken = try container.decodeIfPresent(AnyValue.self, forKey: .authToken) + self.newRegistration = try container.decodeIfPresent(AnyValue.self, forKey: .newRegistration) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.clientIdentifier, forKey: .clientIdentifier) + try container.encode(self.code, forKey: .code) + try container.encode(self._createdAt, forKey: .createdAt) + try container.encode(self._expiresAt, forKey: .expiresAt) + try container.encode(self.expiresIn, forKey: .expiresIn) + try container.encode(self.id, forKey: .id) + try container.encode(self.location, forKey: .location) + try container.encode(self.product, forKey: .product) + try container.encode(self.qr, forKey: .qr) + try container.encode(self.trusted, forKey: .trusted) + try container.encodeIfPresent(self.authToken, forKey: .authToken) + try container.encodeIfPresent(self.newRegistration, forKey: .newRegistration) + } +} + +extension Operations.GetPinAuthPinContainer { + var createdAtWrapper: DateTime { + return _createdAt + } + var expiresAtWrapper: DateTime { + return _expiresAt + } +} diff --git a/Sources/Plexswift/models/operations/GetPinBadRequest.swift b/Sources/Plexswift/models/operations/GetPinBadRequest.swift new file mode 100644 index 0000000..5ba39fa --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPinBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetPinBadRequest { + public let errors: [Operations.GetPinErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetPinErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetPinBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetPinErrors.swift b/Sources/Plexswift/models/operations/GetPinErrors.swift index 05fdfcb..8727740 100644 --- a/Sources/Plexswift/models/operations/GetPinErrors.swift +++ b/Sources/Plexswift/models/operations/GetPinErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetPinErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetPinErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetPinErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetPinErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetPinPlexResponseBody.swift b/Sources/Plexswift/models/operations/GetPinPlexResponseBody.swift deleted file mode 100644 index a6a5a39..0000000 --- a/Sources/Plexswift/models/operations/GetPinPlexResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// X-Plex-Client-Identifier is missing - public struct GetPinPlexResponseBody { - public let errors: [Operations.GetPinErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetPinErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetPinPlexResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetPinRequest.swift b/Sources/Plexswift/models/operations/GetPinRequest.swift index 6073096..530e571 100644 --- a/Sources/Plexswift/models/operations/GetPinRequest.swift +++ b/Sources/Plexswift/models/operations/GetPinRequest.swift @@ -1,13 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetPinRequest: APIValue { - /// Product name of the application shown in the list of devices - /// - public let xPlexProduct: String /// 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` @@ -18,11 +15,10 @@ extension Operations { /// (UUID, serial number, or other number unique per device) /// public let xPlexClientIdentifier: String? + public let xPlexProduct: String? /// Creates an object with the specified parameters /// - /// - Parameter xPlexProduct: Product name of the application shown in the list of devices - /// /// - Parameter 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` @@ -32,10 +28,9 @@ extension Operations { /// (UUID, serial number, or other number unique per device) /// /// - public init(xPlexProduct: String, strong: Bool? = nil, xPlexClientIdentifier: String? = nil) { - self.xPlexProduct = xPlexProduct + public init(strong: Bool? = nil, xPlexClientIdentifier: String? = nil, xPlexProduct: String? = nil) { self.strong = strong self.xPlexClientIdentifier = xPlexClientIdentifier + self.xPlexProduct = xPlexProduct } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetPinResponse.swift b/Sources/Plexswift/models/operations/GetPinResponse.swift index 7e43181..83e93f3 100644 --- a/Sources/Plexswift/models/operations/GetPinResponse.swift +++ b/Sources/Plexswift/models/operations/GetPinResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,8 @@ extension Operations { /// A response model public enum GetPinResponse { case empty - case twoHundredAndOneApplicationJsonObject(Operations.GetPinResponseBody) - case fourHundredApplicationJsonObject(Operations.GetPinPlexResponseBody) + case authPinContainer(Operations.GetPinAuthPinContainer) + case badRequest(Operations.GetPinBadRequest) var isEmpty: Bool { if case .empty = self { @@ -17,18 +17,17 @@ extension Operations { } } - public func twoHundredAndOneApplicationJsonObject() throws -> Operations.GetPinResponseBody { - guard case .twoHundredAndOneApplicationJsonObject(let value) = self else { + public func authPinContainer() throws -> Operations.GetPinAuthPinContainer { + guard case .authPinContainer(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredApplicationJsonObject() throws -> Operations.GetPinPlexResponseBody { - guard case .fourHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetPinBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetPinResponseBody.swift b/Sources/Plexswift/models/operations/GetPinResponseBody.swift deleted file mode 100644 index 0a89a5c..0000000 --- a/Sources/Plexswift/models/operations/GetPinResponseBody.swift +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// The Pin - public struct GetPinResponseBody { - public let authToken: String? - public let clientIdentifier: String? - public let code: String? - @DateTime - public private(set) var createdAt: Date? - @DateTime - public private(set) var expiresAt: Date? - @DecimalSerialized - public private(set) var expiresIn: Double? - /// PinID for use with authentication - @DecimalSerialized - public private(set) var id: Double? - public let location: Operations.Location? - public let newRegistration: Bool? - public let product: String? - /// 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 let qr: String? - public let trusted: Bool? - - /// Creates an object with the specified parameters - /// - /// - Parameter id: PinID for use with authentication - /// - Parameter qr: 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 init(authToken: String? = nil, clientIdentifier: String? = nil, code: String? = nil, createdAt: Date? = nil, expiresAt: Date? = nil, expiresIn: Double? = nil, id: Double? = nil, location: Operations.Location? = nil, newRegistration: Bool? = nil, product: String? = nil, qr: String? = nil, trusted: Bool? = nil) { - self.authToken = authToken - self.clientIdentifier = clientIdentifier - self.code = code - self._createdAt = DateTime(wrappedValue: createdAt) - self._expiresAt = DateTime(wrappedValue: expiresAt) - self._expiresIn = DecimalSerialized(wrappedValue: expiresIn) - self._id = DecimalSerialized(wrappedValue: id) - self.location = location - self.newRegistration = newRegistration - self.product = product - self.qr = qr - self.trusted = trusted - } - } -} - -extension Operations.GetPinResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case authToken - case clientIdentifier - case code - case createdAt - case expiresAt - case expiresIn - case id - case location - case newRegistration - case product - case qr - case trusted - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.authToken = try container.decodeIfPresent(String.self, forKey: .authToken) - self.clientIdentifier = try container.decodeIfPresent(String.self, forKey: .clientIdentifier) - self.code = try container.decodeIfPresent(String.self, forKey: .code) - self._createdAt = try container.decodeIfPresent(DateTime.self, forKey: .createdAt) ?? DateTime(wrappedValue: nil) - self._expiresAt = try container.decodeIfPresent(DateTime.self, forKey: .expiresAt) ?? DateTime(wrappedValue: nil) - self._expiresIn = try container.decodeIfPresent(DecimalSerialized.self, forKey: .expiresIn) ?? DecimalSerialized(wrappedValue: nil) - self._id = try container.decodeIfPresent(DecimalSerialized.self, forKey: .id) ?? DecimalSerialized(wrappedValue: nil) - self.location = try container.decodeIfPresent(Operations.Location.self, forKey: .location) - self.newRegistration = try container.decodeIfPresent(Bool.self, forKey: .newRegistration) - self.product = try container.decodeIfPresent(String.self, forKey: .product) - self.qr = try container.decodeIfPresent(String.self, forKey: .qr) - self.trusted = try container.decodeIfPresent(Bool.self, forKey: .trusted) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(self.authToken, forKey: .authToken) - try container.encodeIfPresent(self.clientIdentifier, forKey: .clientIdentifier) - try container.encodeIfPresent(self.code, forKey: .code) - if self.createdAt != nil { - try container.encode(self._createdAt, forKey: .createdAt) - } - if self.expiresAt != nil { - try container.encode(self._expiresAt, forKey: .expiresAt) - } - if self.expiresIn != nil { - try container.encode(self._expiresIn, forKey: .expiresIn) - } - if self.id != nil { - try container.encode(self._id, forKey: .id) - } - try container.encodeIfPresent(self.location, forKey: .location) - try container.encodeIfPresent(self.newRegistration, forKey: .newRegistration) - try container.encodeIfPresent(self.product, forKey: .product) - try container.encodeIfPresent(self.qr, forKey: .qr) - try container.encodeIfPresent(self.trusted, forKey: .trusted) - } -} - -extension Operations.GetPinResponseBody { - var idWrapper: DecimalSerialized { - return _id - } - var expiresInWrapper: DecimalSerialized { - return _expiresIn - } - var createdAtWrapper: DateTime { - return _createdAt - } - var expiresAtWrapper: DateTime { - return _expiresAt - } -} diff --git a/Sources/Plexswift/models/operations/GetPlaylistBadRequest.swift b/Sources/Plexswift/models/operations/GetPlaylistBadRequest.swift new file mode 100644 index 0000000..a84495e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetPlaylistBadRequest { + public let errors: [Operations.GetPlaylistErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetPlaylistErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetPlaylistBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsBadRequest.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsBadRequest.swift new file mode 100644 index 0000000..f5bf7ae --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetPlaylistContentsBadRequest { + public let errors: [Operations.GetPlaylistContentsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetPlaylistContentsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetPlaylistContentsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsCountry.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsCountry.swift index ad6224c..764bd39 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsCountry.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsCountry.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetPlaylistContentsCountry: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsDirector.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsDirector.swift index 41931c2..040070b 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsDirector.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsDirector.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetPlaylistContentsDirector: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsErrors.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsErrors.swift index 72b7089..e9c0c62 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsErrors.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetPlaylistContentsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetPlaylistContentsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetPlaylistContentsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetPlaylistContentsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsGenre.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsGenre.swift index db2ca0b..30e1c56 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsGenre.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsGenre.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetPlaylistContentsGenre: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsMedia.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsMedia.swift index 245bb4d..8e23ac1 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsMedia.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -46,8 +46,7 @@ extension Operations { self.videoResolution = videoResolution self.width = width } - } -} + }} extension Operations.GetPlaylistContentsMedia: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsMediaContainer.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsMediaContainer.swift index c9650d7..519c64f 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -29,8 +29,7 @@ extension Operations { self.smart = smart self.title = title } - } -} + }} extension Operations.GetPlaylistContentsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsMetadata.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsMetadata.swift index 0abe547..a863830 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsMetadata.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -78,8 +78,7 @@ extension Operations { self.writer = writer self.year = year } - } -} + }} extension Operations.GetPlaylistContentsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsPart.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsPart.swift index 33aba68..ba27103 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsPart.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsPart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -31,8 +31,7 @@ extension Operations { self.size = size self.videoProfile = videoProfile } - } -} + }} extension Operations.GetPlaylistContentsPart: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsErrors.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsErrors.swift new file mode 100644 index 0000000..634098e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetPlaylistContentsPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetPlaylistContentsPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsResponseBody.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsResponseBody.swift deleted file mode 100644 index 6e224e3..0000000 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsPlaylistsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetPlaylistContentsPlaylistsResponseBody { - public let errors: [Operations.GetPlaylistContentsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetPlaylistContentsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetPlaylistContentsPlaylistsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift new file mode 100644 index 0000000..406f068 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsQueryParamType.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public enum GetPlaylistContentsQueryParamType: Int, Codable, APIValue { + case one = 1 + case two = 2 + case three = 3 + case four = 4 + }} diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift index 9878d65..67541c0 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -8,26 +8,33 @@ extension Operations { /// the ID of the playlist @DecimalSerialized public private(set) var playlistID: Double - /// the metadata type of the item to return - @DecimalSerialized - public private(set) var type: Double + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public let type: Operations.GetPlaylistContentsQueryParamType /// Creates an object with the specified parameters /// /// - Parameter playlistID: the ID of the playlist - /// - Parameter type: the metadata type of the item to return + /// - Parameter type: The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// /// - public init(playlistID: Double, type: Double) { + public init(playlistID: Double, type: Operations.GetPlaylistContentsQueryParamType) { self._playlistID = DecimalSerialized(wrappedValue: playlistID) - self._type = DecimalSerialized(wrappedValue: type) + self.type = type } - } -} + }} extension Operations.GetPlaylistContentsRequest { var playlistIDWrapper: DecimalSerialized { return _playlistID } - var typeWrapper: DecimalSerialized { - return _type - } } diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsResponse.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsResponse.swift index b7737c6..e7ef410 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsResponse.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetPlaylistContentsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetPlaylistContentsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetPlaylistContentsPlaylistsResponseBody) + case badRequest(Operations.GetPlaylistContentsBadRequest) + case object(Operations.GetPlaylistContentsResponseBody) + case unauthorized(Operations.GetPlaylistContentsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetPlaylistContentsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetPlaylistContentsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetPlaylistContentsPlaylistsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetPlaylistContentsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetPlaylistContentsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsResponseBody.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsResponseBody.swift index 71b6430..ce36fe1 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetPlaylistContentsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetPlaylistContentsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsRole.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsRole.swift index 1ad8bd7..e7412b5 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsRole.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsRole.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetPlaylistContentsRole: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsUnauthorized.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsUnauthorized.swift new file mode 100644 index 0000000..682dc2c --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetPlaylistContentsUnauthorized { + public let errors: [Operations.GetPlaylistContentsPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetPlaylistContentsPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetPlaylistContentsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistContentsWriter.swift b/Sources/Plexswift/models/operations/GetPlaylistContentsWriter.swift index 2f8f71e..55f2330 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistContentsWriter.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistContentsWriter.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetPlaylistContentsWriter: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistErrors.swift b/Sources/Plexswift/models/operations/GetPlaylistErrors.swift index ea9de89..34f4753 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistErrors.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetPlaylistErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetPlaylistErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetPlaylistErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetPlaylistErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetPlaylistMediaContainer.swift b/Sources/Plexswift/models/operations/GetPlaylistMediaContainer.swift index 144466a..d43e310 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} extension Operations.GetPlaylistMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistMetadata.swift b/Sources/Plexswift/models/operations/GetPlaylistMetadata.swift index 870b6f1..1e6442b 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistMetadata.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -41,8 +41,7 @@ extension Operations { self.type = type self.updatedAt = updatedAt } - } -} + }} extension Operations.GetPlaylistMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistPlaylistsErrors.swift b/Sources/Plexswift/models/operations/GetPlaylistPlaylistsErrors.swift new file mode 100644 index 0000000..2fe181d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetPlaylistPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetPlaylistPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistPlaylistsResponseBody.swift b/Sources/Plexswift/models/operations/GetPlaylistPlaylistsResponseBody.swift deleted file mode 100644 index bc51798..0000000 --- a/Sources/Plexswift/models/operations/GetPlaylistPlaylistsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetPlaylistPlaylistsResponseBody { - public let errors: [Operations.GetPlaylistErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetPlaylistErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetPlaylistPlaylistsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetPlaylistRequest.swift b/Sources/Plexswift/models/operations/GetPlaylistRequest.swift index e730a37..9443c2d 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistRequest.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { public init(playlistID: Double) { self._playlistID = DecimalSerialized(wrappedValue: playlistID) } - } -} + }} extension Operations.GetPlaylistRequest { var playlistIDWrapper: DecimalSerialized { return _playlistID diff --git a/Sources/Plexswift/models/operations/GetPlaylistResponse.swift b/Sources/Plexswift/models/operations/GetPlaylistResponse.swift index 081cf7a..0b4da38 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistResponse.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetPlaylistResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetPlaylistResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetPlaylistPlaylistsResponseBody) + case badRequest(Operations.GetPlaylistBadRequest) + case object(Operations.GetPlaylistResponseBody) + case unauthorized(Operations.GetPlaylistUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetPlaylistResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetPlaylistBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetPlaylistPlaylistsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetPlaylistResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetPlaylistUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetPlaylistResponseBody.swift b/Sources/Plexswift/models/operations/GetPlaylistResponseBody.swift index d72125e..7725105 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetPlaylistMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetPlaylistResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistUnauthorized.swift b/Sources/Plexswift/models/operations/GetPlaylistUnauthorized.swift new file mode 100644 index 0000000..ec46c93 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetPlaylistUnauthorized { + public let errors: [Operations.GetPlaylistPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetPlaylistPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetPlaylistUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistsBadRequest.swift b/Sources/Plexswift/models/operations/GetPlaylistsBadRequest.swift new file mode 100644 index 0000000..b9065f4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetPlaylistsBadRequest { + public let errors: [Operations.GetPlaylistsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetPlaylistsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistsErrors.swift b/Sources/Plexswift/models/operations/GetPlaylistsErrors.swift index 2dadc7e..75f536f 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistsErrors.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetPlaylistsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetPlaylistsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetPlaylistsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetPlaylistsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetPlaylistsMediaContainer.swift b/Sources/Plexswift/models/operations/GetPlaylistsMediaContainer.swift index 24ffddc..e072dd8 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} extension Operations.GetPlaylistsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistsMetadata.swift b/Sources/Plexswift/models/operations/GetPlaylistsMetadata.swift index d966bf0..7c48ad3 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistsMetadata.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -43,8 +43,7 @@ extension Operations { self.updatedAt = updatedAt self.viewCount = viewCount } - } -} + }} extension Operations.GetPlaylistsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistsPlaylistsErrors.swift b/Sources/Plexswift/models/operations/GetPlaylistsPlaylistsErrors.swift new file mode 100644 index 0000000..904a0c0 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistsPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetPlaylistsPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetPlaylistsPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetPlaylistsPlaylistsResponseBody.swift b/Sources/Plexswift/models/operations/GetPlaylistsPlaylistsResponseBody.swift deleted file mode 100644 index 5e13dc8..0000000 --- a/Sources/Plexswift/models/operations/GetPlaylistsPlaylistsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetPlaylistsPlaylistsResponseBody { - public let errors: [Operations.GetPlaylistsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetPlaylistsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetPlaylistsPlaylistsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetPlaylistsRequest.swift b/Sources/Plexswift/models/operations/GetPlaylistsRequest.swift index 4b5f174..4988098 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistsRequest.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,5 +19,4 @@ extension Operations { self.playlistType = playlistType self.smart = smart } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetPlaylistsResponse.swift b/Sources/Plexswift/models/operations/GetPlaylistsResponse.swift index d6b53cf..a970cad 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistsResponse.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetPlaylistsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetPlaylistsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetPlaylistsPlaylistsResponseBody) + case badRequest(Operations.GetPlaylistsBadRequest) + case object(Operations.GetPlaylistsResponseBody) + case unauthorized(Operations.GetPlaylistsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetPlaylistsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetPlaylistsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetPlaylistsPlaylistsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetPlaylistsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetPlaylistsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetPlaylistsResponseBody.swift b/Sources/Plexswift/models/operations/GetPlaylistsResponseBody.swift index 5c386b2..30c75d4 100644 --- a/Sources/Plexswift/models/operations/GetPlaylistsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetPlaylistsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetPlaylistsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetPlaylistsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetPlaylistsUnauthorized.swift b/Sources/Plexswift/models/operations/GetPlaylistsUnauthorized.swift new file mode 100644 index 0000000..4dcadae --- /dev/null +++ b/Sources/Plexswift/models/operations/GetPlaylistsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetPlaylistsUnauthorized { + public let errors: [Operations.GetPlaylistsPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetPlaylistsPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetPlaylistsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedBadRequest.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedBadRequest.swift new file mode 100644 index 0000000..5a4dfa0 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetRecentlyAddedBadRequest { + public let errors: [Operations.GetRecentlyAddedErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetRecentlyAddedErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetRecentlyAddedBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedErrors.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedErrors.swift index ece12e2..a9c3b33 100644 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedErrors.swift +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetRecentlyAddedErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetRecentlyAddedErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetRecentlyAddedErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetRecentlyAddedErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryErrors.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryErrors.swift new file mode 100644 index 0000000..64c462a --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetRecentlyAddedLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetRecentlyAddedLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryResponseBody.swift deleted file mode 100644 index a0a7c3d..0000000 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetRecentlyAddedLibraryResponseBody { - public let errors: [Operations.GetRecentlyAddedErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetRecentlyAddedErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetRecentlyAddedLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedMediaContainer.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedMediaContainer.swift index 018a116..9b733ff 100644 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -27,8 +27,7 @@ extension Operations { self.mixedParents = mixedParents self._size = DecimalSerialized(wrappedValue: size) } - } -} + }} extension Operations.GetRecentlyAddedMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedMetadata.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedMetadata.swift index 6e1e785..e6e21e7 100644 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedMetadata.swift +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -84,8 +84,7 @@ extension Operations { self.writer = writer self._year = DecimalSerialized(wrappedValue: year) } - } -} + }} extension Operations.GetRecentlyAddedMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift new file mode 100644 index 0000000..1f7ebd5 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedRequest.swift @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetRecentlyAddedRequest: APIValue { + /// The number of items to return. If not specified, all items will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 50 + /// + public let xPlexContainerSize: Int? + /// The index of the first item to return. If not specified, the first item will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 0 + /// + public let xPlexContainerStart: Int? + + /// Creates an object with the specified parameters + /// + /// - Parameter xPlexContainerSize: The number of items to return. If not specified, all items will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 50 + /// + /// - Parameter xPlexContainerStart: The index of the first item to return. If not specified, the first item will be returned. + /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 0 + /// + /// + public init(xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) { + self.xPlexContainerSize = xPlexContainerSize + self.xPlexContainerStart = xPlexContainerStart + } + }} diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedResponse.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedResponse.swift index 287bedb..261e8af 100644 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedResponse.swift +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetRecentlyAddedResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetRecentlyAddedResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetRecentlyAddedLibraryResponseBody) + case badRequest(Operations.GetRecentlyAddedBadRequest) + case object(Operations.GetRecentlyAddedResponseBody) + case unauthorized(Operations.GetRecentlyAddedUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetRecentlyAddedResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetRecentlyAddedBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetRecentlyAddedLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetRecentlyAddedResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetRecentlyAddedUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedResponseBody.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedResponseBody.swift index e6808cf..8b70896 100644 --- a/Sources/Plexswift/models/operations/GetRecentlyAddedResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetRecentlyAddedMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetRecentlyAddedResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetRecentlyAddedUnauthorized.swift b/Sources/Plexswift/models/operations/GetRecentlyAddedUnauthorized.swift new file mode 100644 index 0000000..016b1d7 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRecentlyAddedUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetRecentlyAddedUnauthorized { + public let errors: [Operations.GetRecentlyAddedLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetRecentlyAddedLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetRecentlyAddedUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataBadRequest.swift b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataBadRequest.swift new file mode 100644 index 0000000..dc85daf --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetRefreshLibraryMetadataBadRequest { + public let errors: [Operations.GetRefreshLibraryMetadataErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetRefreshLibraryMetadataErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetRefreshLibraryMetadataBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataErrors.swift b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataErrors.swift new file mode 100644 index 0000000..4f4f030 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetRefreshLibraryMetadataErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetRefreshLibraryMetadataErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataLibraryErrors.swift b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataLibraryErrors.swift new file mode 100644 index 0000000..3f1b150 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetRefreshLibraryMetadataLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetRefreshLibraryMetadataLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataRequest.swift b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataRequest.swift new file mode 100644 index 0000000..77f8759 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataRequest.swift @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetRefreshLibraryMetadataRequest: APIValue { + /// The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + public let sectionKey: Int + /// Force the refresh even if the library is already being refreshed. + public let force: Operations.Force? + + /// Creates an object with the specified parameters + /// + /// - Parameter sectionKey: The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + /// - Parameter force: Force the refresh even if the library is already being refreshed. + /// + public init(sectionKey: Int, force: Operations.Force? = nil) { + self.sectionKey = sectionKey + self.force = force + } + }} diff --git a/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataResponse.swift b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataResponse.swift new file mode 100644 index 0000000..05692a4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataResponse.swift @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetRefreshLibraryMetadataResponse { + case empty + case badRequest(Operations.GetRefreshLibraryMetadataBadRequest) + case unauthorized(Operations.GetRefreshLibraryMetadataUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetRefreshLibraryMetadataBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetRefreshLibraryMetadataUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataUnauthorized.swift b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataUnauthorized.swift new file mode 100644 index 0000000..791a956 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetRefreshLibraryMetadataUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetRefreshLibraryMetadataUnauthorized { + public let errors: [Operations.GetRefreshLibraryMetadataLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetRefreshLibraryMetadataLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetRefreshLibraryMetadataUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetResizedPhotoBadRequest.swift b/Sources/Plexswift/models/operations/GetResizedPhotoBadRequest.swift new file mode 100644 index 0000000..28431a6 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetResizedPhotoBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetResizedPhotoBadRequest { + public let errors: [Operations.GetResizedPhotoErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetResizedPhotoErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetResizedPhotoBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetResizedPhotoErrors.swift b/Sources/Plexswift/models/operations/GetResizedPhotoErrors.swift index 9275a5e..1a92753 100644 --- a/Sources/Plexswift/models/operations/GetResizedPhotoErrors.swift +++ b/Sources/Plexswift/models/operations/GetResizedPhotoErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetResizedPhotoErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetResizedPhotoErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetResizedPhotoErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetResizedPhotoErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetResizedPhotoRequest.swift b/Sources/Plexswift/models/operations/GetResizedPhotoRequest.swift index f54377d..2381858 100644 --- a/Sources/Plexswift/models/operations/GetResizedPhotoRequest.swift +++ b/Sources/Plexswift/models/operations/GetResizedPhotoRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -42,8 +42,7 @@ extension Operations { self.url = url self._width = DecimalSerialized(wrappedValue: width) } - } -} + }} extension Operations.GetResizedPhotoRequest { var widthWrapper: DecimalSerialized { return _width diff --git a/Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift b/Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift index 7d45c50..f4f36bf 100644 --- a/Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift +++ b/Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum GetResizedPhotoResponse { case empty - case object(Operations.GetResizedPhotoResponseBody) + case badRequest(Operations.GetResizedPhotoBadRequest) + case unauthorized(Operations.GetResizedPhotoUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.GetResizedPhotoResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.GetResizedPhotoBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetResizedPhotoUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetResizedPhotoServerErrors.swift b/Sources/Plexswift/models/operations/GetResizedPhotoServerErrors.swift new file mode 100644 index 0000000..b6673cf --- /dev/null +++ b/Sources/Plexswift/models/operations/GetResizedPhotoServerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetResizedPhotoServerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetResizedPhotoServerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetResizedPhotoUnauthorized.swift b/Sources/Plexswift/models/operations/GetResizedPhotoUnauthorized.swift new file mode 100644 index 0000000..1400fbe --- /dev/null +++ b/Sources/Plexswift/models/operations/GetResizedPhotoUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetResizedPhotoUnauthorized { + public let errors: [Operations.GetResizedPhotoServerErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetResizedPhotoServerErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetResizedPhotoUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsBadRequest.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsBadRequest.swift new file mode 100644 index 0000000..695de8d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetResourcesStatisticsBadRequest { + public let errors: [Operations.GetResourcesStatisticsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetResourcesStatisticsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetResourcesStatisticsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsErrors.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsErrors.swift index 42ec0e4..f47011c 100644 --- a/Sources/Plexswift/models/operations/GetResourcesStatisticsErrors.swift +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetResourcesStatisticsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetResourcesStatisticsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetResourcesStatisticsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetResourcesStatisticsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsMediaContainer.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsMediaContainer.swift index bfcd7e7..ea1e829 100644 --- a/Sources/Plexswift/models/operations/GetResourcesStatisticsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.size = size self.statisticsResources = statisticsResources } - } -} + }} extension Operations.GetResourcesStatisticsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsRequest.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsRequest.swift index 154bc54..e4f791f 100644 --- a/Sources/Plexswift/models/operations/GetResourcesStatisticsRequest.swift +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,5 +19,4 @@ extension Operations { public init(timespan: Int? = nil) { self.timespan = timespan } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsResponse.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsResponse.swift index c04c42d..11a5810 100644 --- a/Sources/Plexswift/models/operations/GetResourcesStatisticsResponse.swift +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetResourcesStatisticsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetResourcesStatisticsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetResourcesStatisticsStatisticsResponseBody) + case badRequest(Operations.GetResourcesStatisticsBadRequest) + case object(Operations.GetResourcesStatisticsResponseBody) + case unauthorized(Operations.GetResourcesStatisticsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetResourcesStatisticsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetResourcesStatisticsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetResourcesStatisticsStatisticsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetResourcesStatisticsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetResourcesStatisticsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsResponseBody.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsResponseBody.swift index ad4101f..4353e34 100644 --- a/Sources/Plexswift/models/operations/GetResourcesStatisticsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetResourcesStatisticsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetResourcesStatisticsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsErrors.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsErrors.swift new file mode 100644 index 0000000..b9ed224 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetResourcesStatisticsStatisticsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetResourcesStatisticsStatisticsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetResourcesStatisticsUnauthorized.swift b/Sources/Plexswift/models/operations/GetResourcesStatisticsUnauthorized.swift new file mode 100644 index 0000000..e8984c5 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetResourcesStatisticsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetResourcesStatisticsUnauthorized { + public let errors: [Operations.GetResourcesStatisticsStatisticsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetResourcesStatisticsStatisticsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetResourcesStatisticsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryBadRequest.swift b/Sources/Plexswift/models/operations/GetSearchLibraryBadRequest.swift new file mode 100644 index 0000000..a25f93b --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchLibraryBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetSearchLibraryBadRequest { + public let errors: [Operations.GetSearchLibraryErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetSearchLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSearchLibraryBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryErrors.swift b/Sources/Plexswift/models/operations/GetSearchLibraryErrors.swift new file mode 100644 index 0000000..aec5789 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetSearchLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetSearchLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryLibraryErrors.swift b/Sources/Plexswift/models/operations/GetSearchLibraryLibraryErrors.swift new file mode 100644 index 0000000..9379e37 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchLibraryLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetSearchLibraryLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetSearchLibraryLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/SearchLibraryMediaContainer.swift b/Sources/Plexswift/models/operations/GetSearchLibraryMediaContainer.swift similarity index 75% rename from Sources/Plexswift/models/operations/SearchLibraryMediaContainer.swift rename to Sources/Plexswift/models/operations/GetSearchLibraryMediaContainer.swift index 5bf02a0..3913dad 100644 --- a/Sources/Plexswift/models/operations/SearchLibraryMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetSearchLibraryMediaContainer.swift @@ -1,16 +1,16 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct SearchLibraryMediaContainer { + public struct GetSearchLibraryMediaContainer { public let allowSync: Bool? public let art: String? public let identifier: String? public let mediaTagPrefix: String? public let mediaTagVersion: Int? - public let metadata: [Operations.SearchLibraryMetadata]? + public let metadata: [Operations.GetSearchLibraryMetadata]? public let nocache: Bool? public let size: Int? public let thumb: String? @@ -22,7 +22,7 @@ extension Operations { /// Creates an object with the specified parameters /// /// - public init(allowSync: Bool? = nil, art: String? = nil, identifier: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.SearchLibraryMetadata]? = nil, nocache: Bool? = nil, size: Int? = nil, thumb: String? = nil, title1: String? = nil, title2: String? = nil, viewGroup: String? = nil, viewMode: Int? = nil) { + public init(allowSync: Bool? = nil, art: String? = nil, identifier: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetSearchLibraryMetadata]? = nil, nocache: Bool? = nil, size: Int? = nil, thumb: String? = nil, title1: String? = nil, title2: String? = nil, viewGroup: String? = nil, viewMode: Int? = nil) { self.allowSync = allowSync self.art = art self.identifier = identifier @@ -37,10 +37,9 @@ extension Operations { self.viewGroup = viewGroup self.viewMode = viewMode } - } -} + }} -extension Operations.SearchLibraryMediaContainer: Codable { +extension Operations.GetSearchLibraryMediaContainer: Codable { enum CodingKeys: String, CodingKey { case allowSync case art diff --git a/Sources/Plexswift/models/operations/SearchLibraryMetadata.swift b/Sources/Plexswift/models/operations/GetSearchLibraryMetadata.swift similarity index 93% rename from Sources/Plexswift/models/operations/SearchLibraryMetadata.swift rename to Sources/Plexswift/models/operations/GetSearchLibraryMetadata.swift index 815d7ac..f7a093b 100644 --- a/Sources/Plexswift/models/operations/SearchLibraryMetadata.swift +++ b/Sources/Plexswift/models/operations/GetSearchLibraryMetadata.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct SearchLibraryMetadata { + public struct GetSearchLibraryMetadata { public let addedAt: Int? public let art: String? public let guid: String? @@ -51,10 +51,9 @@ extension Operations { self.type = type self.updatedAt = updatedAt } - } -} + }} -extension Operations.SearchLibraryMetadata: Codable { +extension Operations.GetSearchLibraryMetadata: Codable { enum CodingKeys: String, CodingKey { case addedAt case art diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift b/Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift new file mode 100644 index 0000000..9252526 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchLibraryRequest.swift @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetSearchLibraryRequest: APIValue { + /// The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + public let sectionKey: Int + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public let type: Operations.QueryParamType + + /// Creates an object with the specified parameters + /// + /// - Parameter sectionKey: The unique key of the Plex library. + /// Note: This is unique in the context of the Plex server. + /// + /// - Parameter type: The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + /// + public init(sectionKey: Int, type: Operations.QueryParamType) { + self.sectionKey = sectionKey + self.type = type + } + }} diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryResponse.swift b/Sources/Plexswift/models/operations/GetSearchLibraryResponse.swift new file mode 100644 index 0000000..2ec8b71 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchLibraryResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetSearchLibraryResponse { + case empty + case badRequest(Operations.GetSearchLibraryBadRequest) + case object(Operations.GetSearchLibraryResponseBody) + case unauthorized(Operations.GetSearchLibraryUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetSearchLibraryBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetSearchLibraryResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetSearchLibraryUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetSearchLibraryResponseBody.swift new file mode 100644 index 0000000..25dd8ca --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchLibraryResponseBody.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The contents of the library by section and type + public struct GetSearchLibraryResponseBody { + public let mediaContainer: Operations.GetSearchLibraryMediaContainer? + + /// Creates an object with the specified parameters + /// + /// + public init(mediaContainer: Operations.GetSearchLibraryMediaContainer? = nil) { + self.mediaContainer = mediaContainer + } + }} + +extension Operations.GetSearchLibraryResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case mediaContainer = "MediaContainer" + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchLibraryUnauthorized.swift b/Sources/Plexswift/models/operations/GetSearchLibraryUnauthorized.swift new file mode 100644 index 0000000..2bc78b9 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchLibraryUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetSearchLibraryUnauthorized { + public let errors: [Operations.GetSearchLibraryLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetSearchLibraryLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSearchLibraryUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchResultsBadRequest.swift b/Sources/Plexswift/models/operations/GetSearchResultsBadRequest.swift new file mode 100644 index 0000000..ca92dd5 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchResultsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetSearchResultsBadRequest { + public let errors: [Operations.GetSearchResultsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetSearchResultsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSearchResultsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchResultsCountry.swift b/Sources/Plexswift/models/operations/GetSearchResultsCountry.swift index 7538cf6..2c8550d 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsCountry.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsCountry.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetSearchResultsCountry: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsDirector.swift b/Sources/Plexswift/models/operations/GetSearchResultsDirector.swift index 230066f..45f9141 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsDirector.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsDirector.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetSearchResultsDirector: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsErrors.swift b/Sources/Plexswift/models/operations/GetSearchResultsErrors.swift index 7cea7a8..a815302 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsErrors.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetSearchResultsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetSearchResultsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetSearchResultsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetSearchResultsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetSearchResultsGenre.swift b/Sources/Plexswift/models/operations/GetSearchResultsGenre.swift index 9eef7f0..25d4351 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsGenre.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsGenre.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetSearchResultsGenre: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsMedia.swift b/Sources/Plexswift/models/operations/GetSearchResultsMedia.swift index fdfb093..54da589 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsMedia.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -49,8 +49,7 @@ extension Operations { self._videoResolution = DecimalSerialized(wrappedValue: videoResolution) self._width = DecimalSerialized(wrappedValue: width) } - } -} + }} extension Operations.GetSearchResultsMedia: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsMediaContainer.swift b/Sources/Plexswift/models/operations/GetSearchResultsMediaContainer.swift index 6f7dac0..8073701 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self.provider = provider self._size = DecimalSerialized(wrappedValue: size) } - } -} + }} extension Operations.GetSearchResultsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsMetadata.swift b/Sources/Plexswift/models/operations/GetSearchResultsMetadata.swift index c1b1b2b..91c820f 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsMetadata.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -88,8 +88,7 @@ extension Operations { self.writer = writer self._year = DecimalSerialized(wrappedValue: year) } - } -} + }} extension Operations.GetSearchResultsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsPart.swift b/Sources/Plexswift/models/operations/GetSearchResultsPart.swift index 491afc7..bf5fc6c 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsPart.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsPart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -30,8 +30,7 @@ extension Operations { self._size = DecimalSerialized(wrappedValue: size) self.videoProfile = videoProfile } - } -} + }} extension Operations.GetSearchResultsPart: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsRequest.swift b/Sources/Plexswift/models/operations/GetSearchResultsRequest.swift index 2a13c28..7e131d7 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsRequest.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,5 +15,4 @@ extension Operations { public init(query: String) { self.query = query } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetSearchResultsResponse.swift b/Sources/Plexswift/models/operations/GetSearchResultsResponse.swift index 1eca68c..5c741dc 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsResponse.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetSearchResultsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetSearchResultsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetSearchResultsSearchResponseBody) + case badRequest(Operations.GetSearchResultsBadRequest) + case object(Operations.GetSearchResultsResponseBody) + case unauthorized(Operations.GetSearchResultsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetSearchResultsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetSearchResultsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetSearchResultsSearchResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetSearchResultsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetSearchResultsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetSearchResultsResponseBody.swift b/Sources/Plexswift/models/operations/GetSearchResultsResponseBody.swift index 66baea1..c1947a1 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetSearchResultsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetSearchResultsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsRole.swift b/Sources/Plexswift/models/operations/GetSearchResultsRole.swift index 5dfffc2..78b269b 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsRole.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsRole.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetSearchResultsRole: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSearchResultsSearchErrors.swift b/Sources/Plexswift/models/operations/GetSearchResultsSearchErrors.swift new file mode 100644 index 0000000..cc70bd4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchResultsSearchErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetSearchResultsSearchErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetSearchResultsSearchErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchResultsSearchResponseBody.swift b/Sources/Plexswift/models/operations/GetSearchResultsSearchResponseBody.swift deleted file mode 100644 index 40e1002..0000000 --- a/Sources/Plexswift/models/operations/GetSearchResultsSearchResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetSearchResultsSearchResponseBody { - public let errors: [Operations.GetSearchResultsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetSearchResultsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetSearchResultsSearchResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetSearchResultsUnauthorized.swift b/Sources/Plexswift/models/operations/GetSearchResultsUnauthorized.swift new file mode 100644 index 0000000..90805df --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSearchResultsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetSearchResultsUnauthorized { + public let errors: [Operations.GetSearchResultsSearchErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetSearchResultsSearchErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSearchResultsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSearchResultsWriter.swift b/Sources/Plexswift/models/operations/GetSearchResultsWriter.swift index bf4f813..3f356f1 100644 --- a/Sources/Plexswift/models/operations/GetSearchResultsWriter.swift +++ b/Sources/Plexswift/models/operations/GetSearchResultsWriter.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.GetSearchResultsWriter: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesActivitiesErrors.swift b/Sources/Plexswift/models/operations/GetServerActivitiesActivitiesErrors.swift new file mode 100644 index 0000000..9a5ba7d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerActivitiesActivitiesErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetServerActivitiesActivitiesErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetServerActivitiesActivitiesErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesActivitiesResponseBody.swift b/Sources/Plexswift/models/operations/GetServerActivitiesActivitiesResponseBody.swift deleted file mode 100644 index 9bbed62..0000000 --- a/Sources/Plexswift/models/operations/GetServerActivitiesActivitiesResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetServerActivitiesActivitiesResponseBody { - public let errors: [Operations.GetServerActivitiesErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetServerActivitiesErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetServerActivitiesActivitiesResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesBadRequest.swift b/Sources/Plexswift/models/operations/GetServerActivitiesBadRequest.swift new file mode 100644 index 0000000..f33ff92 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerActivitiesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetServerActivitiesBadRequest { + public let errors: [Operations.GetServerActivitiesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetServerActivitiesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerActivitiesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesErrors.swift b/Sources/Plexswift/models/operations/GetServerActivitiesErrors.swift index dcd0096..d0768b0 100644 --- a/Sources/Plexswift/models/operations/GetServerActivitiesErrors.swift +++ b/Sources/Plexswift/models/operations/GetServerActivitiesErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetServerActivitiesErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetServerActivitiesErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetServerActivitiesErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetServerActivitiesErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesMediaContainer.swift b/Sources/Plexswift/models/operations/GetServerActivitiesMediaContainer.swift index 67d7d9d..7062335 100644 --- a/Sources/Plexswift/models/operations/GetServerActivitiesMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetServerActivitiesMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { self.activity = activity self._size = DecimalSerialized(wrappedValue: size) } - } -} + }} extension Operations.GetServerActivitiesMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesResponse.swift b/Sources/Plexswift/models/operations/GetServerActivitiesResponse.swift index 6a1b8ef..7881b7a 100644 --- a/Sources/Plexswift/models/operations/GetServerActivitiesResponse.swift +++ b/Sources/Plexswift/models/operations/GetServerActivitiesResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetServerActivitiesResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetServerActivitiesResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetServerActivitiesActivitiesResponseBody) + case badRequest(Operations.GetServerActivitiesBadRequest) + case object(Operations.GetServerActivitiesResponseBody) + case unauthorized(Operations.GetServerActivitiesUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetServerActivitiesResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetServerActivitiesBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetServerActivitiesActivitiesResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetServerActivitiesResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetServerActivitiesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesResponseBody.swift b/Sources/Plexswift/models/operations/GetServerActivitiesResponseBody.swift index 3cf7e26..644ddd4 100644 --- a/Sources/Plexswift/models/operations/GetServerActivitiesResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetServerActivitiesResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetServerActivitiesMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetServerActivitiesResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerActivitiesUnauthorized.swift b/Sources/Plexswift/models/operations/GetServerActivitiesUnauthorized.swift new file mode 100644 index 0000000..cc7bd05 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerActivitiesUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetServerActivitiesUnauthorized { + public let errors: [Operations.GetServerActivitiesActivitiesErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetServerActivitiesActivitiesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerActivitiesUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerCapabilitiesBadRequest.swift b/Sources/Plexswift/models/operations/GetServerCapabilitiesBadRequest.swift new file mode 100644 index 0000000..d592ae1 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerCapabilitiesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetServerCapabilitiesBadRequest { + public let errors: [Operations.Errors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.Errors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerCapabilitiesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerCapabilitiesErrors.swift b/Sources/Plexswift/models/operations/GetServerCapabilitiesErrors.swift new file mode 100644 index 0000000..27fde21 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerCapabilitiesErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetServerCapabilitiesErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetServerCapabilitiesErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerCapabilitiesResponse.swift b/Sources/Plexswift/models/operations/GetServerCapabilitiesResponse.swift index b384b7c..91f7757 100644 --- a/Sources/Plexswift/models/operations/GetServerCapabilitiesResponse.swift +++ b/Sources/Plexswift/models/operations/GetServerCapabilitiesResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetServerCapabilitiesResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetServerCapabilitiesResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetServerCapabilitiesServerResponseBody) + case badRequest(Operations.GetServerCapabilitiesBadRequest) + case object(Operations.GetServerCapabilitiesResponseBody) + case unauthorized(Operations.GetServerCapabilitiesUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetServerCapabilitiesResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetServerCapabilitiesBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetServerCapabilitiesServerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetServerCapabilitiesResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetServerCapabilitiesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetServerCapabilitiesResponseBody.swift b/Sources/Plexswift/models/operations/GetServerCapabilitiesResponseBody.swift index 133d381..bdc63fd 100644 --- a/Sources/Plexswift/models/operations/GetServerCapabilitiesResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetServerCapabilitiesResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.MediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetServerCapabilitiesResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerCapabilitiesServerResponseBody.swift b/Sources/Plexswift/models/operations/GetServerCapabilitiesServerResponseBody.swift deleted file mode 100644 index 6c4952a..0000000 --- a/Sources/Plexswift/models/operations/GetServerCapabilitiesServerResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetServerCapabilitiesServerResponseBody { - public let errors: [Operations.Errors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.Errors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetServerCapabilitiesServerResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/ClearPlaylistContentsResponseBody.swift b/Sources/Plexswift/models/operations/GetServerCapabilitiesUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/ClearPlaylistContentsResponseBody.swift rename to Sources/Plexswift/models/operations/GetServerCapabilitiesUnauthorized.swift index 0541233..9bac1a6 100644 --- a/Sources/Plexswift/models/operations/ClearPlaylistContentsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetServerCapabilitiesUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct ClearPlaylistContentsResponseBody { - public let errors: [Operations.ClearPlaylistContentsErrors]? + public struct GetServerCapabilitiesUnauthorized { + public let errors: [Operations.GetServerCapabilitiesErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.ClearPlaylistContentsErrors]? = nil) { + public init(errors: [Operations.GetServerCapabilitiesErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.ClearPlaylistContentsResponseBody: Codable { +extension Operations.GetServerCapabilitiesUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetServerIdentityErrors.swift b/Sources/Plexswift/models/operations/GetServerIdentityErrors.swift deleted file mode 100644 index bfdfd35..0000000 --- a/Sources/Plexswift/models/operations/GetServerIdentityErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetServerIdentityErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.GetServerIdentityErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.GetServerIdentityErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetServerIdentityMediaContainer.swift b/Sources/Plexswift/models/operations/GetServerIdentityMediaContainer.swift index d808206..7d7bdfc 100644 --- a/Sources/Plexswift/models/operations/GetServerIdentityMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetServerIdentityMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -20,8 +20,7 @@ extension Operations { self._size = DecimalSerialized(wrappedValue: size) self.version = version } - } -} + }} extension Operations.GetServerIdentityMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerIdentityRequestTimeout.swift b/Sources/Plexswift/models/operations/GetServerIdentityRequestTimeout.swift new file mode 100644 index 0000000..c2351ff --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerIdentityRequestTimeout.swift @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Request Timeout + public struct GetServerIdentityRequestTimeout { + public let code: Int? + public let message: String? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil) { + self.code = code + self.message = message + } + }} + +extension Operations.GetServerIdentityRequestTimeout: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerIdentityResponse.swift b/Sources/Plexswift/models/operations/GetServerIdentityResponse.swift index caf8943..a9a177c 100644 --- a/Sources/Plexswift/models/operations/GetServerIdentityResponse.swift +++ b/Sources/Plexswift/models/operations/GetServerIdentityResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,8 @@ extension Operations { /// A response model public enum GetServerIdentityResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetServerIdentityResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetServerIdentityServerResponseBody) + case object(Operations.GetServerIdentityResponseBody) + case requestTimeout(Operations.GetServerIdentityRequestTimeout) var isEmpty: Bool { if case .empty = self { @@ -17,18 +17,17 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetServerIdentityResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetServerIdentityResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetServerIdentityServerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func requestTimeout() throws -> Operations.GetServerIdentityRequestTimeout { + guard case .requestTimeout(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetServerIdentityResponseBody.swift b/Sources/Plexswift/models/operations/GetServerIdentityResponseBody.swift index e03bc89..b223f52 100644 --- a/Sources/Plexswift/models/operations/GetServerIdentityResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetServerIdentityResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetServerIdentityMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetServerIdentityResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerIdentityServerResponseBody.swift b/Sources/Plexswift/models/operations/GetServerIdentityServerResponseBody.swift deleted file mode 100644 index 10e9465..0000000 --- a/Sources/Plexswift/models/operations/GetServerIdentityServerResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetServerIdentityServerResponseBody { - public let errors: [Operations.GetServerIdentityErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetServerIdentityErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetServerIdentityServerResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetServerListBadRequest.swift b/Sources/Plexswift/models/operations/GetServerListBadRequest.swift new file mode 100644 index 0000000..409f938 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerListBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetServerListBadRequest { + public let errors: [Operations.GetServerListErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetServerListErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerListBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerListErrors.swift b/Sources/Plexswift/models/operations/GetServerListErrors.swift index be79391..8f859b5 100644 --- a/Sources/Plexswift/models/operations/GetServerListErrors.swift +++ b/Sources/Plexswift/models/operations/GetServerListErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetServerListErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetServerListErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetServerListErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetServerListErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetServerListMediaContainer.swift b/Sources/Plexswift/models/operations/GetServerListMediaContainer.swift index 8ea70ef..fda48e3 100644 --- a/Sources/Plexswift/models/operations/GetServerListMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetServerListMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { self.server = server self._size = DecimalSerialized(wrappedValue: size) } - } -} + }} extension Operations.GetServerListMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerListResponse.swift b/Sources/Plexswift/models/operations/GetServerListResponse.swift index 147ab46..c7f625c 100644 --- a/Sources/Plexswift/models/operations/GetServerListResponse.swift +++ b/Sources/Plexswift/models/operations/GetServerListResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetServerListResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetServerListResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetServerListServerResponseBody) + case badRequest(Operations.GetServerListBadRequest) + case object(Operations.GetServerListResponseBody) + case unauthorized(Operations.GetServerListUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetServerListResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetServerListBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetServerListServerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetServerListResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetServerListUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetServerListResponseBody.swift b/Sources/Plexswift/models/operations/GetServerListResponseBody.swift index fee00e8..1e32858 100644 --- a/Sources/Plexswift/models/operations/GetServerListResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetServerListResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetServerListMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetServerListResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerListServer.swift b/Sources/Plexswift/models/operations/GetServerListServer.swift index 321f2f3..1101568 100644 --- a/Sources/Plexswift/models/operations/GetServerListServer.swift +++ b/Sources/Plexswift/models/operations/GetServerListServer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -24,8 +24,7 @@ extension Operations { self._port = DecimalSerialized(wrappedValue: port) self.version = version } - } -} + }} extension Operations.GetServerListServer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerListServerErrors.swift b/Sources/Plexswift/models/operations/GetServerListServerErrors.swift new file mode 100644 index 0000000..72f2d0a --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerListServerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetServerListServerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetServerListServerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerListServerResponseBody.swift b/Sources/Plexswift/models/operations/GetServerListServerResponseBody.swift deleted file mode 100644 index e593acf..0000000 --- a/Sources/Plexswift/models/operations/GetServerListServerResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetServerListServerResponseBody { - public let errors: [Operations.GetServerListErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetServerListErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetServerListServerResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetServerListUnauthorized.swift b/Sources/Plexswift/models/operations/GetServerListUnauthorized.swift new file mode 100644 index 0000000..5a314d9 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerListUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetServerListUnauthorized { + public let errors: [Operations.GetServerListServerErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetServerListServerErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerListUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesBadRequest.swift b/Sources/Plexswift/models/operations/GetServerPreferencesBadRequest.swift new file mode 100644 index 0000000..a7d6069 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerPreferencesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetServerPreferencesBadRequest { + public let errors: [Operations.GetServerPreferencesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetServerPreferencesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerPreferencesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesErrors.swift b/Sources/Plexswift/models/operations/GetServerPreferencesErrors.swift index 3515a80..b99d08f 100644 --- a/Sources/Plexswift/models/operations/GetServerPreferencesErrors.swift +++ b/Sources/Plexswift/models/operations/GetServerPreferencesErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetServerPreferencesErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetServerPreferencesErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetServerPreferencesErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetServerPreferencesErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesMediaContainer.swift b/Sources/Plexswift/models/operations/GetServerPreferencesMediaContainer.swift index 9a5f2e0..9d71277 100644 --- a/Sources/Plexswift/models/operations/GetServerPreferencesMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetServerPreferencesMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.setting = setting self.size = size } - } -} + }} extension Operations.GetServerPreferencesMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesResponse.swift b/Sources/Plexswift/models/operations/GetServerPreferencesResponse.swift index a65409c..57fcad2 100644 --- a/Sources/Plexswift/models/operations/GetServerPreferencesResponse.swift +++ b/Sources/Plexswift/models/operations/GetServerPreferencesResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetServerPreferencesResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetServerPreferencesResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetServerPreferencesServerResponseBody) + case badRequest(Operations.GetServerPreferencesBadRequest) + case object(Operations.GetServerPreferencesResponseBody) + case unauthorized(Operations.GetServerPreferencesUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetServerPreferencesResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetServerPreferencesBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetServerPreferencesServerResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetServerPreferencesResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetServerPreferencesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesResponseBody.swift b/Sources/Plexswift/models/operations/GetServerPreferencesResponseBody.swift index 1c3f1ad..d9b9c83 100644 --- a/Sources/Plexswift/models/operations/GetServerPreferencesResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetServerPreferencesResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetServerPreferencesMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetServerPreferencesResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesServerErrors.swift b/Sources/Plexswift/models/operations/GetServerPreferencesServerErrors.swift new file mode 100644 index 0000000..3a11264 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerPreferencesServerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetServerPreferencesServerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetServerPreferencesServerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerPreferencesUnauthorized.swift b/Sources/Plexswift/models/operations/GetServerPreferencesUnauthorized.swift new file mode 100644 index 0000000..d75f5ae --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerPreferencesUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetServerPreferencesUnauthorized { + public let errors: [Operations.GetServerPreferencesServerErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetServerPreferencesServerErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerPreferencesUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerResourcesBadRequest.swift b/Sources/Plexswift/models/operations/GetServerResourcesBadRequest.swift new file mode 100644 index 0000000..705fa43 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerResourcesBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetServerResourcesBadRequest { + public let errors: [Operations.GetServerResourcesErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetServerResourcesErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerResourcesBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerResourcesErrors.swift b/Sources/Plexswift/models/operations/GetServerResourcesErrors.swift new file mode 100644 index 0000000..d0ba71e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerResourcesErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetServerResourcesErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetServerResourcesErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerResourcesPlexErrors.swift b/Sources/Plexswift/models/operations/GetServerResourcesPlexErrors.swift new file mode 100644 index 0000000..ecdb86c --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerResourcesPlexErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetServerResourcesPlexErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetServerResourcesPlexErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetServerResourcesRequest.swift b/Sources/Plexswift/models/operations/GetServerResourcesRequest.swift new file mode 100644 index 0000000..70cc0f4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerResourcesRequest.swift @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetServerResourcesRequest: APIValue { + /// Include Https entries in the results + public let includeHttps: Operations.IncludeHttps? + /// Include IPv6 entries in the results + public let includeIPv6: Operations.IncludeIPv6? + /// Include Relay addresses in the results + /// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + /// + public let includeRelay: Operations.IncludeRelay? + /// 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 let xPlexClientIdentifier: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter includeHttps: Include Https entries in the results + /// - Parameter includeIPv6: Include IPv6 entries in the results + /// - Parameter includeRelay: Include Relay addresses in the results + /// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + /// + /// - Parameter 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) + /// + /// + public init(includeHttps: Operations.IncludeHttps? = nil, includeIPv6: Operations.IncludeIPv6? = nil, includeRelay: Operations.IncludeRelay? = nil, xPlexClientIdentifier: String? = nil) { + self.includeHttps = includeHttps + self.includeIPv6 = includeIPv6 + self.includeRelay = includeRelay + self.xPlexClientIdentifier = xPlexClientIdentifier + } + }} diff --git a/Sources/Plexswift/models/operations/GetServerResourcesResponse.swift b/Sources/Plexswift/models/operations/GetServerResourcesResponse.swift new file mode 100644 index 0000000..6745b53 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerResourcesResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetServerResourcesResponse { + case empty + case badRequest(Operations.GetServerResourcesBadRequest) + case plexDevices([Operations.PlexDevice]) + case unauthorized(Operations.GetServerResourcesUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetServerResourcesBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func plexDevices() throws -> [Operations.PlexDevice] { + guard case .plexDevices(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetServerResourcesUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetServerResourcesUnauthorized.swift b/Sources/Plexswift/models/operations/GetServerResourcesUnauthorized.swift new file mode 100644 index 0000000..12ffe79 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetServerResourcesUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetServerResourcesUnauthorized { + public let errors: [Operations.GetServerResourcesPlexErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetServerResourcesPlexErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetServerResourcesUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryBadRequest.swift b/Sources/Plexswift/models/operations/GetSessionHistoryBadRequest.swift new file mode 100644 index 0000000..2f9c78e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSessionHistoryBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetSessionHistoryBadRequest { + public let errors: [Operations.GetSessionHistoryErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetSessionHistoryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSessionHistoryBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift b/Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift index 8105ba3..dcd08c7 100644 --- a/Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift +++ b/Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetSessionHistoryErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetSessionHistoryErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetSessionHistoryErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetSessionHistoryErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift b/Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift index c7d425a..054b7cd 100644 --- a/Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} extension Operations.GetSessionHistoryMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift b/Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift index a9779ba..475979b 100644 --- a/Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift +++ b/Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -50,8 +50,7 @@ extension Operations { self.type = type self.viewedAt = viewedAt } - } -} + }} extension Operations.GetSessionHistoryMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryRequest.swift b/Sources/Plexswift/models/operations/GetSessionHistoryRequest.swift index 90dadc6..eed1d14 100644 --- a/Sources/Plexswift/models/operations/GetSessionHistoryRequest.swift +++ b/Sources/Plexswift/models/operations/GetSessionHistoryRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -11,7 +11,7 @@ extension Operations { /// Filters content by field and direction/equality /// (Unknown if viewedAt is the only supported column) /// - public let filter: Operations.Filter? + public let filter: Operations.QueryParamFilter? /// Filters the results based on the id of a valid library section /// public let librarySectionID: Int? @@ -31,11 +31,10 @@ extension Operations { /// - Parameter sort: Sorts the results by the specified field followed by the direction (asc, desc) /// /// - public init(accountId: Int? = nil, filter: Operations.Filter? = nil, librarySectionID: Int? = nil, sort: String? = nil) { + public init(accountId: Int? = nil, filter: Operations.QueryParamFilter? = nil, librarySectionID: Int? = nil, sort: String? = nil) { self.accountId = accountId self.filter = filter self.librarySectionID = librarySectionID self.sort = sort } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift b/Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift index 68b1160..d1472ee 100644 --- a/Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift +++ b/Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetSessionHistoryResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetSessionHistoryResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetSessionHistorySessionsResponseBody) + case badRequest(Operations.GetSessionHistoryBadRequest) + case object(Operations.GetSessionHistoryResponseBody) + case unauthorized(Operations.GetSessionHistoryUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetSessionHistoryResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetSessionHistoryBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetSessionHistorySessionsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetSessionHistoryResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetSessionHistoryUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift b/Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift index d1f5a1d..fd0e76f 100644 --- a/Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetSessionHistoryMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetSessionHistoryResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionHistorySessionsErrors.swift b/Sources/Plexswift/models/operations/GetSessionHistorySessionsErrors.swift new file mode 100644 index 0000000..6fa9635 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSessionHistorySessionsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetSessionHistorySessionsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetSessionHistorySessionsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetSessionHistorySessionsResponseBody.swift b/Sources/Plexswift/models/operations/GetSessionHistorySessionsResponseBody.swift deleted file mode 100644 index 032a33b..0000000 --- a/Sources/Plexswift/models/operations/GetSessionHistorySessionsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetSessionHistorySessionsResponseBody { - public let errors: [Operations.GetSessionHistoryErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetSessionHistoryErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetSessionHistorySessionsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetSessionHistoryUnauthorized.swift b/Sources/Plexswift/models/operations/GetSessionHistoryUnauthorized.swift new file mode 100644 index 0000000..9f485e8 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSessionHistoryUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetSessionHistoryUnauthorized { + public let errors: [Operations.GetSessionHistorySessionsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetSessionHistorySessionsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSessionHistoryUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSessionsBadRequest.swift b/Sources/Plexswift/models/operations/GetSessionsBadRequest.swift new file mode 100644 index 0000000..bc66e91 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSessionsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetSessionsBadRequest { + public let errors: [Operations.GetSessionsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetSessionsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSessionsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSessionsErrors.swift b/Sources/Plexswift/models/operations/GetSessionsErrors.swift index 4b2088d..93cb6de 100644 --- a/Sources/Plexswift/models/operations/GetSessionsErrors.swift +++ b/Sources/Plexswift/models/operations/GetSessionsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetSessionsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetSessionsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetSessionsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetSessionsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetSessionsMedia.swift b/Sources/Plexswift/models/operations/GetSessionsMedia.swift index 9e06fa8..c9e6240 100644 --- a/Sources/Plexswift/models/operations/GetSessionsMedia.swift +++ b/Sources/Plexswift/models/operations/GetSessionsMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -27,8 +27,7 @@ extension Operations { self.part = part self.selected = selected } - } -} + }} extension Operations.GetSessionsMedia: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionsMediaContainer.swift b/Sources/Plexswift/models/operations/GetSessionsMediaContainer.swift index 5e4313f..d355cfa 100644 --- a/Sources/Plexswift/models/operations/GetSessionsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetSessionsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} extension Operations.GetSessionsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionsMetadata.swift b/Sources/Plexswift/models/operations/GetSessionsMetadata.swift index 0c797da..be6e29e 100644 --- a/Sources/Plexswift/models/operations/GetSessionsMetadata.swift +++ b/Sources/Plexswift/models/operations/GetSessionsMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -85,8 +85,7 @@ extension Operations { self.user = user self.viewOffset = viewOffset } - } -} + }} extension Operations.GetSessionsMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionsPart.swift b/Sources/Plexswift/models/operations/GetSessionsPart.swift index b333199..a67dbc9 100644 --- a/Sources/Plexswift/models/operations/GetSessionsPart.swift +++ b/Sources/Plexswift/models/operations/GetSessionsPart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -31,8 +31,7 @@ extension Operations { self.size = size self.stream = stream } - } -} + }} extension Operations.GetSessionsPart: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionsResponse.swift b/Sources/Plexswift/models/operations/GetSessionsResponse.swift index f37e435..1769076 100644 --- a/Sources/Plexswift/models/operations/GetSessionsResponse.swift +++ b/Sources/Plexswift/models/operations/GetSessionsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetSessionsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetSessionsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetSessionsSessionsResponseBody) + case badRequest(Operations.GetSessionsBadRequest) + case object(Operations.GetSessionsResponseBody) + case unauthorized(Operations.GetSessionsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetSessionsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetSessionsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetSessionsSessionsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetSessionsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetSessionsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetSessionsResponseBody.swift b/Sources/Plexswift/models/operations/GetSessionsResponseBody.swift index a775bd5..cd61492 100644 --- a/Sources/Plexswift/models/operations/GetSessionsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetSessionsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetSessionsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetSessionsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSessionsSessionsErrors.swift b/Sources/Plexswift/models/operations/GetSessionsSessionsErrors.swift new file mode 100644 index 0000000..7c4ba8d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSessionsSessionsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetSessionsSessionsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetSessionsSessionsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetSessionsSessionsResponseBody.swift b/Sources/Plexswift/models/operations/GetSessionsSessionsResponseBody.swift deleted file mode 100644 index b2abe63..0000000 --- a/Sources/Plexswift/models/operations/GetSessionsSessionsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetSessionsSessionsResponseBody { - public let errors: [Operations.GetSessionsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetSessionsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetSessionsSessionsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetSessionsStream.swift b/Sources/Plexswift/models/operations/GetSessionsStream.swift index 7149b96..7b75c58 100644 --- a/Sources/Plexswift/models/operations/GetSessionsStream.swift +++ b/Sources/Plexswift/models/operations/GetSessionsStream.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -51,8 +51,7 @@ extension Operations { self.selected = selected self.streamType = streamType } - } -} + }} extension Operations.GetSessionsStream: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetDevicesServerResponseBody.swift b/Sources/Plexswift/models/operations/GetSessionsUnauthorized.swift similarity index 50% rename from Sources/Plexswift/models/operations/GetDevicesServerResponseBody.swift rename to Sources/Plexswift/models/operations/GetSessionsUnauthorized.swift index 861eb37..681f9a0 100644 --- a/Sources/Plexswift/models/operations/GetDevicesServerResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetSessionsUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetDevicesServerResponseBody { - public let errors: [Operations.GetDevicesErrors]? + public struct GetSessionsUnauthorized { + public let errors: [Operations.GetSessionsSessionsErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetDevicesErrors]? = nil) { + public init(errors: [Operations.GetSessionsSessionsErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetDevicesServerResponseBody: Codable { +extension Operations.GetSessionsUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetSessionsUser.swift b/Sources/Plexswift/models/operations/GetSessionsUser.swift index 47c011a..057c2ea 100644 --- a/Sources/Plexswift/models/operations/GetSessionsUser.swift +++ b/Sources/Plexswift/models/operations/GetSessionsUser.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -17,8 +17,7 @@ extension Operations { self.thumb = thumb self.title = title } - } -} + }} extension Operations.GetSessionsUser: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetSourceConnectionInformationAuthenticationErrors.swift b/Sources/Plexswift/models/operations/GetSourceConnectionInformationAuthenticationErrors.swift new file mode 100644 index 0000000..c1a0b10 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSourceConnectionInformationAuthenticationErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetSourceConnectionInformationAuthenticationErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetSourceConnectionInformationAuthenticationErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetSourceConnectionInformationBadRequest.swift b/Sources/Plexswift/models/operations/GetSourceConnectionInformationBadRequest.swift new file mode 100644 index 0000000..86a234d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetSourceConnectionInformationBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetSourceConnectionInformationBadRequest { + public let errors: [Operations.GetSourceConnectionInformationErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetSourceConnectionInformationErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetSourceConnectionInformationBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift b/Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift index b77a12d..25bb00b 100644 --- a/Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift +++ b/Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetSourceConnectionInformationErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetSourceConnectionInformationErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetSourceConnectionInformationErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetSourceConnectionInformationErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift b/Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift index 4a7e7a6..c0bd27e 100644 --- a/Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift +++ b/Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,5 +15,4 @@ extension Operations { public init(source: String) { self.source = source } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetSourceConnectionInformationResponse.swift b/Sources/Plexswift/models/operations/GetSourceConnectionInformationResponse.swift index 6cec0aa..6a539c6 100644 --- a/Sources/Plexswift/models/operations/GetSourceConnectionInformationResponse.swift +++ b/Sources/Plexswift/models/operations/GetSourceConnectionInformationResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum GetSourceConnectionInformationResponse { case empty - case object(Operations.GetSourceConnectionInformationResponseBody) + case badRequest(Operations.GetSourceConnectionInformationBadRequest) + case unauthorized(Operations.GetSourceConnectionInformationUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.GetSourceConnectionInformationResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.GetSourceConnectionInformationBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetSourceConnectionInformationUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetSourceConnectionInformationResponseBody.swift b/Sources/Plexswift/models/operations/GetSourceConnectionInformationUnauthorized.swift similarity index 63% rename from Sources/Plexswift/models/operations/GetSourceConnectionInformationResponseBody.swift rename to Sources/Plexswift/models/operations/GetSourceConnectionInformationUnauthorized.swift index 706d652..6bf28d4 100644 --- a/Sources/Plexswift/models/operations/GetSourceConnectionInformationResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetSourceConnectionInformationUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetSourceConnectionInformationResponseBody { - public let errors: [Operations.GetSourceConnectionInformationErrors]? + public struct GetSourceConnectionInformationUnauthorized { + public let errors: [Operations.GetSourceConnectionInformationAuthenticationErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetSourceConnectionInformationErrors]? = nil) { + public init(errors: [Operations.GetSourceConnectionInformationAuthenticationErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetSourceConnectionInformationResponseBody: Codable { +extension Operations.GetSourceConnectionInformationUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetStatisticsBadRequest.swift b/Sources/Plexswift/models/operations/GetStatisticsBadRequest.swift new file mode 100644 index 0000000..9fb0cce --- /dev/null +++ b/Sources/Plexswift/models/operations/GetStatisticsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetStatisticsBadRequest { + public let errors: [Operations.GetStatisticsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetStatisticsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetStatisticsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetStatisticsDevice.swift b/Sources/Plexswift/models/operations/GetStatisticsDevice.swift index ec5ba22..f045b2e 100644 --- a/Sources/Plexswift/models/operations/GetStatisticsDevice.swift +++ b/Sources/Plexswift/models/operations/GetStatisticsDevice.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -21,8 +21,7 @@ extension Operations { self.name = name self.platform = platform } - } -} + }} extension Operations.GetStatisticsDevice: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetStatisticsErrors.swift b/Sources/Plexswift/models/operations/GetStatisticsErrors.swift index ec6380b..2ebeb82 100644 --- a/Sources/Plexswift/models/operations/GetStatisticsErrors.swift +++ b/Sources/Plexswift/models/operations/GetStatisticsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetStatisticsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetStatisticsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetStatisticsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetStatisticsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetStatisticsMediaContainer.swift b/Sources/Plexswift/models/operations/GetStatisticsMediaContainer.swift index c07edc8..3adfc3a 100644 --- a/Sources/Plexswift/models/operations/GetStatisticsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetStatisticsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,8 +19,7 @@ extension Operations { self.size = size self.statisticsMedia = statisticsMedia } - } -} + }} extension Operations.GetStatisticsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetStatisticsRequest.swift b/Sources/Plexswift/models/operations/GetStatisticsRequest.swift index 061fbab..1de4b57 100644 --- a/Sources/Plexswift/models/operations/GetStatisticsRequest.swift +++ b/Sources/Plexswift/models/operations/GetStatisticsRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,5 +19,4 @@ extension Operations { public init(timespan: Int? = nil) { self.timespan = timespan } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetStatisticsResponse.swift b/Sources/Plexswift/models/operations/GetStatisticsResponse.swift index 3d21a2a..86941c1 100644 --- a/Sources/Plexswift/models/operations/GetStatisticsResponse.swift +++ b/Sources/Plexswift/models/operations/GetStatisticsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetStatisticsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetStatisticsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetStatisticsStatisticsResponseBody) + case badRequest(Operations.GetStatisticsBadRequest) + case object(Operations.GetStatisticsResponseBody) + case unauthorized(Operations.GetStatisticsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetStatisticsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetStatisticsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetStatisticsStatisticsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetStatisticsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetStatisticsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetStatisticsResponseBody.swift b/Sources/Plexswift/models/operations/GetStatisticsResponseBody.swift index ccbd3c2..a722d43 100644 --- a/Sources/Plexswift/models/operations/GetStatisticsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetStatisticsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetStatisticsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetStatisticsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetStatisticsStatisticsErrors.swift b/Sources/Plexswift/models/operations/GetStatisticsStatisticsErrors.swift new file mode 100644 index 0000000..3860158 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetStatisticsStatisticsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetStatisticsStatisticsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetStatisticsStatisticsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetStatisticsStatisticsResponseBody.swift b/Sources/Plexswift/models/operations/GetStatisticsStatisticsResponseBody.swift deleted file mode 100644 index 5381dab..0000000 --- a/Sources/Plexswift/models/operations/GetStatisticsStatisticsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetStatisticsStatisticsResponseBody { - public let errors: [Operations.GetStatisticsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetStatisticsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetStatisticsStatisticsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetStatisticsUnauthorized.swift b/Sources/Plexswift/models/operations/GetStatisticsUnauthorized.swift new file mode 100644 index 0000000..cd5aa18 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetStatisticsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetStatisticsUnauthorized { + public let errors: [Operations.GetStatisticsStatisticsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetStatisticsStatisticsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetStatisticsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetThumbImageBadRequest.swift b/Sources/Plexswift/models/operations/GetThumbImageBadRequest.swift new file mode 100644 index 0000000..eee0fac --- /dev/null +++ b/Sources/Plexswift/models/operations/GetThumbImageBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetThumbImageBadRequest { + public let errors: [Operations.GetThumbImageErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetThumbImageErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetThumbImageBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetThumbImageErrors.swift b/Sources/Plexswift/models/operations/GetThumbImageErrors.swift new file mode 100644 index 0000000..ae08c75 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetThumbImageErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetThumbImageErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetThumbImageErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetThumbImageMediaErrors.swift b/Sources/Plexswift/models/operations/GetThumbImageMediaErrors.swift new file mode 100644 index 0000000..a1ad467 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetThumbImageMediaErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetThumbImageMediaErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetThumbImageMediaErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetThumbImageRequest.swift b/Sources/Plexswift/models/operations/GetThumbImageRequest.swift new file mode 100644 index 0000000..ef6bf13 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetThumbImageRequest.swift @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetThumbImageRequest: APIValue { + public let height: Int + public let minSize: Int + /// the id of the library item to return the children of. + public let ratingKey: Int + public let upscale: Int + public let width: Int + /// Plex Authentication Token + public let xPlexToken: String + + /// Creates an object with the specified parameters + /// + /// - Parameter ratingKey: the id of the library item to return the children of. + /// - Parameter xPlexToken: Plex Authentication Token + /// + public init(height: Int, minSize: Int, ratingKey: Int, upscale: Int, width: Int, xPlexToken: String) { + self.height = height + self.minSize = minSize + self.ratingKey = ratingKey + self.upscale = upscale + self.width = width + self.xPlexToken = xPlexToken + } + }} diff --git a/Sources/Plexswift/models/operations/GetThumbImageResponse.swift b/Sources/Plexswift/models/operations/GetThumbImageResponse.swift new file mode 100644 index 0000000..f680e66 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetThumbImageResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetThumbImageResponse { + case empty + case badRequest(Operations.GetThumbImageBadRequest) + case bytes(Data) + case unauthorized(Operations.GetThumbImageUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetThumbImageBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func bytes() throws -> Data { + guard case .bytes(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetThumbImageUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetThumbImageUnauthorized.swift b/Sources/Plexswift/models/operations/GetThumbImageUnauthorized.swift new file mode 100644 index 0000000..b161ff7 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetThumbImageUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetThumbImageUnauthorized { + public let errors: [Operations.GetThumbImageMediaErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetThumbImageMediaErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetThumbImageUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTimelineBadRequest.swift b/Sources/Plexswift/models/operations/GetTimelineBadRequest.swift new file mode 100644 index 0000000..5fdfdde --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTimelineBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetTimelineBadRequest { + public let errors: [Operations.GetTimelineErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetTimelineErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTimelineBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTimelineErrors.swift b/Sources/Plexswift/models/operations/GetTimelineErrors.swift index c213d45..d91da7d 100644 --- a/Sources/Plexswift/models/operations/GetTimelineErrors.swift +++ b/Sources/Plexswift/models/operations/GetTimelineErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetTimelineErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetTimelineErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetTimelineErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetTimelineErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetTimelineRequest.swift b/Sources/Plexswift/models/operations/GetTimelineRequest.swift index 9e93abb..b71f579 100644 --- a/Sources/Plexswift/models/operations/GetTimelineRequest.swift +++ b/Sources/Plexswift/models/operations/GetTimelineRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -58,8 +58,7 @@ extension Operations { self.state = state self._time = DecimalSerialized(wrappedValue: time) } - } -} + }} extension Operations.GetTimelineRequest { var ratingKeyWrapper: DecimalSerialized { return _ratingKey diff --git a/Sources/Plexswift/models/operations/GetTimelineResponse.swift b/Sources/Plexswift/models/operations/GetTimelineResponse.swift index a42b52c..bcc9a97 100644 --- a/Sources/Plexswift/models/operations/GetTimelineResponse.swift +++ b/Sources/Plexswift/models/operations/GetTimelineResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum GetTimelineResponse { case empty - case object(Operations.GetTimelineResponseBody) + case badRequest(Operations.GetTimelineBadRequest) + case unauthorized(Operations.GetTimelineUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.GetTimelineResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.GetTimelineBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetTimelineUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetOnDeckLibraryResponseBody.swift b/Sources/Plexswift/models/operations/GetTimelineUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/GetOnDeckLibraryResponseBody.swift rename to Sources/Plexswift/models/operations/GetTimelineUnauthorized.swift index de90087..511c425 100644 --- a/Sources/Plexswift/models/operations/GetOnDeckLibraryResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetTimelineUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetOnDeckLibraryResponseBody { - public let errors: [Operations.GetOnDeckErrors]? + public struct GetTimelineUnauthorized { + public let errors: [Operations.GetTimelineVideoErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetOnDeckErrors]? = nil) { + public init(errors: [Operations.GetTimelineVideoErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetOnDeckLibraryResponseBody: Codable { +extension Operations.GetTimelineUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/GetTimelineVideoErrors.swift b/Sources/Plexswift/models/operations/GetTimelineVideoErrors.swift new file mode 100644 index 0000000..4f897b5 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTimelineVideoErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTimelineVideoErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTimelineVideoErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenByPinIdAuthPinContainer.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdAuthPinContainer.swift new file mode 100644 index 0000000..561e623 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdAuthPinContainer.swift @@ -0,0 +1,104 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The Pin with a non-null authToken when it has been verified by the user + public struct GetTokenByPinIdAuthPinContainer { + /// The X-Client-Identifier used in the request + public let clientIdentifier: String + public let code: String + @DateTime + public private(set) var createdAt: Date + @DateTime + public private(set) var expiresAt: Date + /// The number of seconds this pin expires, by default 900 seconds + public let expiresIn: Int + public let id: Int + /// Geo location data + public let location: Operations.GetTokenByPinIdGeoData + public let product: String + public let qr: String + public let trusted: Bool + public let authToken: AnyValue? + public let newRegistration: AnyValue? + + /// Creates an object with the specified parameters + /// + /// - Parameter clientIdentifier: The X-Client-Identifier used in the request + /// - Parameter expiresIn: The number of seconds this pin expires, by default 900 seconds + /// - Parameter location: Geo location data + /// + public init(clientIdentifier: String, code: String, createdAt: Date, expiresAt: Date, expiresIn: Int, id: Int, location: Operations.GetTokenByPinIdGeoData, product: String, qr: String, trusted: Bool, authToken: AnyValue? = nil, newRegistration: AnyValue? = nil) { + self.clientIdentifier = clientIdentifier + self.code = code + self._createdAt = DateTime(wrappedValue: createdAt) + self._expiresAt = DateTime(wrappedValue: expiresAt) + self.expiresIn = expiresIn + self.id = id + self.location = location + self.product = product + self.qr = qr + self.trusted = trusted + self.authToken = authToken + self.newRegistration = newRegistration + } + }} + +extension Operations.GetTokenByPinIdAuthPinContainer: Codable { + enum CodingKeys: String, CodingKey { + case clientIdentifier + case code + case createdAt + case expiresAt + case expiresIn + case id + case location + case product + case qr + case trusted + case authToken + case newRegistration + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.clientIdentifier = try container.decode(String.self, forKey: .clientIdentifier) + self.code = try container.decode(String.self, forKey: .code) + self._createdAt = try container.decode(DateTime.self, forKey: .createdAt) + self._expiresAt = try container.decode(DateTime.self, forKey: .expiresAt) + self.expiresIn = try container.decode(Int.self, forKey: .expiresIn) + self.id = try container.decode(Int.self, forKey: .id) + self.location = try container.decode(Operations.GetTokenByPinIdGeoData.self, forKey: .location) + self.product = try container.decode(String.self, forKey: .product) + self.qr = try container.decode(String.self, forKey: .qr) + self.trusted = try container.decode(Bool.self, forKey: .trusted) + self.authToken = try container.decodeIfPresent(AnyValue.self, forKey: .authToken) + self.newRegistration = try container.decodeIfPresent(AnyValue.self, forKey: .newRegistration) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.clientIdentifier, forKey: .clientIdentifier) + try container.encode(self.code, forKey: .code) + try container.encode(self._createdAt, forKey: .createdAt) + try container.encode(self._expiresAt, forKey: .expiresAt) + try container.encode(self.expiresIn, forKey: .expiresIn) + try container.encode(self.id, forKey: .id) + try container.encode(self.location, forKey: .location) + try container.encode(self.product, forKey: .product) + try container.encode(self.qr, forKey: .qr) + try container.encode(self.trusted, forKey: .trusted) + try container.encodeIfPresent(self.authToken, forKey: .authToken) + try container.encodeIfPresent(self.newRegistration, forKey: .newRegistration) + } +} + +extension Operations.GetTokenByPinIdAuthPinContainer { + var createdAtWrapper: DateTime { + return _createdAt + } + var expiresAtWrapper: DateTime { + return _expiresAt + } +} diff --git a/Sources/Plexswift/models/operations/GetTokenByPinIdBadRequest.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdBadRequest.swift new file mode 100644 index 0000000..b128a77 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetTokenByPinIdBadRequest { + public let errors: [Operations.GetTokenByPinIdErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetTokenByPinIdErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTokenByPinIdBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenByPinIdErrors.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdErrors.swift new file mode 100644 index 0000000..842ef27 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTokenByPinIdErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTokenByPinIdErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenByPinIdGeoData.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdGeoData.swift new file mode 100644 index 0000000..946c5a5 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdGeoData.swift @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Geo location data + public struct GetTokenByPinIdGeoData { + /// The name of the city. + public let city: String + /// The ISO 3166-1 alpha-2 code of the country. + public let code: String + /// The continent code where the country is located. + public let continentCode: String + /// The geographical coordinates (latitude, longitude) of the location. + public let coordinates: String + /// The official name of the country. + public let country: String + /// Indicates if the country is a member of the European Union. + public let europeanUnionMember: Bool + /// Indicates if the country has privacy restrictions. + public let inPrivacyRestrictedCountry: Bool + /// Indicates if the region has privacy restrictions. + public let inPrivacyRestrictedRegion: Bool + /// The postal code of the location. + public let postalCode: Int + /// The name of the primary administrative subdivision. + public let subdivisions: String + /// The time zone of the country. + public let timeZone: String + + /// Creates an object with the specified parameters + /// + /// - Parameter city: The name of the city. + /// - Parameter code: The ISO 3166-1 alpha-2 code of the country. + /// - Parameter continentCode: The continent code where the country is located. + /// - Parameter coordinates: The geographical coordinates (latitude, longitude) of the location. + /// - Parameter country: The official name of the country. + /// - Parameter europeanUnionMember: Indicates if the country is a member of the European Union. + /// - Parameter inPrivacyRestrictedCountry: Indicates if the country has privacy restrictions. + /// - Parameter inPrivacyRestrictedRegion: Indicates if the region has privacy restrictions. + /// - Parameter postalCode: The postal code of the location. + /// - Parameter subdivisions: The name of the primary administrative subdivision. + /// - Parameter timeZone: The time zone of the country. + /// + public init(city: String, code: String, continentCode: String, coordinates: String, country: String, europeanUnionMember: Bool, inPrivacyRestrictedCountry: Bool, inPrivacyRestrictedRegion: Bool, postalCode: Int, subdivisions: String, timeZone: String) { + self.city = city + self.code = code + self.continentCode = continentCode + self.coordinates = coordinates + self.country = country + self.europeanUnionMember = europeanUnionMember + self.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry + self.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion + self.postalCode = postalCode + self.subdivisions = subdivisions + self.timeZone = timeZone + } + }} + +extension Operations.GetTokenByPinIdGeoData: Codable { + enum CodingKeys: String, CodingKey { + case city + case code + case continentCode = "continent_code" + case coordinates + case country + case europeanUnionMember = "european_union_member" + case inPrivacyRestrictedCountry = "in_privacy_restricted_country" + case inPrivacyRestrictedRegion = "in_privacy_restricted_region" + case postalCode = "postal_code" + case subdivisions + case timeZone = "time_zone" + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenByPinIdPlexErrors.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdPlexErrors.swift new file mode 100644 index 0000000..7fdd1af --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdPlexErrors.swift @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTokenByPinIdPlexErrors { + public let code: Int? + public let message: String? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil) { + self.code = code + self.message = message + } + }} + +extension Operations.GetTokenByPinIdPlexErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenRequest.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdRequest.swift similarity index 79% rename from Sources/Plexswift/models/operations/GetTokenRequest.swift rename to Sources/Plexswift/models/operations/GetTokenByPinIdRequest.swift index 90d951c..0aa2c69 100644 --- a/Sources/Plexswift/models/operations/GetTokenRequest.swift +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdRequest.swift @@ -1,12 +1,12 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetTokenRequest: APIValue { + public struct GetTokenByPinIdRequest: APIValue { /// The PinID to retrieve an access token for - public let pinID: String + public let pinID: Int /// 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) @@ -21,9 +21,8 @@ extension Operations { /// (UUID, serial number, or other number unique per device) /// /// - public init(pinID: String, xPlexClientIdentifier: String? = nil) { + public init(pinID: Int, xPlexClientIdentifier: String? = nil) { self.pinID = pinID self.xPlexClientIdentifier = xPlexClientIdentifier } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetTokenByPinIdResponse.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdResponse.swift new file mode 100644 index 0000000..5c49d33 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetTokenByPinIdResponse { + case empty + case authPinContainer(Operations.GetTokenByPinIdAuthPinContainer) + case badRequest(Operations.GetTokenByPinIdBadRequest) + case object(Operations.GetTokenByPinIdResponseBody) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func authPinContainer() throws -> Operations.GetTokenByPinIdAuthPinContainer { + guard case .authPinContainer(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func badRequest() throws -> Operations.GetTokenByPinIdBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetTokenByPinIdResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetTokenByPinIdResponseBody.swift b/Sources/Plexswift/models/operations/GetTokenByPinIdResponseBody.swift new file mode 100644 index 0000000..3297597 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenByPinIdResponseBody.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Not Found or Expired + public struct GetTokenByPinIdResponseBody { + public let errors: [Operations.GetTokenByPinIdPlexErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetTokenByPinIdPlexErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTokenByPinIdResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationErrors.swift b/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationErrors.swift new file mode 100644 index 0000000..48fa2cb --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTokenDetailsAuthenticationErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTokenDetailsAuthenticationErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationResponseStatus.swift b/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationResponseStatus.swift new file mode 100644 index 0000000..4489445 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationResponseStatus.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// String representation of subscriptionActive + public enum GetTokenDetailsAuthenticationResponseStatus: String, Codable, APIValue { + case inactive = "Inactive" + case active = "Active" + }} diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationStatus.swift b/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationStatus.swift new file mode 100644 index 0000000..35c6b3e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsAuthenticationStatus.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// String representation of subscriptionActive + public enum GetTokenDetailsAuthenticationStatus: String, Codable, APIValue { + case inactive = "Inactive" + case active = "Active" + }} diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsBadRequest.swift b/Sources/Plexswift/models/operations/GetTokenDetailsBadRequest.swift new file mode 100644 index 0000000..0c94ca4 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetTokenDetailsBadRequest { + public let errors: [Operations.GetTokenDetailsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetTokenDetailsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTokenDetailsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsErrors.swift b/Sources/Plexswift/models/operations/GetTokenDetailsErrors.swift new file mode 100644 index 0000000..cab91b7 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTokenDetailsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTokenDetailsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsFeatures.swift b/Sources/Plexswift/models/operations/GetTokenDetailsFeatures.swift new file mode 100644 index 0000000..f8c8afb --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsFeatures.swift @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum GetTokenDetailsFeatures: String, Codable, APIValue { + case androidDolbyVision = "Android - Dolby Vision" + case androidPiP = "Android - PiP" + case cuSunset = "CU Sunset" + case hrkEnableEur = "HRK_enable_EUR" + case trebleShowFeatures = "TREBLE-show-features" + case adCountdownTimer = "ad-countdown-timer" + case adaptiveBitrate = "adaptive_bitrate" + case amazonLoopDebug = "amazon-loop-debug" + case avodAdAnalysis = "avod-ad-analysis" + case avodNewMedia = "avod-new-media" + case blacklistGetSignin = "blacklist_get_signin" + case clientRadioStations = "client-radio-stations" + case cloudflareTurnstileRequired = "cloudflare-turnstile-required" + case collections = "collections" + case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications" + case communityAccessPlexTv = "community_access_plex_tv" + case companionsSonos = "companions_sonos" + case customHomeRemoval = "custom-home-removal" + case disableHomeUserFriendships = "disable_home_user_friendships" + case disableSharingFriendships = "disable_sharing_friendships" + case drmSupport = "drm_support" + case excludeRestrictions = "exclude restrictions" + case federatedAuth = "federated-auth" + case friendRequestPushNotifications = "friend_request_push_notifications" + case guidedUpgrade = "guided-upgrade" + case home = "home" + case increasePasswordComplexity = "increase-password-complexity" + case ios14PrivacyBanner = "ios14-privacy-banner" + case iterableNotificationTokens = "iterable-notification-tokens" + case keepPaymentMethod = "keep-payment-method" + case kevinBacon = "kevin-bacon" + case koreaConsent = "korea-consent" + case leIsrgRootX1 = "le_isrg_root_x1" + case letsEncrypt = "lets_encrypt" + case lightningDvrPivot = "lightning-dvr-pivot" + case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments" + case livetv = "livetv" + case metadataSearch = "metadata_search" + case newPlexPassPrices = "new_plex_pass_prices" + case newsProviderSunsetModal = "news-provider-sunset-modal" + case photosFavorites = "photos-favorites" + case photosMetadataEdition = "photos-metadata-edition" + case pmsHealth = "pms_health" + case radio = "radio" + case rateLimitClientToken = "rate-limit-client-token" + case scrobblingServicePlexTv = "scrobbling-service-plex-tv" + case sharedServerNotification = "shared_server_notification" + case sharedSourceNotification = "shared_source_notification" + case signinWithApple = "signin_with_apple" + case springServeAdProvider = "spring_serve_ad_provider" + case transcoderCache = "transcoder_cache" + case tunerSharing = "tuner-sharing" + case twoFactorAuthentication = "two-factor-authentication" + case unsupportedtuners = "unsupportedtuners" + case upgrade3Ds2 = "upgrade-3ds2" + case vodSchema = "vod-schema" + case vodCloudflare = "vod_cloudflare" + case watchTogetherInvite = "watch-together-invite" + case webServerDashboard = "web_server_dashboard" + }} diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsResponse.swift b/Sources/Plexswift/models/operations/GetTokenDetailsResponse.swift new file mode 100644 index 0000000..2fdd832 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetTokenDetailsResponse { + case empty + case badRequest(Operations.GetTokenDetailsBadRequest) + case unauthorized(Operations.GetTokenDetailsUnauthorized) + case userPlexAccount(Operations.GetTokenDetailsUserPlexAccount) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetTokenDetailsBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetTokenDetailsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func userPlexAccount() throws -> Operations.GetTokenDetailsUserPlexAccount { + guard case .userPlexAccount(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsStatus.swift b/Sources/Plexswift/models/operations/GetTokenDetailsStatus.swift new file mode 100644 index 0000000..ab8951b --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsStatus.swift @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum GetTokenDetailsStatus: String, Codable, APIValue { + case online = "online" + case offline = "offline" + }} diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsSubscription.swift b/Sources/Plexswift/models/operations/GetTokenDetailsSubscription.swift new file mode 100644 index 0000000..b40274c --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsSubscription.swift @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTokenDetailsSubscription { + /// If the account's Plex Pass subscription is active + public let active: Bool? + /// List of features allowed on your Plex Pass subscription + public let features: [Operations.GetTokenDetailsFeatures]? + /// Payment service used for your Plex Pass subscription + public let paymentService: String? + /// Name of Plex Pass subscription plan + public let plan: String? + /// String representation of subscriptionActive + public let status: Operations.GetTokenDetailsAuthenticationResponseStatus? + /// Date the account subscribed to Plex Pass + public let subscribedAt: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter active: If the account's Plex Pass subscription is active + /// - Parameter features: List of features allowed on your Plex Pass subscription + /// - Parameter paymentService: Payment service used for your Plex Pass subscription + /// - Parameter plan: Name of Plex Pass subscription plan + /// - Parameter status: String representation of subscriptionActive + /// - Parameter subscribedAt: Date the account subscribed to Plex Pass + /// + public init(active: Bool? = nil, features: [Operations.GetTokenDetailsFeatures]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.GetTokenDetailsAuthenticationResponseStatus? = nil, subscribedAt: String? = nil) { + self.active = active + self.features = features + self.paymentService = paymentService + self.plan = plan + self.status = status + self.subscribedAt = subscribedAt + } + }} + +extension Operations.GetTokenDetailsSubscription: Codable { + enum CodingKeys: String, CodingKey { + case active + case features + case paymentService + case plan + case status + case subscribedAt + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsUnauthorized.swift b/Sources/Plexswift/models/operations/GetTokenDetailsUnauthorized.swift new file mode 100644 index 0000000..6d44bee --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetTokenDetailsUnauthorized { + public let errors: [Operations.GetTokenDetailsAuthenticationErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetTokenDetailsAuthenticationErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTokenDetailsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTokenDetailsUserPlexAccount.swift b/Sources/Plexswift/models/operations/GetTokenDetailsUserPlexAccount.swift new file mode 100644 index 0000000..435672d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTokenDetailsUserPlexAccount.swift @@ -0,0 +1,314 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Logged in user details + public struct GetTokenDetailsUserPlexAccount { + /// Unknown + public let adsConsent: Bool + /// Unknown + @DateTime + public private(set) var adsConsentReminderAt: Date + /// Unknown + @DateTime + public private(set) var adsConsentSetAt: Date + /// Unknown + public let anonymous: Bool + /// The account token + public let authToken: String + /// If the two-factor authentication backup codes have been created + public let backupCodesCreated: Bool + /// If the account has been confirmed + public let confirmed: Bool + /// The account country + public let country: String + /// The account email address + public let email: String + /// If login with email only is enabled + public let emailOnlyAuth: Bool + /// List of devices your allowed to use with this account + public let entitlements: [String] + /// If experimental features are enabled + public let experimentalFeatures: Bool + /// Your account full name + public let friendlyName: String + /// If the account is a Plex Home guest user + public let guest: Bool + /// If the account has a password + public let hasPassword: Bool + /// If the account is a Plex Home user + public let home: Bool + /// If the account is the Plex Home admin + public let homeAdmin: Bool + /// The number of accounts in the Plex Home + public let homeSize: Int + /// The Plex account ID + public let id: Int + /// Unix epoch datetime + public let joinedAt: Int + /// The account locale + public let locale: String + /// If you are subscribed to the Plex newsletter + public let mailingListActive: Bool + /// Your current mailing list status + public let mailingListStatus: Operations.MailingListStatus + /// The maximum number of accounts allowed in the Plex Home + public let maxHomeSize: Int + public let profile: Operations.UserProfile + /// If the account has a Plex Home PIN enabled + public let protected: Bool + /// Unix epoch datetime + public let rememberExpiresAt: Int + /// If the account is a Plex Home managed user + public let restricted: Bool + /// Unknown + public let scrobbleTypes: String + public let services: [Operations.Services] + /// If the account’s Plex Pass subscription is active + public let subscription: Operations.Subscription + /// Description of the Plex Pass subscription + public let subscriptionDescription: String + public let subscriptions: [Operations.GetTokenDetailsSubscription] + /// URL of the account thumbnail + public let thumb: String + /// The title of the account (username or friendly name) + public let title: String + /// If two-factor authentication is enabled + public let twoFactorEnabled: Bool + /// The account username + public let username: String + /// The account UUID + public let uuid: String + /// [Might be removed] The hashed Plex Home PIN + @available(*, deprecated, message: "This will be removed in a future release, please migrate away from it as soon as possible") + public let pin: String? + /// [Might be removed] List of account roles. Plexpass membership listed here + public let roles: [String]? + + /// Creates an object with the specified parameters + /// + /// - Parameter adsConsent: Unknown + /// - Parameter adsConsentReminderAt: Unknown + /// - Parameter adsConsentSetAt: Unknown + /// - Parameter anonymous: Unknown + /// - Parameter authToken: The account token + /// - Parameter backupCodesCreated: If the two-factor authentication backup codes have been created + /// - Parameter confirmed: If the account has been confirmed + /// - Parameter country: The account country + /// - Parameter email: The account email address + /// - Parameter emailOnlyAuth: If login with email only is enabled + /// - Parameter entitlements: List of devices your allowed to use with this account + /// - Parameter experimentalFeatures: If experimental features are enabled + /// - Parameter friendlyName: Your account full name + /// - Parameter guest: If the account is a Plex Home guest user + /// - Parameter hasPassword: If the account has a password + /// - Parameter home: If the account is a Plex Home user + /// - Parameter homeAdmin: If the account is the Plex Home admin + /// - Parameter homeSize: The number of accounts in the Plex Home + /// - Parameter id: The Plex account ID + /// - Parameter joinedAt: Unix epoch datetime + /// - Parameter locale: The account locale + /// - Parameter mailingListActive: If you are subscribed to the Plex newsletter + /// - Parameter mailingListStatus: Your current mailing list status + /// - Parameter maxHomeSize: The maximum number of accounts allowed in the Plex Home + /// - Parameter protected: If the account has a Plex Home PIN enabled + /// - Parameter rememberExpiresAt: Unix epoch datetime + /// - Parameter restricted: If the account is a Plex Home managed user + /// - Parameter scrobbleTypes: Unknown + /// - Parameter subscription: If the account’s Plex Pass subscription is active + /// - Parameter subscriptionDescription: Description of the Plex Pass subscription + /// - Parameter thumb: URL of the account thumbnail + /// - Parameter title: The title of the account (username or friendly name) + /// - Parameter twoFactorEnabled: If two-factor authentication is enabled + /// - Parameter username: The account username + /// - Parameter uuid: The account UUID + /// - Parameter pin: [Might be removed] The hashed Plex Home PIN + /// - Parameter roles: [Might be removed] List of account roles. Plexpass membership listed here + /// + @available(*, deprecated, message: "This initializer uses deprecated fields and will be removed in a future version.") + public init(adsConsent: Bool, adsConsentReminderAt: Date, adsConsentSetAt: Date, anonymous: Bool, authToken: String, backupCodesCreated: Bool, confirmed: Bool, country: String, email: String, emailOnlyAuth: Bool, entitlements: [String], experimentalFeatures: Bool, friendlyName: String, guest: Bool, hasPassword: Bool, home: Bool, homeAdmin: Bool, homeSize: Int, id: Int, joinedAt: Int, locale: String, mailingListActive: Bool, mailingListStatus: Operations.MailingListStatus, maxHomeSize: Int, profile: Operations.UserProfile, protected: Bool, rememberExpiresAt: Int, restricted: Bool, scrobbleTypes: String, services: [Operations.Services], subscription: Operations.Subscription, subscriptionDescription: String, subscriptions: [Operations.GetTokenDetailsSubscription], thumb: String, title: String, twoFactorEnabled: Bool, username: String, uuid: String, pin: String? = nil, roles: [String]? = nil) { + self.adsConsent = adsConsent + self._adsConsentReminderAt = DateTime(wrappedValue: adsConsentReminderAt) + self._adsConsentSetAt = DateTime(wrappedValue: adsConsentSetAt) + self.anonymous = anonymous + self.authToken = authToken + self.backupCodesCreated = backupCodesCreated + self.confirmed = confirmed + self.country = country + self.email = email + self.emailOnlyAuth = emailOnlyAuth + self.entitlements = entitlements + self.experimentalFeatures = experimentalFeatures + self.friendlyName = friendlyName + self.guest = guest + self.hasPassword = hasPassword + self.home = home + self.homeAdmin = homeAdmin + self.homeSize = homeSize + self.id = id + self.joinedAt = joinedAt + self.locale = locale + self.mailingListActive = mailingListActive + self.mailingListStatus = mailingListStatus + self.maxHomeSize = maxHomeSize + self.profile = profile + self.protected = protected + self.rememberExpiresAt = rememberExpiresAt + self.restricted = restricted + self.scrobbleTypes = scrobbleTypes + self.services = services + self.subscription = subscription + self.subscriptionDescription = subscriptionDescription + self.subscriptions = subscriptions + self.thumb = thumb + self.title = title + self.twoFactorEnabled = twoFactorEnabled + self.username = username + self.uuid = uuid + self.pin = pin + self.roles = roles + } + }} + +extension Operations.GetTokenDetailsUserPlexAccount: Codable { + enum CodingKeys: String, CodingKey { + case adsConsent + case adsConsentReminderAt + case adsConsentSetAt + case anonymous + case authToken + case backupCodesCreated + case confirmed + case country + case email + case emailOnlyAuth + case entitlements + case experimentalFeatures + case friendlyName + case guest + case hasPassword + case home + case homeAdmin + case homeSize + case id + case joinedAt + case locale + case mailingListActive + case mailingListStatus + case maxHomeSize + case profile + case protected + case rememberExpiresAt + case restricted + case scrobbleTypes + case services + case subscription + case subscriptionDescription + case subscriptions + case thumb + case title + case twoFactorEnabled + case username + case uuid + case pin + case roles + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.adsConsent = try container.decode(Bool.self, forKey: .adsConsent) + self._adsConsentReminderAt = try container.decode(DateTime.self, forKey: .adsConsentReminderAt) + self._adsConsentSetAt = try container.decode(DateTime.self, forKey: .adsConsentSetAt) + self.anonymous = try container.decode(Bool.self, forKey: .anonymous) + self.authToken = try container.decode(String.self, forKey: .authToken) + self.backupCodesCreated = try container.decode(Bool.self, forKey: .backupCodesCreated) + self.confirmed = try container.decode(Bool.self, forKey: .confirmed) + self.country = try container.decode(String.self, forKey: .country) + self.email = try container.decode(String.self, forKey: .email) + self.emailOnlyAuth = try container.decode(Bool.self, forKey: .emailOnlyAuth) + self.entitlements = try container.decode([String].self, forKey: .entitlements) + self.experimentalFeatures = try container.decode(Bool.self, forKey: .experimentalFeatures) + self.friendlyName = try container.decode(String.self, forKey: .friendlyName) + self.guest = try container.decode(Bool.self, forKey: .guest) + self.hasPassword = try container.decode(Bool.self, forKey: .hasPassword) + self.home = try container.decode(Bool.self, forKey: .home) + self.homeAdmin = try container.decode(Bool.self, forKey: .homeAdmin) + self.homeSize = try container.decode(Int.self, forKey: .homeSize) + self.id = try container.decode(Int.self, forKey: .id) + self.joinedAt = try container.decode(Int.self, forKey: .joinedAt) + self.locale = try container.decode(String.self, forKey: .locale) + self.mailingListActive = try container.decode(Bool.self, forKey: .mailingListActive) + self.mailingListStatus = try container.decode(Operations.MailingListStatus.self, forKey: .mailingListStatus) + self.maxHomeSize = try container.decode(Int.self, forKey: .maxHomeSize) + self.profile = try container.decode(Operations.UserProfile.self, forKey: .profile) + self.protected = try container.decode(Bool.self, forKey: .protected) + self.rememberExpiresAt = try container.decode(Int.self, forKey: .rememberExpiresAt) + self.restricted = try container.decode(Bool.self, forKey: .restricted) + self.scrobbleTypes = try container.decode(String.self, forKey: .scrobbleTypes) + self.services = try container.decode([Operations.Services].self, forKey: .services) + self.subscription = try container.decode(Operations.Subscription.self, forKey: .subscription) + self.subscriptionDescription = try container.decode(String.self, forKey: .subscriptionDescription) + self.subscriptions = try container.decode([Operations.GetTokenDetailsSubscription].self, forKey: .subscriptions) + self.thumb = try container.decode(String.self, forKey: .thumb) + self.title = try container.decode(String.self, forKey: .title) + self.twoFactorEnabled = try container.decode(Bool.self, forKey: .twoFactorEnabled) + self.username = try container.decode(String.self, forKey: .username) + self.uuid = try container.decode(String.self, forKey: .uuid) + self.pin = try container.decodeIfPresent(String.self, forKey: .pin) + self.roles = try container.decodeIfPresent([String].self, forKey: .roles) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.adsConsent, forKey: .adsConsent) + try container.encode(self._adsConsentReminderAt, forKey: .adsConsentReminderAt) + try container.encode(self._adsConsentSetAt, forKey: .adsConsentSetAt) + try container.encode(self.anonymous, forKey: .anonymous) + try container.encode(self.authToken, forKey: .authToken) + try container.encode(self.backupCodesCreated, forKey: .backupCodesCreated) + try container.encode(self.confirmed, forKey: .confirmed) + try container.encode(self.country, forKey: .country) + try container.encode(self.email, forKey: .email) + try container.encode(self.emailOnlyAuth, forKey: .emailOnlyAuth) + try container.encode(self.entitlements, forKey: .entitlements) + try container.encode(self.experimentalFeatures, forKey: .experimentalFeatures) + try container.encode(self.friendlyName, forKey: .friendlyName) + try container.encode(self.guest, forKey: .guest) + try container.encode(self.hasPassword, forKey: .hasPassword) + try container.encode(self.home, forKey: .home) + try container.encode(self.homeAdmin, forKey: .homeAdmin) + try container.encode(self.homeSize, forKey: .homeSize) + try container.encode(self.id, forKey: .id) + try container.encode(self.joinedAt, forKey: .joinedAt) + try container.encode(self.locale, forKey: .locale) + try container.encode(self.mailingListActive, forKey: .mailingListActive) + try container.encode(self.mailingListStatus, forKey: .mailingListStatus) + try container.encode(self.maxHomeSize, forKey: .maxHomeSize) + try container.encode(self.profile, forKey: .profile) + try container.encode(self.protected, forKey: .protected) + try container.encode(self.rememberExpiresAt, forKey: .rememberExpiresAt) + try container.encode(self.restricted, forKey: .restricted) + try container.encode(self.scrobbleTypes, forKey: .scrobbleTypes) + try container.encode(self.services, forKey: .services) + try container.encode(self.subscription, forKey: .subscription) + try container.encode(self.subscriptionDescription, forKey: .subscriptionDescription) + try container.encode(self.subscriptions, forKey: .subscriptions) + try container.encode(self.thumb, forKey: .thumb) + try container.encode(self.title, forKey: .title) + try container.encode(self.twoFactorEnabled, forKey: .twoFactorEnabled) + try container.encode(self.username, forKey: .username) + try container.encode(self.uuid, forKey: .uuid) + try container.encodeIfPresent(self.pin, forKey: .pin) + try container.encodeIfPresent(self.roles, forKey: .roles) + } +} + +extension Operations.GetTokenDetailsUserPlexAccount { + var adsConsentReminderAtWrapper: DateTime { + return _adsConsentReminderAt + } + var adsConsentSetAtWrapper: DateTime { + return _adsConsentSetAt + } +} diff --git a/Sources/Plexswift/models/operations/GetTokenErrors.swift b/Sources/Plexswift/models/operations/GetTokenErrors.swift deleted file mode 100644 index eaf5f08..0000000 --- a/Sources/Plexswift/models/operations/GetTokenErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetTokenErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.GetTokenErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.GetTokenErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetTokenLocation.swift b/Sources/Plexswift/models/operations/GetTokenLocation.swift deleted file mode 100644 index a122947..0000000 --- a/Sources/Plexswift/models/operations/GetTokenLocation.swift +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetTokenLocation { - public let city: String? - public let code: String? - public let continentCode: String? - public let coordinates: String? - public let country: String? - public let europeanUnionMember: Bool? - public let inPrivacyRestrictedCountry: Bool? - public let postalCode: String? - public let subdivisions: String? - public let timeZone: String? - - /// Creates an object with the specified parameters - /// - /// - public init(city: String? = nil, code: String? = nil, continentCode: String? = nil, coordinates: String? = nil, country: String? = nil, europeanUnionMember: Bool? = nil, inPrivacyRestrictedCountry: Bool? = nil, postalCode: String? = nil, subdivisions: String? = nil, timeZone: String? = nil) { - self.city = city - self.code = code - self.continentCode = continentCode - self.coordinates = coordinates - self.country = country - self.europeanUnionMember = europeanUnionMember - self.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry - self.postalCode = postalCode - self.subdivisions = subdivisions - self.timeZone = timeZone - } - } -} - -extension Operations.GetTokenLocation: Codable { - enum CodingKeys: String, CodingKey { - case city - case code - case continentCode = "continent_code" - case coordinates - case country - case europeanUnionMember = "european_union_member" - case inPrivacyRestrictedCountry = "in_privacy_restricted_country" - case postalCode = "postal_code" - case subdivisions - case timeZone = "time_zone" - } -} - diff --git a/Sources/Plexswift/models/operations/GetTokenPlexResponseBody.swift b/Sources/Plexswift/models/operations/GetTokenPlexResponseBody.swift deleted file mode 100644 index 4f5324d..0000000 --- a/Sources/Plexswift/models/operations/GetTokenPlexResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// X-Plex-Client-Identifier is missing - public struct GetTokenPlexResponseBody { - public let errors: [Operations.GetTokenErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetTokenErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetTokenPlexResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetTokenResponse.swift b/Sources/Plexswift/models/operations/GetTokenResponse.swift deleted file mode 100644 index c251d95..0000000 --- a/Sources/Plexswift/models/operations/GetTokenResponse.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A response model - public enum GetTokenResponse { - case empty - case twoHundredApplicationJsonObject(Operations.GetTokenResponseBody) - case fourHundredApplicationJsonObject(Operations.GetTokenPlexResponseBody) - - var isEmpty: Bool { - if case .empty = self { - return true - } else { - return false - } - } - - public func twoHundredApplicationJsonObject() throws -> Operations.GetTokenResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - - public func fourHundredApplicationJsonObject() throws -> Operations.GetTokenPlexResponseBody { - guard case .fourHundredApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - } -} diff --git a/Sources/Plexswift/models/operations/GetTokenResponseBody.swift b/Sources/Plexswift/models/operations/GetTokenResponseBody.swift deleted file mode 100644 index cfabb5b..0000000 --- a/Sources/Plexswift/models/operations/GetTokenResponseBody.swift +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Access Token - public struct GetTokenResponseBody { - public let authToken: String? - public let clientIdentifier: String? - public let code: String? - @DateTime - public private(set) var createdAt: Date? - @DateTime - public private(set) var expiresAt: Date? - @DecimalSerialized - public private(set) var expiresIn: Double? - /// PinID for use with authentication - @DecimalSerialized - public private(set) var id: Double? - public let location: Operations.GetTokenLocation? - public let newRegistration: String? - public let product: String? - /// 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 let qr: String? - public let trusted: Bool? - - /// Creates an object with the specified parameters - /// - /// - Parameter id: PinID for use with authentication - /// - Parameter qr: 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 init(authToken: String? = nil, clientIdentifier: String? = nil, code: String? = nil, createdAt: Date? = nil, expiresAt: Date? = nil, expiresIn: Double? = nil, id: Double? = nil, location: Operations.GetTokenLocation? = nil, newRegistration: String? = nil, product: String? = nil, qr: String? = nil, trusted: Bool? = nil) { - self.authToken = authToken - self.clientIdentifier = clientIdentifier - self.code = code - self._createdAt = DateTime(wrappedValue: createdAt) - self._expiresAt = DateTime(wrappedValue: expiresAt) - self._expiresIn = DecimalSerialized(wrappedValue: expiresIn) - self._id = DecimalSerialized(wrappedValue: id) - self.location = location - self.newRegistration = newRegistration - self.product = product - self.qr = qr - self.trusted = trusted - } - } -} - -extension Operations.GetTokenResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case authToken - case clientIdentifier - case code - case createdAt - case expiresAt - case expiresIn - case id - case location - case newRegistration - case product - case qr - case trusted - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.authToken = try container.decodeIfPresent(String.self, forKey: .authToken) - self.clientIdentifier = try container.decodeIfPresent(String.self, forKey: .clientIdentifier) - self.code = try container.decodeIfPresent(String.self, forKey: .code) - self._createdAt = try container.decodeIfPresent(DateTime.self, forKey: .createdAt) ?? DateTime(wrappedValue: nil) - self._expiresAt = try container.decodeIfPresent(DateTime.self, forKey: .expiresAt) ?? DateTime(wrappedValue: nil) - self._expiresIn = try container.decodeIfPresent(DecimalSerialized.self, forKey: .expiresIn) ?? DecimalSerialized(wrappedValue: nil) - self._id = try container.decodeIfPresent(DecimalSerialized.self, forKey: .id) ?? DecimalSerialized(wrappedValue: nil) - self.location = try container.decodeIfPresent(Operations.GetTokenLocation.self, forKey: .location) - self.newRegistration = try container.decodeIfPresent(String.self, forKey: .newRegistration) - self.product = try container.decodeIfPresent(String.self, forKey: .product) - self.qr = try container.decodeIfPresent(String.self, forKey: .qr) - self.trusted = try container.decodeIfPresent(Bool.self, forKey: .trusted) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(self.authToken, forKey: .authToken) - try container.encodeIfPresent(self.clientIdentifier, forKey: .clientIdentifier) - try container.encodeIfPresent(self.code, forKey: .code) - if self.createdAt != nil { - try container.encode(self._createdAt, forKey: .createdAt) - } - if self.expiresAt != nil { - try container.encode(self._expiresAt, forKey: .expiresAt) - } - if self.expiresIn != nil { - try container.encode(self._expiresIn, forKey: .expiresIn) - } - if self.id != nil { - try container.encode(self._id, forKey: .id) - } - try container.encodeIfPresent(self.location, forKey: .location) - try container.encodeIfPresent(self.newRegistration, forKey: .newRegistration) - try container.encodeIfPresent(self.product, forKey: .product) - try container.encodeIfPresent(self.qr, forKey: .qr) - try container.encodeIfPresent(self.trusted, forKey: .trusted) - } -} - -extension Operations.GetTokenResponseBody { - var idWrapper: DecimalSerialized { - return _id - } - var expiresInWrapper: DecimalSerialized { - return _expiresIn - } - var createdAtWrapper: DateTime { - return _createdAt - } - var expiresAtWrapper: DateTime { - return _expiresAt - } -} diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentBadRequest.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentBadRequest.swift new file mode 100644 index 0000000..269eea1 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetTopWatchedContentBadRequest { + public let errors: [Operations.GetTopWatchedContentErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetTopWatchedContentErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTopWatchedContentBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentCountry.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentCountry.swift index b391739..4e46f7d 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentCountry.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentCountry.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -17,8 +17,7 @@ extension Operations { self.id = id self.tag = tag } - } -} + }} extension Operations.GetTopWatchedContentCountry: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentErrors.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentErrors.swift new file mode 100644 index 0000000..1d275a1 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTopWatchedContentErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTopWatchedContentErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentGenre.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentGenre.swift index cad6890..cf5ffc0 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentGenre.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentGenre.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -17,8 +17,7 @@ extension Operations { self.id = id self.tag = tag } - } -} + }} extension Operations.GetTopWatchedContentGenre: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentGuids.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentGuids.swift index 86e901d..2632dee 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentGuids.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentGuids.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(id: String? = nil) { self.id = id } - } -} + }} extension Operations.GetTopWatchedContentGuids: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentLibraryErrors.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentLibraryErrors.swift new file mode 100644 index 0000000..72c12eb --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentLibraryErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTopWatchedContentLibraryErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTopWatchedContentLibraryErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentMediaContainer.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentMediaContainer.swift index bb9f7a2..96a61cc 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,8 +23,7 @@ extension Operations { self.metadata = metadata self.size = size } - } -} + }} extension Operations.GetTopWatchedContentMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentMetadata.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentMetadata.swift index f47c5d5..864bfe5 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentMetadata.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentMetadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -77,8 +77,7 @@ extension Operations { self.viewedLeafCount = viewedLeafCount self.year = year } - } -} + }} extension Operations.GetTopWatchedContentMetadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift new file mode 100644 index 0000000..8354e66 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentQueryParamType.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public enum GetTopWatchedContentQueryParamType: Int, Codable, APIValue { + case one = 1 + case two = 2 + case three = 3 + case four = 4 + }} diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift index a9d9944..b6a07c9 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift @@ -1,25 +1,36 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetTopWatchedContentRequest: APIValue { - /// the library type (1 - movies, 2 - shows, 3 - music) - public let type: Int + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public let type: Operations.GetTopWatchedContentQueryParamType /// Adds the Guids object to the response /// public let includeGuids: Int? /// Creates an object with the specified parameters /// - /// - Parameter type: the library type (1 - movies, 2 - shows, 3 - music) + /// - Parameter type: The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// /// - Parameter includeGuids: Adds the Guids object to the response /// /// - public init(type: Int, includeGuids: Int? = nil) { + public init(type: Operations.GetTopWatchedContentQueryParamType, includeGuids: Int? = nil) { self.type = type self.includeGuids = includeGuids } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentResponse.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentResponse.swift index 29fb0fb..8300d1a 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentResponse.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,9 @@ extension Operations { /// A response model public enum GetTopWatchedContentResponse { case empty + case badRequest(Operations.GetTopWatchedContentBadRequest) case object(Operations.GetTopWatchedContentResponseBody) + case unauthorized(Operations.GetTopWatchedContentUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +18,24 @@ extension Operations { } } + public func badRequest() throws -> Operations.GetTopWatchedContentBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + public func object() throws -> Operations.GetTopWatchedContentResponseBody { guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetTopWatchedContentUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentResponseBody.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentResponseBody.swift index ecb2178..1217b0e 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetTopWatchedContentMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetTopWatchedContentResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentRole.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentRole.swift index 2d08337..6f603de 100644 --- a/Sources/Plexswift/models/operations/GetTopWatchedContentRole.swift +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentRole.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,8 +23,7 @@ extension Operations { self.tagKey = tagKey self.thumb = thumb } - } -} + }} extension Operations.GetTopWatchedContentRole: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTopWatchedContentUnauthorized.swift b/Sources/Plexswift/models/operations/GetTopWatchedContentUnauthorized.swift new file mode 100644 index 0000000..070c7ba --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTopWatchedContentUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetTopWatchedContentUnauthorized { + public let errors: [Operations.GetTopWatchedContentLibraryErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetTopWatchedContentLibraryErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTopWatchedContentUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsBadRequest.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsBadRequest.swift new file mode 100644 index 0000000..35b258f --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTranscodeSessionsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetTranscodeSessionsBadRequest { + public let errors: [Operations.GetTranscodeSessionsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetTranscodeSessionsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTranscodeSessionsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift index b113f60..395ee6c 100644 --- a/Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift +++ b/Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetTranscodeSessionsErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetTranscodeSessionsErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetTranscodeSessionsErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetTranscodeSessionsErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift index 826c5d1..2c6a89e 100644 --- a/Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.size = size self.transcodeSession = transcodeSession } - } -} + }} extension Operations.GetTranscodeSessionsMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift index f1e84bd..14b11ed 100644 --- a/Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift +++ b/Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetTranscodeSessionsResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetTranscodeSessionsResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetTranscodeSessionsSessionsResponseBody) + case badRequest(Operations.GetTranscodeSessionsBadRequest) + case object(Operations.GetTranscodeSessionsResponseBody) + case unauthorized(Operations.GetTranscodeSessionsUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetTranscodeSessionsResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetTranscodeSessionsBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetTranscodeSessionsSessionsResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetTranscodeSessionsResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetTranscodeSessionsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsResponseBody.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsResponseBody.swift index c24b6bc..625c38e 100644 --- a/Sources/Plexswift/models/operations/GetTranscodeSessionsResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetTranscodeSessionsResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetTranscodeSessionsMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetTranscodeSessionsResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsErrors.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsErrors.swift new file mode 100644 index 0000000..5c0269b --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTranscodeSessionsSessionsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTranscodeSessionsSessionsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsResponseBody.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsResponseBody.swift deleted file mode 100644 index 70ddee1..0000000 --- a/Sources/Plexswift/models/operations/GetTranscodeSessionsSessionsResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetTranscodeSessionsSessionsResponseBody { - public let errors: [Operations.GetTranscodeSessionsErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetTranscodeSessionsErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetTranscodeSessionsSessionsResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetTranscodeSessionsUnauthorized.swift b/Sources/Plexswift/models/operations/GetTranscodeSessionsUnauthorized.swift new file mode 100644 index 0000000..8c12e7e --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTranscodeSessionsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetTranscodeSessionsUnauthorized { + public let errors: [Operations.GetTranscodeSessionsSessionsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetTranscodeSessionsSessionsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTranscodeSessionsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTransientTokenAuthenticationErrors.swift b/Sources/Plexswift/models/operations/GetTransientTokenAuthenticationErrors.swift new file mode 100644 index 0000000..4773d81 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTransientTokenAuthenticationErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetTransientTokenAuthenticationErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetTransientTokenAuthenticationErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetTransientTokenBadRequest.swift b/Sources/Plexswift/models/operations/GetTransientTokenBadRequest.swift new file mode 100644 index 0000000..60da990 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTransientTokenBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetTransientTokenBadRequest { + public let errors: [Operations.GetTransientTokenErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetTransientTokenErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTransientTokenBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetTransientTokenErrors.swift b/Sources/Plexswift/models/operations/GetTransientTokenErrors.swift index 6919294..68c1052 100644 --- a/Sources/Plexswift/models/operations/GetTransientTokenErrors.swift +++ b/Sources/Plexswift/models/operations/GetTransientTokenErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetTransientTokenErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetTransientTokenErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetTransientTokenErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetTransientTokenErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetTransientTokenQueryParamType.swift b/Sources/Plexswift/models/operations/GetTransientTokenQueryParamType.swift index 24dd595..23f9705 100644 --- a/Sources/Plexswift/models/operations/GetTransientTokenQueryParamType.swift +++ b/Sources/Plexswift/models/operations/GetTransientTokenQueryParamType.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,5 +6,4 @@ extension Operations { /// `delegation` - This is the only supported `type` parameter. public enum GetTransientTokenQueryParamType: String, Codable, APIValue { case delegation = "delegation" - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetTransientTokenRequest.swift b/Sources/Plexswift/models/operations/GetTransientTokenRequest.swift index cf571fb..7090c26 100644 --- a/Sources/Plexswift/models/operations/GetTransientTokenRequest.swift +++ b/Sources/Plexswift/models/operations/GetTransientTokenRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,5 +19,4 @@ extension Operations { self.scope = scope self.type = type } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetTransientTokenResponse.swift b/Sources/Plexswift/models/operations/GetTransientTokenResponse.swift index 91c3c4d..df50ebd 100644 --- a/Sources/Plexswift/models/operations/GetTransientTokenResponse.swift +++ b/Sources/Plexswift/models/operations/GetTransientTokenResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum GetTransientTokenResponse { case empty - case object(Operations.GetTransientTokenResponseBody) + case badRequest(Operations.GetTransientTokenBadRequest) + case unauthorized(Operations.GetTransientTokenUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.GetTransientTokenResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.GetTransientTokenBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetTransientTokenUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetTransientTokenUnauthorized.swift b/Sources/Plexswift/models/operations/GetTransientTokenUnauthorized.swift new file mode 100644 index 0000000..731a85f --- /dev/null +++ b/Sources/Plexswift/models/operations/GetTransientTokenUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetTransientTokenUnauthorized { + public let errors: [Operations.GetTransientTokenAuthenticationErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetTransientTokenAuthenticationErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetTransientTokenUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusBadRequest.swift b/Sources/Plexswift/models/operations/GetUpdateStatusBadRequest.swift new file mode 100644 index 0000000..c495e4d --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUpdateStatusBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetUpdateStatusBadRequest { + public let errors: [Operations.GetUpdateStatusErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetUpdateStatusErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetUpdateStatusBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusErrors.swift b/Sources/Plexswift/models/operations/GetUpdateStatusErrors.swift index 43c9a30..468aab2 100644 --- a/Sources/Plexswift/models/operations/GetUpdateStatusErrors.swift +++ b/Sources/Plexswift/models/operations/GetUpdateStatusErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct GetUpdateStatusErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.GetUpdateStatusErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.GetUpdateStatusErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.GetUpdateStatusErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusMediaContainer.swift b/Sources/Plexswift/models/operations/GetUpdateStatusMediaContainer.swift index 8ed62c1..1f7a8bc 100644 --- a/Sources/Plexswift/models/operations/GetUpdateStatusMediaContainer.swift +++ b/Sources/Plexswift/models/operations/GetUpdateStatusMediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,8 +23,7 @@ extension Operations { self.size = size self.status = status } - } -} + }} extension Operations.GetUpdateStatusMediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusResponse.swift b/Sources/Plexswift/models/operations/GetUpdateStatusResponse.swift index cd7dead..8091177 100644 --- a/Sources/Plexswift/models/operations/GetUpdateStatusResponse.swift +++ b/Sources/Plexswift/models/operations/GetUpdateStatusResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,8 +6,9 @@ extension Operations { /// A response model public enum GetUpdateStatusResponse { case empty - case twoHundredApplicationJsonObject(Operations.GetUpdateStatusResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetUpdateStatusUpdaterResponseBody) + case badRequest(Operations.GetUpdateStatusBadRequest) + case object(Operations.GetUpdateStatusResponseBody) + case unauthorized(Operations.GetUpdateStatusUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -17,18 +18,24 @@ extension Operations { } } - public func twoHundredApplicationJsonObject() throws -> Operations.GetUpdateStatusResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { + public func badRequest() throws -> Operations.GetUpdateStatusBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetUpdateStatusUpdaterResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { + public func object() throws -> Operations.GetUpdateStatusResponseBody { + guard case .object(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.GetUpdateStatusUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusResponseBody.swift b/Sources/Plexswift/models/operations/GetUpdateStatusResponseBody.swift index aee00e2..082e2c3 100644 --- a/Sources/Plexswift/models/operations/GetUpdateStatusResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetUpdateStatusResponseBody.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(mediaContainer: Operations.GetUpdateStatusMediaContainer? = nil) { self.mediaContainer = mediaContainer } - } -} + }} extension Operations.GetUpdateStatusResponseBody: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusUnauthorized.swift b/Sources/Plexswift/models/operations/GetUpdateStatusUnauthorized.swift new file mode 100644 index 0000000..c770659 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUpdateStatusUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetUpdateStatusUnauthorized { + public let errors: [Operations.GetUpdateStatusUpdaterErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetUpdateStatusUpdaterErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetUpdateStatusUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusUpdaterErrors.swift b/Sources/Plexswift/models/operations/GetUpdateStatusUpdaterErrors.swift new file mode 100644 index 0000000..2ab0745 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUpdateStatusUpdaterErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetUpdateStatusUpdaterErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetUpdateStatusUpdaterErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetUpdateStatusUpdaterResponseBody.swift b/Sources/Plexswift/models/operations/GetUpdateStatusUpdaterResponseBody.swift deleted file mode 100644 index 24a2ec6..0000000 --- a/Sources/Plexswift/models/operations/GetUpdateStatusUpdaterResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetUpdateStatusUpdaterResponseBody { - public let errors: [Operations.GetUpdateStatusErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetUpdateStatusErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetUpdateStatusUpdaterResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetUserFriendsBadRequest.swift b/Sources/Plexswift/models/operations/GetUserFriendsBadRequest.swift new file mode 100644 index 0000000..98df42a --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUserFriendsBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetUserFriendsBadRequest { + public let errors: [Operations.GetUserFriendsErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetUserFriendsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetUserFriendsBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetUserFriendsErrors.swift b/Sources/Plexswift/models/operations/GetUserFriendsErrors.swift new file mode 100644 index 0000000..f71dbb1 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUserFriendsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetUserFriendsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetUserFriendsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetUserFriendsPlexErrors.swift b/Sources/Plexswift/models/operations/GetUserFriendsPlexErrors.swift new file mode 100644 index 0000000..3838aae --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUserFriendsPlexErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetUserFriendsPlexErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetUserFriendsPlexErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetUserFriendsResponse.swift b/Sources/Plexswift/models/operations/GetUserFriendsResponse.swift new file mode 100644 index 0000000..cde56fb --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUserFriendsResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetUserFriendsResponse { + case empty + case badRequest(Operations.GetUserFriendsBadRequest) + case friends([Operations.Friend]) + case unauthorized(Operations.GetUserFriendsUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetUserFriendsBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func friends() throws -> [Operations.Friend] { + guard case .friends(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetUserFriendsUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetUserFriendsUnauthorized.swift b/Sources/Plexswift/models/operations/GetUserFriendsUnauthorized.swift new file mode 100644 index 0000000..c243993 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetUserFriendsUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetUserFriendsUnauthorized { + public let errors: [Operations.GetUserFriendsPlexErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetUserFriendsPlexErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetUserFriendsUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetWatchListBadRequest.swift b/Sources/Plexswift/models/operations/GetWatchListBadRequest.swift new file mode 100644 index 0000000..e51de1a --- /dev/null +++ b/Sources/Plexswift/models/operations/GetWatchListBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct GetWatchListBadRequest { + public let errors: [Operations.GetWatchListErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.GetWatchListErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetWatchListBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetWatchListErrors.swift b/Sources/Plexswift/models/operations/GetWatchListErrors.swift new file mode 100644 index 0000000..76d081b --- /dev/null +++ b/Sources/Plexswift/models/operations/GetWatchListErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetWatchListErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetWatchListErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetWatchlistRequest.swift b/Sources/Plexswift/models/operations/GetWatchListRequest.swift similarity index 81% rename from Sources/Plexswift/models/operations/GetWatchlistRequest.swift rename to Sources/Plexswift/models/operations/GetWatchListRequest.swift index 2751d09..7f83093 100644 --- a/Sources/Plexswift/models/operations/GetWatchlistRequest.swift +++ b/Sources/Plexswift/models/operations/GetWatchListRequest.swift @@ -1,13 +1,13 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object - public struct GetWatchlistRequest: APIValue { + public struct GetWatchListRequest: APIValue { /// Filter - public let filter: Operations.PathParamFilter - /// User Token + public let filter: Operations.Filter + /// Plex Authentication Token public let xPlexToken: String /// include collections in the results /// @@ -29,17 +29,19 @@ extension Operations { public let sort: String? /// The number of items to return. If not specified, all items will be returned. /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 50 /// public let xPlexContainerSize: Int? /// The index of the first item to return. If not specified, the first item will be returned. /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 0 /// public let xPlexContainerStart: Int? /// Creates an object with the specified parameters /// /// - Parameter filter: Filter - /// - Parameter xPlexToken: User Token + /// - Parameter xPlexToken: Plex Authentication Token /// - Parameter includeCollections: include collections in the results /// /// - Parameter includeExternalMedia: include external media in the results @@ -55,12 +57,14 @@ extension Operations { /// /// - Parameter xPlexContainerSize: The number of items to return. If not specified, all items will be returned. /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 50 /// /// - Parameter xPlexContainerStart: The index of the first item to return. If not specified, the first item will be returned. /// If the number of items exceeds the limit, the response will be paginated. + /// By default this is 0 /// /// - public init(filter: Operations.PathParamFilter, xPlexToken: String, includeCollections: Operations.IncludeCollections? = nil, includeExternalMedia: Operations.IncludeExternalMedia? = nil, libtype: Operations.Libtype? = nil, maxresults: Int? = nil, sort: String? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) { + public init(filter: Operations.Filter, xPlexToken: String, includeCollections: Operations.IncludeCollections? = nil, includeExternalMedia: Operations.IncludeExternalMedia? = nil, libtype: Operations.Libtype? = nil, maxresults: Int? = nil, sort: String? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) { self.filter = filter self.xPlexToken = xPlexToken self.includeCollections = includeCollections @@ -71,5 +75,4 @@ extension Operations { self.xPlexContainerSize = xPlexContainerSize self.xPlexContainerStart = xPlexContainerStart } - } -} + }} diff --git a/Sources/Plexswift/models/operations/GetWatchListResponse.swift b/Sources/Plexswift/models/operations/GetWatchListResponse.swift new file mode 100644 index 0000000..9cc4a00 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetWatchListResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum GetWatchListResponse { + case empty + case badRequest(Operations.GetWatchListBadRequest) + case object(Operations.GetWatchListResponseBody) + case unauthorized(Operations.GetWatchListUnauthorized) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.GetWatchListBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func object() throws -> Operations.GetWatchListResponseBody { + guard case .object(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.GetWatchListUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetWatchlistResponseBody.swift b/Sources/Plexswift/models/operations/GetWatchListResponseBody.swift similarity index 86% rename from Sources/Plexswift/models/operations/GetWatchlistResponseBody.swift rename to Sources/Plexswift/models/operations/GetWatchListResponseBody.swift index 4eca4fc..c7bfe69 100644 --- a/Sources/Plexswift/models/operations/GetWatchlistResponseBody.swift +++ b/Sources/Plexswift/models/operations/GetWatchListResponseBody.swift @@ -1,10 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Watchlist Data - public struct GetWatchlistResponseBody { + public struct GetWatchListResponseBody { public let identifier: String? public let librarySectionID: String? public let librarySectionTitle: String? @@ -25,10 +25,9 @@ extension Operations { self.size = size self.totalSize = totalSize } - } -} + }} -extension Operations.GetWatchlistResponseBody: Codable { +extension Operations.GetWatchListResponseBody: Codable { enum CodingKeys: String, CodingKey { case identifier case librarySectionID diff --git a/Sources/Plexswift/models/operations/GetWatchListUnauthorized.swift b/Sources/Plexswift/models/operations/GetWatchListUnauthorized.swift new file mode 100644 index 0000000..8cd5648 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetWatchListUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct GetWatchListUnauthorized { + public let errors: [Operations.GetWatchListWatchlistErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.GetWatchListWatchlistErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.GetWatchListUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/GetWatchListWatchlistErrors.swift b/Sources/Plexswift/models/operations/GetWatchListWatchlistErrors.swift new file mode 100644 index 0000000..0d14ea2 --- /dev/null +++ b/Sources/Plexswift/models/operations/GetWatchListWatchlistErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct GetWatchListWatchlistErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.GetWatchListWatchlistErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/GetWatchlistErrors.swift b/Sources/Plexswift/models/operations/GetWatchlistErrors.swift deleted file mode 100644 index 9938e40..0000000 --- a/Sources/Plexswift/models/operations/GetWatchlistErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct GetWatchlistErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.GetWatchlistErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.GetWatchlistErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/GetWatchlistResponse.swift b/Sources/Plexswift/models/operations/GetWatchlistResponse.swift deleted file mode 100644 index 1869e5c..0000000 --- a/Sources/Plexswift/models/operations/GetWatchlistResponse.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A response model - public enum GetWatchlistResponse { - case empty - case twoHundredApplicationJsonObject(Operations.GetWatchlistResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.GetWatchlistWatchlistResponseBody) - - var isEmpty: Bool { - if case .empty = self { - return true - } else { - return false - } - } - - public func twoHundredApplicationJsonObject() throws -> Operations.GetWatchlistResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetWatchlistWatchlistResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - } -} diff --git a/Sources/Plexswift/models/operations/GetWatchlistWatchlistResponseBody.swift b/Sources/Plexswift/models/operations/GetWatchlistWatchlistResponseBody.swift deleted file mode 100644 index 74b66a5..0000000 --- a/Sources/Plexswift/models/operations/GetWatchlistWatchlistResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetWatchlistWatchlistResponseBody { - public let errors: [Operations.GetWatchlistErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.GetWatchlistErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.GetWatchlistWatchlistResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/Guids.swift b/Sources/Plexswift/models/operations/Guids.swift index c9a3baa..ffb6091 100644 --- a/Sources/Plexswift/models/operations/Guids.swift +++ b/Sources/Plexswift/models/operations/Guids.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(id: String? = nil) { self.id = id } - } -} + }} extension Operations.Guids: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Hub.swift b/Sources/Plexswift/models/operations/Hub.swift index 5beea44..43f6735 100644 --- a/Sources/Plexswift/models/operations/Hub.swift +++ b/Sources/Plexswift/models/operations/Hub.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -33,8 +33,7 @@ extension Operations { self.title = title self.type = type } - } -} + }} extension Operations.Hub: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Image.swift b/Sources/Plexswift/models/operations/Image.swift index a61bc71..8651c2e 100644 --- a/Sources/Plexswift/models/operations/Image.swift +++ b/Sources/Plexswift/models/operations/Image.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -17,8 +17,7 @@ extension Operations { self.type = type self.url = url } - } -} + }} extension Operations.Image: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/IncludeCollections.swift b/Sources/Plexswift/models/operations/IncludeCollections.swift index 93a9aa8..d5ded13 100644 --- a/Sources/Plexswift/models/operations/IncludeCollections.swift +++ b/Sources/Plexswift/models/operations/IncludeCollections.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -8,5 +8,4 @@ extension Operations { public enum IncludeCollections: Int, Codable, APIValue { case one = 1 case zero = 0 - } -} + }} diff --git a/Sources/Plexswift/models/operations/IncludeDetails.swift b/Sources/Plexswift/models/operations/IncludeDetails.swift index 69028e1..77a75a0 100644 --- a/Sources/Plexswift/models/operations/IncludeDetails.swift +++ b/Sources/Plexswift/models/operations/IncludeDetails.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -9,5 +9,4 @@ extension Operations { public enum IncludeDetails: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/IncludeExternalMedia.swift b/Sources/Plexswift/models/operations/IncludeExternalMedia.swift index 775d2cd..09ec939 100644 --- a/Sources/Plexswift/models/operations/IncludeExternalMedia.swift +++ b/Sources/Plexswift/models/operations/IncludeExternalMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -8,5 +8,4 @@ extension Operations { public enum IncludeExternalMedia: Int, Codable, APIValue { case one = 1 case zero = 0 - } -} + }} diff --git a/Sources/Plexswift/models/operations/IncludeGuids.swift b/Sources/Plexswift/models/operations/IncludeGuids.swift new file mode 100644 index 0000000..36e3c9e --- /dev/null +++ b/Sources/Plexswift/models/operations/IncludeGuids.swift @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Adds the Guids object to the response + /// + public enum IncludeGuids: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/IncludeHttps.swift b/Sources/Plexswift/models/operations/IncludeHttps.swift new file mode 100644 index 0000000..e03e6f5 --- /dev/null +++ b/Sources/Plexswift/models/operations/IncludeHttps.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Include Https entries in the results + public enum IncludeHttps: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/IncludeIPv6.swift b/Sources/Plexswift/models/operations/IncludeIPv6.swift new file mode 100644 index 0000000..78b6df0 --- /dev/null +++ b/Sources/Plexswift/models/operations/IncludeIPv6.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Include IPv6 entries in the results + public enum IncludeIPv6: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/IncludeMeta.swift b/Sources/Plexswift/models/operations/IncludeMeta.swift new file mode 100644 index 0000000..cedb6fd --- /dev/null +++ b/Sources/Plexswift/models/operations/IncludeMeta.swift @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Adds the Meta object to the response + /// + public enum IncludeMeta: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/IncludeRelay.swift b/Sources/Plexswift/models/operations/IncludeRelay.swift new file mode 100644 index 0000000..bcf17e8 --- /dev/null +++ b/Sources/Plexswift/models/operations/IncludeRelay.swift @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Include Relay addresses in the results + /// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + /// + public enum IncludeRelay: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/InternalPaymentMethod.swift b/Sources/Plexswift/models/operations/InternalPaymentMethod.swift new file mode 100644 index 0000000..2db6ace --- /dev/null +++ b/Sources/Plexswift/models/operations/InternalPaymentMethod.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct InternalPaymentMethod { + + /// Creates an object + /// + /// + public init() { + } + }} + +extension Operations.InternalPaymentMethod: Codable { +} + diff --git a/Sources/Plexswift/models/operations/Level.swift b/Sources/Plexswift/models/operations/Level.swift index 6ded2b2..a99921c 100644 --- a/Sources/Plexswift/models/operations/Level.swift +++ b/Sources/Plexswift/models/operations/Level.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,5 +16,4 @@ extension Operations { case two = 2 case three = 3 case four = 4 - } -} + }} diff --git a/Sources/Plexswift/models/operations/LibrarySectionID.swift b/Sources/Plexswift/models/operations/LibrarySectionID.swift index df51482..a25a696 100644 --- a/Sources/Plexswift/models/operations/LibrarySectionID.swift +++ b/Sources/Plexswift/models/operations/LibrarySectionID.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,8 +7,7 @@ extension Operations { public enum LibrarySectionID { case integer(Int) case string(String) - } -} + }} extension Operations.LibrarySectionID: Codable { public init(from decoder: Decoder) throws { diff --git a/Sources/Plexswift/models/operations/Libtype.swift b/Sources/Plexswift/models/operations/Libtype.swift index dd16ea2..cf01b1a 100644 --- a/Sources/Plexswift/models/operations/Libtype.swift +++ b/Sources/Plexswift/models/operations/Libtype.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -8,5 +8,4 @@ extension Operations { public enum Libtype: String, Codable, APIValue { case movie = "movie" case show = "show" - } -} + }} diff --git a/Sources/Plexswift/models/operations/Location.swift b/Sources/Plexswift/models/operations/Location.swift index 3a190c0..1dcaa1d 100644 --- a/Sources/Plexswift/models/operations/Location.swift +++ b/Sources/Plexswift/models/operations/Location.swift @@ -1,51 +1,26 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct Location { - public let city: String? - public let code: String? - public let continentCode: String? - public let coordinates: String? - public let country: String? - public let europeanUnionMember: Bool? - public let inPrivacyRestrictedCountry: Bool? - public let postalCode: String? - public let subdivisions: String? - public let timeZone: String? + public let id: Int? + public let path: String? /// Creates an object with the specified parameters /// /// - public init(city: String? = nil, code: String? = nil, continentCode: String? = nil, coordinates: String? = nil, country: String? = nil, europeanUnionMember: Bool? = nil, inPrivacyRestrictedCountry: Bool? = nil, postalCode: String? = nil, subdivisions: String? = nil, timeZone: String? = nil) { - self.city = city - self.code = code - self.continentCode = continentCode - self.coordinates = coordinates - self.country = country - self.europeanUnionMember = europeanUnionMember - self.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry - self.postalCode = postalCode - self.subdivisions = subdivisions - self.timeZone = timeZone + public init(id: Int? = nil, path: String? = nil) { + self.id = id + self.path = path } - } -} + }} extension Operations.Location: Codable { enum CodingKeys: String, CodingKey { - case city - case code - case continentCode = "continent_code" - case coordinates - case country - case europeanUnionMember = "european_union_member" - case inPrivacyRestrictedCountry = "in_privacy_restricted_country" - case postalCode = "postal_code" - case subdivisions - case timeZone = "time_zone" + case id + case path } } diff --git a/Sources/Plexswift/models/operations/LogLineBadRequest.swift b/Sources/Plexswift/models/operations/LogLineBadRequest.swift new file mode 100644 index 0000000..a7942a4 --- /dev/null +++ b/Sources/Plexswift/models/operations/LogLineBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct LogLineBadRequest { + public let errors: [Operations.LogLineErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.LogLineErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.LogLineBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/LogLineErrors.swift b/Sources/Plexswift/models/operations/LogLineErrors.swift index 0d83670..fb9515d 100644 --- a/Sources/Plexswift/models/operations/LogLineErrors.swift +++ b/Sources/Plexswift/models/operations/LogLineErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct LogLineErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.LogLineErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.LogLineErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.LogLineErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/LogLineLogErrors.swift b/Sources/Plexswift/models/operations/LogLineLogErrors.swift new file mode 100644 index 0000000..672fd54 --- /dev/null +++ b/Sources/Plexswift/models/operations/LogLineLogErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct LogLineLogErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.LogLineLogErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/LogLineRequest.swift b/Sources/Plexswift/models/operations/LogLineRequest.swift index 6df3fe3..164d932 100644 --- a/Sources/Plexswift/models/operations/LogLineRequest.swift +++ b/Sources/Plexswift/models/operations/LogLineRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -35,5 +35,4 @@ extension Operations { self.message = message self.source = source } - } -} + }} diff --git a/Sources/Plexswift/models/operations/LogLineResponse.swift b/Sources/Plexswift/models/operations/LogLineResponse.swift index 782d67d..1426591 100644 --- a/Sources/Plexswift/models/operations/LogLineResponse.swift +++ b/Sources/Plexswift/models/operations/LogLineResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum LogLineResponse { case empty - case object(Operations.LogLineResponseBody) + case badRequest(Operations.LogLineBadRequest) + case unauthorized(Operations.LogLineUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.LogLineResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.LogLineBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.LogLineUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/LogLineResponseBody.swift b/Sources/Plexswift/models/operations/LogLineUnauthorized.swift similarity index 52% rename from Sources/Plexswift/models/operations/LogLineResponseBody.swift rename to Sources/Plexswift/models/operations/LogLineUnauthorized.swift index 4e5e42d..44456f9 100644 --- a/Sources/Plexswift/models/operations/LogLineResponseBody.swift +++ b/Sources/Plexswift/models/operations/LogLineUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct LogLineResponseBody { - public let errors: [Operations.LogLineErrors]? + public struct LogLineUnauthorized { + public let errors: [Operations.LogLineLogErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.LogLineErrors]? = nil) { + public init(errors: [Operations.LogLineLogErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.LogLineResponseBody: Codable { +extension Operations.LogLineUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/LogMultiLineBadRequest.swift b/Sources/Plexswift/models/operations/LogMultiLineBadRequest.swift new file mode 100644 index 0000000..da17a1f --- /dev/null +++ b/Sources/Plexswift/models/operations/LogMultiLineBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct LogMultiLineBadRequest { + public let errors: [Operations.LogMultiLineErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.LogMultiLineErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.LogMultiLineBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/LogMultiLineErrors.swift b/Sources/Plexswift/models/operations/LogMultiLineErrors.swift index ca82867..11df7ce 100644 --- a/Sources/Plexswift/models/operations/LogMultiLineErrors.swift +++ b/Sources/Plexswift/models/operations/LogMultiLineErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct LogMultiLineErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.LogMultiLineErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.LogMultiLineErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.LogMultiLineErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/LogMultiLineLogErrors.swift b/Sources/Plexswift/models/operations/LogMultiLineLogErrors.swift new file mode 100644 index 0000000..ae31515 --- /dev/null +++ b/Sources/Plexswift/models/operations/LogMultiLineLogErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct LogMultiLineLogErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.LogMultiLineLogErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/LogMultiLineResponse.swift b/Sources/Plexswift/models/operations/LogMultiLineResponse.swift index c5cde35..41f6f61 100644 --- a/Sources/Plexswift/models/operations/LogMultiLineResponse.swift +++ b/Sources/Plexswift/models/operations/LogMultiLineResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum LogMultiLineResponse { case empty - case object(Operations.LogMultiLineResponseBody) + case badRequest(Operations.LogMultiLineBadRequest) + case unauthorized(Operations.LogMultiLineUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.LogMultiLineResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.LogMultiLineBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.LogMultiLineUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/LogMultiLineResponseBody.swift b/Sources/Plexswift/models/operations/LogMultiLineResponseBody.swift deleted file mode 100644 index e327f79..0000000 --- a/Sources/Plexswift/models/operations/LogMultiLineResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct LogMultiLineResponseBody { - public let errors: [Operations.LogMultiLineErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.LogMultiLineErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.LogMultiLineResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/GetResizedPhotoResponseBody.swift b/Sources/Plexswift/models/operations/LogMultiLineUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/GetResizedPhotoResponseBody.swift rename to Sources/Plexswift/models/operations/LogMultiLineUnauthorized.swift index 7339e10..9a24de5 100644 --- a/Sources/Plexswift/models/operations/GetResizedPhotoResponseBody.swift +++ b/Sources/Plexswift/models/operations/LogMultiLineUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetResizedPhotoResponseBody { - public let errors: [Operations.GetResizedPhotoErrors]? + public struct LogMultiLineUnauthorized { + public let errors: [Operations.LogMultiLineLogErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetResizedPhotoErrors]? = nil) { + public init(errors: [Operations.LogMultiLineLogErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetResizedPhotoResponseBody: Codable { +extension Operations.LogMultiLineUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/MailingListStatus.swift b/Sources/Plexswift/models/operations/MailingListStatus.swift new file mode 100644 index 0000000..14efade --- /dev/null +++ b/Sources/Plexswift/models/operations/MailingListStatus.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Your current mailing list status + public enum MailingListStatus: String, Codable, APIValue { + case active = "active" + case unsubscribed = "unsubscribed" + }} diff --git a/Sources/Plexswift/models/operations/MarkPlayedBadRequest.swift b/Sources/Plexswift/models/operations/MarkPlayedBadRequest.swift new file mode 100644 index 0000000..e54296e --- /dev/null +++ b/Sources/Plexswift/models/operations/MarkPlayedBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct MarkPlayedBadRequest { + public let errors: [Operations.MarkPlayedErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.MarkPlayedErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.MarkPlayedBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/MarkPlayedErrors.swift b/Sources/Plexswift/models/operations/MarkPlayedErrors.swift index 7083c37..8ab919b 100644 --- a/Sources/Plexswift/models/operations/MarkPlayedErrors.swift +++ b/Sources/Plexswift/models/operations/MarkPlayedErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct MarkPlayedErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.MarkPlayedErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.MarkPlayedErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.MarkPlayedErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/MarkPlayedMediaErrors.swift b/Sources/Plexswift/models/operations/MarkPlayedMediaErrors.swift new file mode 100644 index 0000000..682f4ce --- /dev/null +++ b/Sources/Plexswift/models/operations/MarkPlayedMediaErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct MarkPlayedMediaErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.MarkPlayedMediaErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/MarkPlayedRequest.swift b/Sources/Plexswift/models/operations/MarkPlayedRequest.swift index 8875081..c139cd5 100644 --- a/Sources/Plexswift/models/operations/MarkPlayedRequest.swift +++ b/Sources/Plexswift/models/operations/MarkPlayedRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { public init(key: Double) { self._key = DecimalSerialized(wrappedValue: key) } - } -} + }} extension Operations.MarkPlayedRequest { var keyWrapper: DecimalSerialized { return _key diff --git a/Sources/Plexswift/models/operations/MarkPlayedResponse.swift b/Sources/Plexswift/models/operations/MarkPlayedResponse.swift index ecbd04d..c1498fa 100644 --- a/Sources/Plexswift/models/operations/MarkPlayedResponse.swift +++ b/Sources/Plexswift/models/operations/MarkPlayedResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum MarkPlayedResponse { case empty - case object(Operations.MarkPlayedResponseBody) + case badRequest(Operations.MarkPlayedBadRequest) + case unauthorized(Operations.MarkPlayedUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.MarkPlayedResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.MarkPlayedBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.MarkPlayedUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/MarkPlayedResponseBody.swift b/Sources/Plexswift/models/operations/MarkPlayedResponseBody.swift deleted file mode 100644 index 3ea9060..0000000 --- a/Sources/Plexswift/models/operations/MarkPlayedResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct MarkPlayedResponseBody { - public let errors: [Operations.MarkPlayedErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.MarkPlayedErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.MarkPlayedResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/MarkPlayedUnauthorized.swift b/Sources/Plexswift/models/operations/MarkPlayedUnauthorized.swift new file mode 100644 index 0000000..8f324d3 --- /dev/null +++ b/Sources/Plexswift/models/operations/MarkPlayedUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct MarkPlayedUnauthorized { + public let errors: [Operations.MarkPlayedMediaErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.MarkPlayedMediaErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.MarkPlayedUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/MarkUnplayedBadRequest.swift b/Sources/Plexswift/models/operations/MarkUnplayedBadRequest.swift new file mode 100644 index 0000000..96376b4 --- /dev/null +++ b/Sources/Plexswift/models/operations/MarkUnplayedBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct MarkUnplayedBadRequest { + public let errors: [Operations.MarkUnplayedErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.MarkUnplayedErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.MarkUnplayedBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/MarkUnplayedErrors.swift b/Sources/Plexswift/models/operations/MarkUnplayedErrors.swift index c857183..e710409 100644 --- a/Sources/Plexswift/models/operations/MarkUnplayedErrors.swift +++ b/Sources/Plexswift/models/operations/MarkUnplayedErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct MarkUnplayedErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.MarkUnplayedErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.MarkUnplayedErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.MarkUnplayedErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/MarkUnplayedMediaErrors.swift b/Sources/Plexswift/models/operations/MarkUnplayedMediaErrors.swift new file mode 100644 index 0000000..dcda067 --- /dev/null +++ b/Sources/Plexswift/models/operations/MarkUnplayedMediaErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct MarkUnplayedMediaErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.MarkUnplayedMediaErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/MarkUnplayedRequest.swift b/Sources/Plexswift/models/operations/MarkUnplayedRequest.swift index 07bf400..732718b 100644 --- a/Sources/Plexswift/models/operations/MarkUnplayedRequest.swift +++ b/Sources/Plexswift/models/operations/MarkUnplayedRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -16,8 +16,7 @@ extension Operations { public init(key: Double) { self._key = DecimalSerialized(wrappedValue: key) } - } -} + }} extension Operations.MarkUnplayedRequest { var keyWrapper: DecimalSerialized { return _key diff --git a/Sources/Plexswift/models/operations/MarkUnplayedResponse.swift b/Sources/Plexswift/models/operations/MarkUnplayedResponse.swift index 6891038..e42c139 100644 --- a/Sources/Plexswift/models/operations/MarkUnplayedResponse.swift +++ b/Sources/Plexswift/models/operations/MarkUnplayedResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum MarkUnplayedResponse { case empty - case object(Operations.MarkUnplayedResponseBody) + case badRequest(Operations.MarkUnplayedBadRequest) + case unauthorized(Operations.MarkUnplayedUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.MarkUnplayedResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.MarkUnplayedBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.MarkUnplayedUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/MarkUnplayedResponseBody.swift b/Sources/Plexswift/models/operations/MarkUnplayedResponseBody.swift deleted file mode 100644 index e7f9c08..0000000 --- a/Sources/Plexswift/models/operations/MarkUnplayedResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct MarkUnplayedResponseBody { - public let errors: [Operations.MarkUnplayedErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.MarkUnplayedErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.MarkUnplayedResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/DeleteLibraryResponseBody.swift b/Sources/Plexswift/models/operations/MarkUnplayedUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/DeleteLibraryResponseBody.swift rename to Sources/Plexswift/models/operations/MarkUnplayedUnauthorized.swift index 1c750c6..688a6f6 100644 --- a/Sources/Plexswift/models/operations/DeleteLibraryResponseBody.swift +++ b/Sources/Plexswift/models/operations/MarkUnplayedUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct DeleteLibraryResponseBody { - public let errors: [Operations.DeleteLibraryErrors]? + public struct MarkUnplayedUnauthorized { + public let errors: [Operations.MarkUnplayedMediaErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.DeleteLibraryErrors]? = nil) { + public init(errors: [Operations.MarkUnplayedMediaErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.DeleteLibraryResponseBody: Codable { +extension Operations.MarkUnplayedUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/Media.swift b/Sources/Plexswift/models/operations/Media.swift index c24b1d4..dff231b 100644 --- a/Sources/Plexswift/models/operations/Media.swift +++ b/Sources/Plexswift/models/operations/Media.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -52,8 +52,7 @@ extension Operations { self._videoResolution = DecimalSerialized(wrappedValue: videoResolution) self._width = DecimalSerialized(wrappedValue: width) } - } -} + }} extension Operations.Media: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/MediaContainer.swift b/Sources/Plexswift/models/operations/MediaContainer.swift index ad83387..7185d8b 100644 --- a/Sources/Plexswift/models/operations/MediaContainer.swift +++ b/Sources/Plexswift/models/operations/MediaContainer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -121,8 +121,7 @@ extension Operations { self.version = version self.voiceSearch = voiceSearch } - } -} + }} extension Operations.MediaContainer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/MediaProvider.swift b/Sources/Plexswift/models/operations/MediaProvider.swift new file mode 100644 index 0000000..11c40fb --- /dev/null +++ b/Sources/Plexswift/models/operations/MediaProvider.swift @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct MediaProvider { + public let feature: [Operations.Feature]? + public let identifier: String? + public let protocols: String? + public let title: String? + public let types: String? + + /// Creates an object with the specified parameters + /// + /// + public init(feature: [Operations.Feature]? = nil, identifier: String? = nil, protocols: String? = nil, title: String? = nil, types: String? = nil) { + self.feature = feature + self.identifier = identifier + self.protocols = protocols + self.title = title + self.types = types + } + }} + +extension Operations.MediaProvider: Codable { + enum CodingKeys: String, CodingKey { + case feature = "Feature" + case identifier + case protocols + case title + case types + } +} + diff --git a/Sources/Plexswift/models/operations/MediaReviewsVisibility.swift b/Sources/Plexswift/models/operations/MediaReviewsVisibility.swift new file mode 100644 index 0000000..51f522b --- /dev/null +++ b/Sources/Plexswift/models/operations/MediaReviewsVisibility.swift @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum MediaReviewsVisibility: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/Metadata.swift b/Sources/Plexswift/models/operations/Metadata.swift index 0b063cc..1b70379 100644 --- a/Sources/Plexswift/models/operations/Metadata.swift +++ b/Sources/Plexswift/models/operations/Metadata.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -84,8 +84,7 @@ extension Operations { self.userState = userState self.year = year } - } -} + }} extension Operations.Metadata: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/MinSize.swift b/Sources/Plexswift/models/operations/MinSize.swift index 54c1b9a..6f29027 100644 --- a/Sources/Plexswift/models/operations/MinSize.swift +++ b/Sources/Plexswift/models/operations/MinSize.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum MinSize: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/MyPlex.swift b/Sources/Plexswift/models/operations/MyPlex.swift index cebc3f4..812fdc7 100644 --- a/Sources/Plexswift/models/operations/MyPlex.swift +++ b/Sources/Plexswift/models/operations/MyPlex.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -37,8 +37,7 @@ extension Operations { self.subscriptionState = subscriptionState self.username = username } - } -} + }} extension Operations.MyPlex: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/OnlyTransient.swift b/Sources/Plexswift/models/operations/OnlyTransient.swift index c83f8c1..518b23a 100644 --- a/Sources/Plexswift/models/operations/OnlyTransient.swift +++ b/Sources/Plexswift/models/operations/OnlyTransient.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum OnlyTransient: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/Operator.swift b/Sources/Plexswift/models/operations/Operator.swift index b73d389..c3d48cf 100644 --- a/Sources/Plexswift/models/operations/Operator.swift +++ b/Sources/Plexswift/models/operations/Operator.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,8 +15,7 @@ extension Operations { self.key = key self.title = title } - } -} + }} extension Operations.Operator: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Part.swift b/Sources/Plexswift/models/operations/Part.swift index 180e16b..653b447 100644 --- a/Sources/Plexswift/models/operations/Part.swift +++ b/Sources/Plexswift/models/operations/Part.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -35,8 +35,7 @@ extension Operations { self._size = DecimalSerialized(wrappedValue: size) self.videoProfile = videoProfile } - } -} + }} extension Operations.Part: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/PastSubscription.swift b/Sources/Plexswift/models/operations/PastSubscription.swift new file mode 100644 index 0000000..c0d8eb3 --- /dev/null +++ b/Sources/Plexswift/models/operations/PastSubscription.swift @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PastSubscription { + public let billing: Operations.Billing + public let canceled: Bool + public let canConvert: Bool + public let canDowngrade: Bool + public let canReactivate: Bool + public let canUpgrade: Bool + public let endsAt: Int + public let gracePeriod: Bool + public let id: String + public let mode: String + public let onHold: Bool + public let renewsAt: Int + public let state: Operations.PostUsersSignInDataState + public let transfer: String + public let type: String + + /// Creates an object with the specified parameters + /// + /// + public init(billing: Operations.Billing, canceled: Bool, canConvert: Bool, canDowngrade: Bool, canReactivate: Bool, canUpgrade: Bool, endsAt: Int, gracePeriod: Bool, id: String, mode: String, onHold: Bool, renewsAt: Int, state: Operations.PostUsersSignInDataState, transfer: String, type: String) { + self.billing = billing + self.canceled = canceled + self.canConvert = canConvert + self.canDowngrade = canDowngrade + self.canReactivate = canReactivate + self.canUpgrade = canUpgrade + self.endsAt = endsAt + self.gracePeriod = gracePeriod + self.id = id + self.mode = mode + self.onHold = onHold + self.renewsAt = renewsAt + self.state = state + self.transfer = transfer + self.type = type + } + }} + +extension Operations.PastSubscription: Codable { + enum CodingKeys: String, CodingKey { + case billing + case canceled + case canConvert + case canDowngrade + case canReactivate + case canUpgrade + case endsAt + case gracePeriod + case id + case mode + case onHold + case renewsAt + case state + case transfer + case type + } +} + diff --git a/Sources/Plexswift/models/operations/PathParamFilter.swift b/Sources/Plexswift/models/operations/PathParamFilter.swift deleted file mode 100644 index 9ae6cdc..0000000 --- a/Sources/Plexswift/models/operations/PathParamFilter.swift +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Filter - public enum PathParamFilter: String, Codable, APIValue { - case all = "all" - case available = "available" - case released = "released" - } -} diff --git a/Sources/Plexswift/models/operations/PathParamTaskName.swift b/Sources/Plexswift/models/operations/PathParamTaskName.swift index e9f9d64..f5695a8 100644 --- a/Sources/Plexswift/models/operations/PathParamTaskName.swift +++ b/Sources/Plexswift/models/operations/PathParamTaskName.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,5 +19,4 @@ extension Operations { case refreshLocalMedia = "RefreshLocalMedia" case refreshPeriodicMetadata = "RefreshPeriodicMetadata" case upgradeMediaAnalysis = "UpgradeMediaAnalysis" - } -} + }} diff --git a/Sources/Plexswift/models/operations/PerformSearchBadRequest.swift b/Sources/Plexswift/models/operations/PerformSearchBadRequest.swift new file mode 100644 index 0000000..7d24d45 --- /dev/null +++ b/Sources/Plexswift/models/operations/PerformSearchBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct PerformSearchBadRequest { + public let errors: [Operations.PerformSearchErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.PerformSearchErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.PerformSearchBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/PerformSearchErrors.swift b/Sources/Plexswift/models/operations/PerformSearchErrors.swift index d78ee2e..1680a3c 100644 --- a/Sources/Plexswift/models/operations/PerformSearchErrors.swift +++ b/Sources/Plexswift/models/operations/PerformSearchErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct PerformSearchErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.PerformSearchErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.PerformSearchErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.PerformSearchErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/PerformSearchRequest.swift b/Sources/Plexswift/models/operations/PerformSearchRequest.swift index e53ba8c..ce78de6 100644 --- a/Sources/Plexswift/models/operations/PerformSearchRequest.swift +++ b/Sources/Plexswift/models/operations/PerformSearchRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self._limit = DecimalSerialized(wrappedValue: limit) self._sectionId = DecimalSerialized(wrappedValue: sectionId) } - } -} + }} extension Operations.PerformSearchRequest { var sectionIdWrapper: DecimalSerialized { return _sectionId diff --git a/Sources/Plexswift/models/operations/PerformSearchResponse.swift b/Sources/Plexswift/models/operations/PerformSearchResponse.swift index e22bbfe..4626932 100644 --- a/Sources/Plexswift/models/operations/PerformSearchResponse.swift +++ b/Sources/Plexswift/models/operations/PerformSearchResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum PerformSearchResponse { case empty - case object(Operations.PerformSearchResponseBody) + case badRequest(Operations.PerformSearchBadRequest) + case unauthorized(Operations.PerformSearchUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.PerformSearchResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.PerformSearchBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.PerformSearchUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/PerformSearchResponseBody.swift b/Sources/Plexswift/models/operations/PerformSearchResponseBody.swift deleted file mode 100644 index 42a2930..0000000 --- a/Sources/Plexswift/models/operations/PerformSearchResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct PerformSearchResponseBody { - public let errors: [Operations.PerformSearchErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.PerformSearchErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.PerformSearchResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/PerformSearchSearchErrors.swift b/Sources/Plexswift/models/operations/PerformSearchSearchErrors.swift new file mode 100644 index 0000000..c5c29f0 --- /dev/null +++ b/Sources/Plexswift/models/operations/PerformSearchSearchErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PerformSearchSearchErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.PerformSearchSearchErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/PerformSearchUnauthorized.swift b/Sources/Plexswift/models/operations/PerformSearchUnauthorized.swift new file mode 100644 index 0000000..220afb7 --- /dev/null +++ b/Sources/Plexswift/models/operations/PerformSearchUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct PerformSearchUnauthorized { + public let errors: [Operations.PerformSearchSearchErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.PerformSearchSearchErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.PerformSearchUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/PerformVoiceSearchBadRequest.swift b/Sources/Plexswift/models/operations/PerformVoiceSearchBadRequest.swift new file mode 100644 index 0000000..5ede0ba --- /dev/null +++ b/Sources/Plexswift/models/operations/PerformVoiceSearchBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct PerformVoiceSearchBadRequest { + public let errors: [Operations.PerformVoiceSearchErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.PerformVoiceSearchErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.PerformVoiceSearchBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/PerformVoiceSearchErrors.swift b/Sources/Plexswift/models/operations/PerformVoiceSearchErrors.swift index 48f5e35..4a28289 100644 --- a/Sources/Plexswift/models/operations/PerformVoiceSearchErrors.swift +++ b/Sources/Plexswift/models/operations/PerformVoiceSearchErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct PerformVoiceSearchErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.PerformVoiceSearchErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.PerformVoiceSearchErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.PerformVoiceSearchErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/PerformVoiceSearchRequest.swift b/Sources/Plexswift/models/operations/PerformVoiceSearchRequest.swift index d9a7768..7d56b06 100644 --- a/Sources/Plexswift/models/operations/PerformVoiceSearchRequest.swift +++ b/Sources/Plexswift/models/operations/PerformVoiceSearchRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self._limit = DecimalSerialized(wrappedValue: limit) self._sectionId = DecimalSerialized(wrappedValue: sectionId) } - } -} + }} extension Operations.PerformVoiceSearchRequest { var sectionIdWrapper: DecimalSerialized { return _sectionId diff --git a/Sources/Plexswift/models/operations/PerformVoiceSearchResponse.swift b/Sources/Plexswift/models/operations/PerformVoiceSearchResponse.swift index bc87aed..4d18e3d 100644 --- a/Sources/Plexswift/models/operations/PerformVoiceSearchResponse.swift +++ b/Sources/Plexswift/models/operations/PerformVoiceSearchResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum PerformVoiceSearchResponse { case empty - case object(Operations.PerformVoiceSearchResponseBody) + case badRequest(Operations.PerformVoiceSearchBadRequest) + case unauthorized(Operations.PerformVoiceSearchUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.PerformVoiceSearchResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.PerformVoiceSearchBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.PerformVoiceSearchUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/PerformVoiceSearchSearchErrors.swift b/Sources/Plexswift/models/operations/PerformVoiceSearchSearchErrors.swift new file mode 100644 index 0000000..8417c24 --- /dev/null +++ b/Sources/Plexswift/models/operations/PerformVoiceSearchSearchErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PerformVoiceSearchSearchErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.PerformVoiceSearchSearchErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/PerformVoiceSearchUnauthorized.swift b/Sources/Plexswift/models/operations/PerformVoiceSearchUnauthorized.swift new file mode 100644 index 0000000..a2e89b5 --- /dev/null +++ b/Sources/Plexswift/models/operations/PerformVoiceSearchUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct PerformVoiceSearchUnauthorized { + public let errors: [Operations.PerformVoiceSearchSearchErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.PerformVoiceSearchSearchErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.PerformVoiceSearchUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/Pivot.swift b/Sources/Plexswift/models/operations/Pivot.swift new file mode 100644 index 0000000..30d4f09 --- /dev/null +++ b/Sources/Plexswift/models/operations/Pivot.swift @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Pivot { + public let context: String? + public let id: String? + public let key: String? + public let symbol: String? + public let title: String? + public let type: String? + + /// Creates an object with the specified parameters + /// + /// + public init(context: String? = nil, id: String? = nil, key: String? = nil, symbol: String? = nil, title: String? = nil, type: String? = nil) { + self.context = context + self.id = id + self.key = key + self.symbol = symbol + self.title = title + self.type = type + } + }} + +extension Operations.Pivot: Codable { + enum CodingKeys: String, CodingKey { + case context + case id + case key + case symbol + case title + case type + } +} + diff --git a/Sources/Plexswift/models/operations/Player.swift b/Sources/Plexswift/models/operations/Player.swift index 5814db4..b24c448 100644 --- a/Sources/Plexswift/models/operations/Player.swift +++ b/Sources/Plexswift/models/operations/Player.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -41,8 +41,7 @@ extension Operations { self.userID = userID self.version = version } - } -} + }} extension Operations.Player: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/PlaylistType.swift b/Sources/Plexswift/models/operations/PlaylistType.swift index 0316a72..f08d21b 100644 --- a/Sources/Plexswift/models/operations/PlaylistType.swift +++ b/Sources/Plexswift/models/operations/PlaylistType.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -8,5 +8,4 @@ extension Operations { case audio = "audio" case video = "video" case photo = "photo" - } -} + }} diff --git a/Sources/Plexswift/models/operations/PlexDevice.swift b/Sources/Plexswift/models/operations/PlexDevice.swift new file mode 100644 index 0000000..b6ab5cc --- /dev/null +++ b/Sources/Plexswift/models/operations/PlexDevice.swift @@ -0,0 +1,160 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PlexDevice { + public let accessToken: String + public let clientIdentifier: String + public let connections: [Operations.Connections] + @DateTime + public private(set) var createdAt: Date + public let device: String + public let dnsRebindingProtection: Bool + public let home: Bool + public let httpsRequired: Bool + @DateTime + public private(set) var lastSeenAt: Date + public let name: String + public let natLoopbackSupported: Bool + public let owned: Bool + /// ownerId is null when the device is owned by the token used to send the request + public let ownerId: Int + public let platform: String + public let platformVersion: String + public let presence: Bool + public let product: String + public let productVersion: String + public let provides: String + public let publicAddress: String + public let publicAddressMatches: Bool + public let relay: Bool + public let sourceTitle: String + public let synced: Bool + + /// Creates an object with the specified parameters + /// + /// - Parameter ownerId: ownerId is null when the device is owned by the token used to send the request + /// + public init(accessToken: String, clientIdentifier: String, connections: [Operations.Connections], createdAt: Date, device: String, dnsRebindingProtection: Bool, home: Bool, httpsRequired: Bool, lastSeenAt: Date, name: String, natLoopbackSupported: Bool, owned: Bool, ownerId: Int, platform: String, platformVersion: String, presence: Bool, product: String, productVersion: String, provides: String, publicAddress: String, publicAddressMatches: Bool, relay: Bool, sourceTitle: String, synced: Bool) { + self.accessToken = accessToken + self.clientIdentifier = clientIdentifier + self.connections = connections + self._createdAt = DateTime(wrappedValue: createdAt) + self.device = device + self.dnsRebindingProtection = dnsRebindingProtection + self.home = home + self.httpsRequired = httpsRequired + self._lastSeenAt = DateTime(wrappedValue: lastSeenAt) + self.name = name + self.natLoopbackSupported = natLoopbackSupported + self.owned = owned + self.ownerId = ownerId + self.platform = platform + self.platformVersion = platformVersion + self.presence = presence + self.product = product + self.productVersion = productVersion + self.provides = provides + self.publicAddress = publicAddress + self.publicAddressMatches = publicAddressMatches + self.relay = relay + self.sourceTitle = sourceTitle + self.synced = synced + } + }} + +extension Operations.PlexDevice: Codable { + enum CodingKeys: String, CodingKey { + case accessToken + case clientIdentifier + case connections + case createdAt + case device + case dnsRebindingProtection + case home + case httpsRequired + case lastSeenAt + case name + case natLoopbackSupported + case owned + case ownerId + case platform + case platformVersion + case presence + case product + case productVersion + case provides + case publicAddress + case publicAddressMatches + case relay + case sourceTitle + case synced + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.accessToken = try container.decode(String.self, forKey: .accessToken) + self.clientIdentifier = try container.decode(String.self, forKey: .clientIdentifier) + self.connections = try container.decode([Operations.Connections].self, forKey: .connections) + self._createdAt = try container.decode(DateTime.self, forKey: .createdAt) + self.device = try container.decode(String.self, forKey: .device) + self.dnsRebindingProtection = try container.decode(Bool.self, forKey: .dnsRebindingProtection) + self.home = try container.decode(Bool.self, forKey: .home) + self.httpsRequired = try container.decode(Bool.self, forKey: .httpsRequired) + self._lastSeenAt = try container.decode(DateTime.self, forKey: .lastSeenAt) + self.name = try container.decode(String.self, forKey: .name) + self.natLoopbackSupported = try container.decode(Bool.self, forKey: .natLoopbackSupported) + self.owned = try container.decode(Bool.self, forKey: .owned) + self.ownerId = try container.decode(Int.self, forKey: .ownerId) + self.platform = try container.decode(String.self, forKey: .platform) + self.platformVersion = try container.decode(String.self, forKey: .platformVersion) + self.presence = try container.decode(Bool.self, forKey: .presence) + self.product = try container.decode(String.self, forKey: .product) + self.productVersion = try container.decode(String.self, forKey: .productVersion) + self.provides = try container.decode(String.self, forKey: .provides) + self.publicAddress = try container.decode(String.self, forKey: .publicAddress) + self.publicAddressMatches = try container.decode(Bool.self, forKey: .publicAddressMatches) + self.relay = try container.decode(Bool.self, forKey: .relay) + self.sourceTitle = try container.decode(String.self, forKey: .sourceTitle) + self.synced = try container.decode(Bool.self, forKey: .synced) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.accessToken, forKey: .accessToken) + try container.encode(self.clientIdentifier, forKey: .clientIdentifier) + try container.encode(self.connections, forKey: .connections) + try container.encode(self._createdAt, forKey: .createdAt) + try container.encode(self.device, forKey: .device) + try container.encode(self.dnsRebindingProtection, forKey: .dnsRebindingProtection) + try container.encode(self.home, forKey: .home) + try container.encode(self.httpsRequired, forKey: .httpsRequired) + try container.encode(self._lastSeenAt, forKey: .lastSeenAt) + try container.encode(self.name, forKey: .name) + try container.encode(self.natLoopbackSupported, forKey: .natLoopbackSupported) + try container.encode(self.owned, forKey: .owned) + try container.encode(self.ownerId, forKey: .ownerId) + try container.encode(self.platform, forKey: .platform) + try container.encode(self.platformVersion, forKey: .platformVersion) + try container.encode(self.presence, forKey: .presence) + try container.encode(self.product, forKey: .product) + try container.encode(self.productVersion, forKey: .productVersion) + try container.encode(self.provides, forKey: .provides) + try container.encode(self.publicAddress, forKey: .publicAddress) + try container.encode(self.publicAddressMatches, forKey: .publicAddressMatches) + try container.encode(self.relay, forKey: .relay) + try container.encode(self.sourceTitle, forKey: .sourceTitle) + try container.encode(self.synced, forKey: .synced) + } +} + +extension Operations.PlexDevice { + var createdAtWrapper: DateTime { + return _createdAt + } + var lastSeenAtWrapper: DateTime { + return _lastSeenAt + } +} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationErrors.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationErrors.swift new file mode 100644 index 0000000..c732c42 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PostUsersSignInDataAuthenticationErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.PostUsersSignInDataAuthenticationErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationFeatures.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationFeatures.swift new file mode 100644 index 0000000..1a324c0 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationFeatures.swift @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum PostUsersSignInDataAuthenticationFeatures: String, Codable, APIValue { + case androidDolbyVision = "Android - Dolby Vision" + case androidPiP = "Android - PiP" + case cuSunset = "CU Sunset" + case hrkEnableEur = "HRK_enable_EUR" + case trebleShowFeatures = "TREBLE-show-features" + case adCountdownTimer = "ad-countdown-timer" + case adaptiveBitrate = "adaptive_bitrate" + case amazonLoopDebug = "amazon-loop-debug" + case avodAdAnalysis = "avod-ad-analysis" + case avodNewMedia = "avod-new-media" + case blacklistGetSignin = "blacklist_get_signin" + case clientRadioStations = "client-radio-stations" + case cloudflareTurnstileRequired = "cloudflare-turnstile-required" + case collections = "collections" + case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications" + case communityAccessPlexTv = "community_access_plex_tv" + case companionsSonos = "companions_sonos" + case customHomeRemoval = "custom-home-removal" + case disableHomeUserFriendships = "disable_home_user_friendships" + case disableSharingFriendships = "disable_sharing_friendships" + case drmSupport = "drm_support" + case excludeRestrictions = "exclude restrictions" + case federatedAuth = "federated-auth" + case friendRequestPushNotifications = "friend_request_push_notifications" + case guidedUpgrade = "guided-upgrade" + case home = "home" + case increasePasswordComplexity = "increase-password-complexity" + case ios14PrivacyBanner = "ios14-privacy-banner" + case iterableNotificationTokens = "iterable-notification-tokens" + case keepPaymentMethod = "keep-payment-method" + case kevinBacon = "kevin-bacon" + case koreaConsent = "korea-consent" + case leIsrgRootX1 = "le_isrg_root_x1" + case letsEncrypt = "lets_encrypt" + case lightningDvrPivot = "lightning-dvr-pivot" + case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments" + case livetv = "livetv" + case metadataSearch = "metadata_search" + case newPlexPassPrices = "new_plex_pass_prices" + case newsProviderSunsetModal = "news-provider-sunset-modal" + case photosFavorites = "photos-favorites" + case photosMetadataEdition = "photos-metadata-edition" + case pmsHealth = "pms_health" + case radio = "radio" + case rateLimitClientToken = "rate-limit-client-token" + case scrobblingServicePlexTv = "scrobbling-service-plex-tv" + case sharedServerNotification = "shared_server_notification" + case sharedSourceNotification = "shared_source_notification" + case signinWithApple = "signin_with_apple" + case springServeAdProvider = "spring_serve_ad_provider" + case transcoderCache = "transcoder_cache" + case tunerSharing = "tuner-sharing" + case twoFactorAuthentication = "two-factor-authentication" + case unsupportedtuners = "unsupportedtuners" + case upgrade3Ds2 = "upgrade-3ds2" + case vodSchema = "vod-schema" + case vodCloudflare = "vod_cloudflare" + case watchTogetherInvite = "watch-together-invite" + case webServerDashboard = "web_server_dashboard" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationResponseStatus.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationResponseStatus.swift new file mode 100644 index 0000000..5364367 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationResponseStatus.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// String representation of subscriptionActive + public enum PostUsersSignInDataAuthenticationResponseStatus: String, Codable, APIValue { + case inactive = "Inactive" + case active = "Active" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationStatus.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationStatus.swift new file mode 100644 index 0000000..fe568fa --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationStatus.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// String representation of subscriptionActive + public enum PostUsersSignInDataAuthenticationStatus: String, Codable, APIValue { + case inactive = "Inactive" + case active = "Active" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationSubscription.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationSubscription.swift new file mode 100644 index 0000000..b7a603b --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataAuthenticationSubscription.swift @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PostUsersSignInDataAuthenticationSubscription { + /// If the account's Plex Pass subscription is active + public let active: Bool? + /// List of features allowed on your Plex Pass subscription + public let features: [Operations.PostUsersSignInDataAuthenticationFeatures]? + /// Payment service used for your Plex Pass subscription + public let paymentService: String? + /// Name of Plex Pass subscription plan + public let plan: String? + /// String representation of subscriptionActive + public let status: Operations.PostUsersSignInDataAuthenticationResponseStatus? + /// Date the account subscribed to Plex Pass + public let subscribedAt: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter active: If the account's Plex Pass subscription is active + /// - Parameter features: List of features allowed on your Plex Pass subscription + /// - Parameter paymentService: Payment service used for your Plex Pass subscription + /// - Parameter plan: Name of Plex Pass subscription plan + /// - Parameter status: String representation of subscriptionActive + /// - Parameter subscribedAt: Date the account subscribed to Plex Pass + /// + public init(active: Bool? = nil, features: [Operations.PostUsersSignInDataAuthenticationFeatures]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.PostUsersSignInDataAuthenticationResponseStatus? = nil, subscribedAt: String? = nil) { + self.active = active + self.features = features + self.paymentService = paymentService + self.plan = plan + self.status = status + self.subscribedAt = subscribedAt + } + }} + +extension Operations.PostUsersSignInDataAuthenticationSubscription: Codable { + enum CodingKeys: String, CodingKey { + case active + case features + case paymentService + case plan + case status + case subscribedAt + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataAutoSelectSubtitle.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataAutoSelectSubtitle.swift new file mode 100644 index 0000000..f67578f --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataAutoSelectSubtitle.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + public enum PostUsersSignInDataAutoSelectSubtitle: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataBadRequest.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataBadRequest.swift new file mode 100644 index 0000000..cd402cc --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct PostUsersSignInDataBadRequest { + public let errors: [Operations.PostUsersSignInDataErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.PostUsersSignInDataErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.PostUsersSignInDataBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.swift new file mode 100644 index 0000000..a9dfe00 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + public enum PostUsersSignInDataDefaultSubtitleAccessibility: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleForced.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleForced.swift new file mode 100644 index 0000000..7ab1c94 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataDefaultSubtitleForced.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + public enum PostUsersSignInDataDefaultSubtitleForced: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataErrors.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataErrors.swift new file mode 100644 index 0000000..1c73339 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PostUsersSignInDataErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.PostUsersSignInDataErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataFeatures.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataFeatures.swift new file mode 100644 index 0000000..bd6f110 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataFeatures.swift @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum PostUsersSignInDataFeatures: String, Codable, APIValue { + case androidDolbyVision = "Android - Dolby Vision" + case androidPiP = "Android - PiP" + case cuSunset = "CU Sunset" + case hrkEnableEur = "HRK_enable_EUR" + case trebleShowFeatures = "TREBLE-show-features" + case adCountdownTimer = "ad-countdown-timer" + case adaptiveBitrate = "adaptive_bitrate" + case amazonLoopDebug = "amazon-loop-debug" + case avodAdAnalysis = "avod-ad-analysis" + case avodNewMedia = "avod-new-media" + case blacklistGetSignin = "blacklist_get_signin" + case clientRadioStations = "client-radio-stations" + case cloudflareTurnstileRequired = "cloudflare-turnstile-required" + case collections = "collections" + case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications" + case communityAccessPlexTv = "community_access_plex_tv" + case companionsSonos = "companions_sonos" + case customHomeRemoval = "custom-home-removal" + case disableHomeUserFriendships = "disable_home_user_friendships" + case disableSharingFriendships = "disable_sharing_friendships" + case drmSupport = "drm_support" + case excludeRestrictions = "exclude restrictions" + case federatedAuth = "federated-auth" + case friendRequestPushNotifications = "friend_request_push_notifications" + case guidedUpgrade = "guided-upgrade" + case home = "home" + case increasePasswordComplexity = "increase-password-complexity" + case ios14PrivacyBanner = "ios14-privacy-banner" + case iterableNotificationTokens = "iterable-notification-tokens" + case keepPaymentMethod = "keep-payment-method" + case kevinBacon = "kevin-bacon" + case koreaConsent = "korea-consent" + case leIsrgRootX1 = "le_isrg_root_x1" + case letsEncrypt = "lets_encrypt" + case lightningDvrPivot = "lightning-dvr-pivot" + case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments" + case livetv = "livetv" + case metadataSearch = "metadata_search" + case newPlexPassPrices = "new_plex_pass_prices" + case newsProviderSunsetModal = "news-provider-sunset-modal" + case photosFavorites = "photos-favorites" + case photosMetadataEdition = "photos-metadata-edition" + case pmsHealth = "pms_health" + case radio = "radio" + case rateLimitClientToken = "rate-limit-client-token" + case scrobblingServicePlexTv = "scrobbling-service-plex-tv" + case sharedServerNotification = "shared_server_notification" + case sharedSourceNotification = "shared_source_notification" + case signinWithApple = "signin_with_apple" + case springServeAdProvider = "spring_serve_ad_provider" + case transcoderCache = "transcoder_cache" + case tunerSharing = "tuner-sharing" + case twoFactorAuthentication = "two-factor-authentication" + case unsupportedtuners = "unsupportedtuners" + case upgrade3Ds2 = "upgrade-3ds2" + case vodSchema = "vod-schema" + case vodCloudflare = "vod_cloudflare" + case watchTogetherInvite = "watch-together-invite" + case webServerDashboard = "web_server_dashboard" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataMailingListStatus.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataMailingListStatus.swift new file mode 100644 index 0000000..b66ece3 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataMailingListStatus.swift @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Your current mailing list status + public enum PostUsersSignInDataMailingListStatus: String, Codable, APIValue { + case active = "active" + case unsubscribed = "unsubscribed" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataMediaReviewsVisibility.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataMediaReviewsVisibility.swift new file mode 100644 index 0000000..f9d162e --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataMediaReviewsVisibility.swift @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum PostUsersSignInDataMediaReviewsVisibility: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataRequest.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataRequest.swift new file mode 100644 index 0000000..4945ff5 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataRequest.swift @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PostUsersSignInDataRequest: APIValue { + /// Login credentials + public let requestBody: Operations.PostUsersSignInDataRequestBody? + /// 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 let xPlexClientIdentifier: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter requestBody: Login credentials + /// - Parameter 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) + /// + /// + public init(requestBody: Operations.PostUsersSignInDataRequestBody? = nil, xPlexClientIdentifier: String? = nil) { + self.requestBody = requestBody + self.xPlexClientIdentifier = xPlexClientIdentifier + } + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataRequestBody.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataRequestBody.swift new file mode 100644 index 0000000..dae2864 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataRequestBody.swift @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Login credentials + public struct PostUsersSignInDataRequestBody: APIValue { + public let login: String + public let password: String + public let rememberMe: Bool? + public let verificationCode: String? + + /// Creates an object with the specified parameters + /// + /// + public init(login: String, password: String, rememberMe: Bool? = nil, verificationCode: String? = nil) { + self.login = login + self.password = password + self.rememberMe = rememberMe + self.verificationCode = verificationCode + } + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataResponse.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataResponse.swift new file mode 100644 index 0000000..ebff602 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataResponse.swift @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A response model + public enum PostUsersSignInDataResponse { + case empty + case badRequest(Operations.PostUsersSignInDataBadRequest) + case unauthorized(Operations.PostUsersSignInDataUnauthorized) + case userPlexAccount(Operations.PostUsersSignInDataUserPlexAccount) + + var isEmpty: Bool { + if case .empty = self { + return true + } else { + return false + } + } + + public func badRequest() throws -> Operations.PostUsersSignInDataBadRequest { + guard case .badRequest(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func unauthorized() throws -> Operations.PostUsersSignInDataUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + + public func userPlexAccount() throws -> Operations.PostUsersSignInDataUserPlexAccount { + guard case .userPlexAccount(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataServices.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataServices.swift new file mode 100644 index 0000000..095bfbd --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataServices.swift @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PostUsersSignInDataServices { + public let endpoint: String + public let identifier: String + public let secret: String + public let status: Operations.PostUsersSignInDataStatus + public let token: String + + /// Creates an object with the specified parameters + /// + /// + public init(endpoint: String, identifier: String, secret: String, status: Operations.PostUsersSignInDataStatus, token: String) { + self.endpoint = endpoint + self.identifier = identifier + self.secret = secret + self.status = status + self.token = token + } + }} + +extension Operations.PostUsersSignInDataServices: Codable { + enum CodingKeys: String, CodingKey { + case endpoint + case identifier + case secret + case status + case token + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataState.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataState.swift new file mode 100644 index 0000000..e4c68da --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataState.swift @@ -0,0 +1,8 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum PostUsersSignInDataState: String, Codable, APIValue { + case ended = "ended" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataStatus.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataStatus.swift new file mode 100644 index 0000000..cc6ff0d --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataStatus.swift @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum PostUsersSignInDataStatus: String, Codable, APIValue { + case online = "online" + case offline = "offline" + }} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataSubscription.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataSubscription.swift new file mode 100644 index 0000000..ab5bf42 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataSubscription.swift @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// If the account’s Plex Pass subscription is active + public struct PostUsersSignInDataSubscription { + /// If the account's Plex Pass subscription is active + public let active: Bool? + /// List of features allowed on your Plex Pass subscription + public let features: [Operations.PostUsersSignInDataFeatures]? + /// Payment service used for your Plex Pass subscription + public let paymentService: String? + /// Name of Plex Pass subscription plan + public let plan: String? + /// String representation of subscriptionActive + public let status: Operations.PostUsersSignInDataAuthenticationStatus? + /// Date the account subscribed to Plex Pass + public let subscribedAt: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter active: If the account's Plex Pass subscription is active + /// - Parameter features: List of features allowed on your Plex Pass subscription + /// - Parameter paymentService: Payment service used for your Plex Pass subscription + /// - Parameter plan: Name of Plex Pass subscription plan + /// - Parameter status: String representation of subscriptionActive + /// - Parameter subscribedAt: Date the account subscribed to Plex Pass + /// + public init(active: Bool? = nil, features: [Operations.PostUsersSignInDataFeatures]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.PostUsersSignInDataAuthenticationStatus? = nil, subscribedAt: String? = nil) { + self.active = active + self.features = features + self.paymentService = paymentService + self.plan = plan + self.status = status + self.subscribedAt = subscribedAt + } + }} + +extension Operations.PostUsersSignInDataSubscription: Codable { + enum CodingKeys: String, CodingKey { + case active + case features + case paymentService + case plan + case status + case subscribedAt + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataUnauthorized.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataUnauthorized.swift new file mode 100644 index 0000000..91dc9b6 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct PostUsersSignInDataUnauthorized { + public let errors: [Operations.PostUsersSignInDataAuthenticationErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.PostUsersSignInDataAuthenticationErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.PostUsersSignInDataUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataUserPlexAccount.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataUserPlexAccount.swift new file mode 100644 index 0000000..67eb11e --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataUserPlexAccount.swift @@ -0,0 +1,324 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Returns the user account data with a valid auth token + public struct PostUsersSignInDataUserPlexAccount { + /// Unknown + public let adsConsent: Bool + /// Unknown + @DateTime + public private(set) var adsConsentReminderAt: Date + /// Unknown + @DateTime + public private(set) var adsConsentSetAt: Date + /// Unknown + public let anonymous: Bool + /// The account token + public let authToken: String + /// If the two-factor authentication backup codes have been created + public let backupCodesCreated: Bool + /// If the account has been confirmed + public let confirmed: Bool + /// The account country + public let country: String + /// The account email address + public let email: String + /// If login with email only is enabled + public let emailOnlyAuth: Bool + /// List of devices your allowed to use with this account + public let entitlements: [String] + /// If experimental features are enabled + public let experimentalFeatures: Bool + /// Your account full name + public let friendlyName: String + /// If the account is a Plex Home guest user + public let guest: Bool + /// If the account has a password + public let hasPassword: Bool + /// If the account is a Plex Home user + public let home: Bool + /// If the account is the Plex Home admin + public let homeAdmin: Bool + /// The number of accounts in the Plex Home + public let homeSize: Int + /// The Plex account ID + public let id: Int + /// Unix epoch datetime + public let joinedAt: Int + /// The account locale + public let locale: String + /// If you are subscribed to the Plex newsletter + public let mailingListActive: Bool + /// Your current mailing list status + public let mailingListStatus: Operations.PostUsersSignInDataMailingListStatus + /// The maximum number of accounts allowed in the Plex Home + public let maxHomeSize: Int + public let pastSubscriptions: [Operations.PastSubscription] + public let profile: Operations.PostUsersSignInDataUserProfile + /// If the account has a Plex Home PIN enabled + public let protected: Bool + /// Unix epoch datetime + public let rememberExpiresAt: Int + /// If the account is a Plex Home managed user + public let restricted: Bool + /// Unknown + public let scrobbleTypes: String + public let services: [Operations.PostUsersSignInDataServices] + /// If the account’s Plex Pass subscription is active + public let subscription: Operations.PostUsersSignInDataSubscription + /// Description of the Plex Pass subscription + public let subscriptionDescription: String + public let subscriptions: [Operations.PostUsersSignInDataAuthenticationSubscription] + /// URL of the account thumbnail + public let thumb: String + /// The title of the account (username or friendly name) + public let title: String + public let trials: [Operations.Trials] + /// If two-factor authentication is enabled + public let twoFactorEnabled: Bool + /// The account username + public let username: String + /// The account UUID + public let uuid: String + /// [Might be removed] The hashed Plex Home PIN + @available(*, deprecated, message: "This will be removed in a future release, please migrate away from it as soon as possible") + public let pin: String? + /// [Might be removed] List of account roles. Plexpass membership listed here + public let roles: [String]? + + /// Creates an object with the specified parameters + /// + /// - Parameter adsConsent: Unknown + /// - Parameter adsConsentReminderAt: Unknown + /// - Parameter adsConsentSetAt: Unknown + /// - Parameter anonymous: Unknown + /// - Parameter authToken: The account token + /// - Parameter backupCodesCreated: If the two-factor authentication backup codes have been created + /// - Parameter confirmed: If the account has been confirmed + /// - Parameter country: The account country + /// - Parameter email: The account email address + /// - Parameter emailOnlyAuth: If login with email only is enabled + /// - Parameter entitlements: List of devices your allowed to use with this account + /// - Parameter experimentalFeatures: If experimental features are enabled + /// - Parameter friendlyName: Your account full name + /// - Parameter guest: If the account is a Plex Home guest user + /// - Parameter hasPassword: If the account has a password + /// - Parameter home: If the account is a Plex Home user + /// - Parameter homeAdmin: If the account is the Plex Home admin + /// - Parameter homeSize: The number of accounts in the Plex Home + /// - Parameter id: The Plex account ID + /// - Parameter joinedAt: Unix epoch datetime + /// - Parameter locale: The account locale + /// - Parameter mailingListActive: If you are subscribed to the Plex newsletter + /// - Parameter mailingListStatus: Your current mailing list status + /// - Parameter maxHomeSize: The maximum number of accounts allowed in the Plex Home + /// - Parameter protected: If the account has a Plex Home PIN enabled + /// - Parameter rememberExpiresAt: Unix epoch datetime + /// - Parameter restricted: If the account is a Plex Home managed user + /// - Parameter scrobbleTypes: Unknown + /// - Parameter subscription: If the account’s Plex Pass subscription is active + /// - Parameter subscriptionDescription: Description of the Plex Pass subscription + /// - Parameter thumb: URL of the account thumbnail + /// - Parameter title: The title of the account (username or friendly name) + /// - Parameter twoFactorEnabled: If two-factor authentication is enabled + /// - Parameter username: The account username + /// - Parameter uuid: The account UUID + /// - Parameter pin: [Might be removed] The hashed Plex Home PIN + /// - Parameter roles: [Might be removed] List of account roles. Plexpass membership listed here + /// + @available(*, deprecated, message: "This initializer uses deprecated fields and will be removed in a future version.") + public init(adsConsent: Bool, adsConsentReminderAt: Date, adsConsentSetAt: Date, anonymous: Bool, authToken: String, backupCodesCreated: Bool, confirmed: Bool, country: String, email: String, emailOnlyAuth: Bool, entitlements: [String], experimentalFeatures: Bool, friendlyName: String, guest: Bool, hasPassword: Bool, home: Bool, homeAdmin: Bool, homeSize: Int, id: Int, joinedAt: Int, locale: String, mailingListActive: Bool, mailingListStatus: Operations.PostUsersSignInDataMailingListStatus, maxHomeSize: Int, pastSubscriptions: [Operations.PastSubscription], profile: Operations.PostUsersSignInDataUserProfile, protected: Bool, rememberExpiresAt: Int, restricted: Bool, scrobbleTypes: String, services: [Operations.PostUsersSignInDataServices], subscription: Operations.PostUsersSignInDataSubscription, subscriptionDescription: String, subscriptions: [Operations.PostUsersSignInDataAuthenticationSubscription], thumb: String, title: String, trials: [Operations.Trials], twoFactorEnabled: Bool, username: String, uuid: String, pin: String? = nil, roles: [String]? = nil) { + self.adsConsent = adsConsent + self._adsConsentReminderAt = DateTime(wrappedValue: adsConsentReminderAt) + self._adsConsentSetAt = DateTime(wrappedValue: adsConsentSetAt) + self.anonymous = anonymous + self.authToken = authToken + self.backupCodesCreated = backupCodesCreated + self.confirmed = confirmed + self.country = country + self.email = email + self.emailOnlyAuth = emailOnlyAuth + self.entitlements = entitlements + self.experimentalFeatures = experimentalFeatures + self.friendlyName = friendlyName + self.guest = guest + self.hasPassword = hasPassword + self.home = home + self.homeAdmin = homeAdmin + self.homeSize = homeSize + self.id = id + self.joinedAt = joinedAt + self.locale = locale + self.mailingListActive = mailingListActive + self.mailingListStatus = mailingListStatus + self.maxHomeSize = maxHomeSize + self.pastSubscriptions = pastSubscriptions + self.profile = profile + self.protected = protected + self.rememberExpiresAt = rememberExpiresAt + self.restricted = restricted + self.scrobbleTypes = scrobbleTypes + self.services = services + self.subscription = subscription + self.subscriptionDescription = subscriptionDescription + self.subscriptions = subscriptions + self.thumb = thumb + self.title = title + self.trials = trials + self.twoFactorEnabled = twoFactorEnabled + self.username = username + self.uuid = uuid + self.pin = pin + self.roles = roles + } + }} + +extension Operations.PostUsersSignInDataUserPlexAccount: Codable { + enum CodingKeys: String, CodingKey { + case adsConsent + case adsConsentReminderAt + case adsConsentSetAt + case anonymous + case authToken + case backupCodesCreated + case confirmed + case country + case email + case emailOnlyAuth + case entitlements + case experimentalFeatures + case friendlyName + case guest + case hasPassword + case home + case homeAdmin + case homeSize + case id + case joinedAt + case locale + case mailingListActive + case mailingListStatus + case maxHomeSize + case pastSubscriptions + case profile + case protected + case rememberExpiresAt + case restricted + case scrobbleTypes + case services + case subscription + case subscriptionDescription + case subscriptions + case thumb + case title + case trials + case twoFactorEnabled + case username + case uuid + case pin + case roles + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.adsConsent = try container.decode(Bool.self, forKey: .adsConsent) + self._adsConsentReminderAt = try container.decode(DateTime.self, forKey: .adsConsentReminderAt) + self._adsConsentSetAt = try container.decode(DateTime.self, forKey: .adsConsentSetAt) + self.anonymous = try container.decode(Bool.self, forKey: .anonymous) + self.authToken = try container.decode(String.self, forKey: .authToken) + self.backupCodesCreated = try container.decode(Bool.self, forKey: .backupCodesCreated) + self.confirmed = try container.decode(Bool.self, forKey: .confirmed) + self.country = try container.decode(String.self, forKey: .country) + self.email = try container.decode(String.self, forKey: .email) + self.emailOnlyAuth = try container.decode(Bool.self, forKey: .emailOnlyAuth) + self.entitlements = try container.decode([String].self, forKey: .entitlements) + self.experimentalFeatures = try container.decode(Bool.self, forKey: .experimentalFeatures) + self.friendlyName = try container.decode(String.self, forKey: .friendlyName) + self.guest = try container.decode(Bool.self, forKey: .guest) + self.hasPassword = try container.decode(Bool.self, forKey: .hasPassword) + self.home = try container.decode(Bool.self, forKey: .home) + self.homeAdmin = try container.decode(Bool.self, forKey: .homeAdmin) + self.homeSize = try container.decode(Int.self, forKey: .homeSize) + self.id = try container.decode(Int.self, forKey: .id) + self.joinedAt = try container.decode(Int.self, forKey: .joinedAt) + self.locale = try container.decode(String.self, forKey: .locale) + self.mailingListActive = try container.decode(Bool.self, forKey: .mailingListActive) + self.mailingListStatus = try container.decode(Operations.PostUsersSignInDataMailingListStatus.self, forKey: .mailingListStatus) + self.maxHomeSize = try container.decode(Int.self, forKey: .maxHomeSize) + self.pastSubscriptions = try container.decode([Operations.PastSubscription].self, forKey: .pastSubscriptions) + self.profile = try container.decode(Operations.PostUsersSignInDataUserProfile.self, forKey: .profile) + self.protected = try container.decode(Bool.self, forKey: .protected) + self.rememberExpiresAt = try container.decode(Int.self, forKey: .rememberExpiresAt) + self.restricted = try container.decode(Bool.self, forKey: .restricted) + self.scrobbleTypes = try container.decode(String.self, forKey: .scrobbleTypes) + self.services = try container.decode([Operations.PostUsersSignInDataServices].self, forKey: .services) + self.subscription = try container.decode(Operations.PostUsersSignInDataSubscription.self, forKey: .subscription) + self.subscriptionDescription = try container.decode(String.self, forKey: .subscriptionDescription) + self.subscriptions = try container.decode([Operations.PostUsersSignInDataAuthenticationSubscription].self, forKey: .subscriptions) + self.thumb = try container.decode(String.self, forKey: .thumb) + self.title = try container.decode(String.self, forKey: .title) + self.trials = try container.decode([Operations.Trials].self, forKey: .trials) + self.twoFactorEnabled = try container.decode(Bool.self, forKey: .twoFactorEnabled) + self.username = try container.decode(String.self, forKey: .username) + self.uuid = try container.decode(String.self, forKey: .uuid) + self.pin = try container.decodeIfPresent(String.self, forKey: .pin) + self.roles = try container.decodeIfPresent([String].self, forKey: .roles) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.adsConsent, forKey: .adsConsent) + try container.encode(self._adsConsentReminderAt, forKey: .adsConsentReminderAt) + try container.encode(self._adsConsentSetAt, forKey: .adsConsentSetAt) + try container.encode(self.anonymous, forKey: .anonymous) + try container.encode(self.authToken, forKey: .authToken) + try container.encode(self.backupCodesCreated, forKey: .backupCodesCreated) + try container.encode(self.confirmed, forKey: .confirmed) + try container.encode(self.country, forKey: .country) + try container.encode(self.email, forKey: .email) + try container.encode(self.emailOnlyAuth, forKey: .emailOnlyAuth) + try container.encode(self.entitlements, forKey: .entitlements) + try container.encode(self.experimentalFeatures, forKey: .experimentalFeatures) + try container.encode(self.friendlyName, forKey: .friendlyName) + try container.encode(self.guest, forKey: .guest) + try container.encode(self.hasPassword, forKey: .hasPassword) + try container.encode(self.home, forKey: .home) + try container.encode(self.homeAdmin, forKey: .homeAdmin) + try container.encode(self.homeSize, forKey: .homeSize) + try container.encode(self.id, forKey: .id) + try container.encode(self.joinedAt, forKey: .joinedAt) + try container.encode(self.locale, forKey: .locale) + try container.encode(self.mailingListActive, forKey: .mailingListActive) + try container.encode(self.mailingListStatus, forKey: .mailingListStatus) + try container.encode(self.maxHomeSize, forKey: .maxHomeSize) + try container.encode(self.pastSubscriptions, forKey: .pastSubscriptions) + try container.encode(self.profile, forKey: .profile) + try container.encode(self.protected, forKey: .protected) + try container.encode(self.rememberExpiresAt, forKey: .rememberExpiresAt) + try container.encode(self.restricted, forKey: .restricted) + try container.encode(self.scrobbleTypes, forKey: .scrobbleTypes) + try container.encode(self.services, forKey: .services) + try container.encode(self.subscription, forKey: .subscription) + try container.encode(self.subscriptionDescription, forKey: .subscriptionDescription) + try container.encode(self.subscriptions, forKey: .subscriptions) + try container.encode(self.thumb, forKey: .thumb) + try container.encode(self.title, forKey: .title) + try container.encode(self.trials, forKey: .trials) + try container.encode(self.twoFactorEnabled, forKey: .twoFactorEnabled) + try container.encode(self.username, forKey: .username) + try container.encode(self.uuid, forKey: .uuid) + try container.encodeIfPresent(self.pin, forKey: .pin) + try container.encodeIfPresent(self.roles, forKey: .roles) + } +} + +extension Operations.PostUsersSignInDataUserPlexAccount { + var adsConsentReminderAtWrapper: DateTime { + return _adsConsentReminderAt + } + var adsConsentSetAtWrapper: DateTime { + return _adsConsentSetAt + } +} diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataUserProfile.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataUserProfile.swift new file mode 100644 index 0000000..d45f051 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataUserProfile.swift @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct PostUsersSignInDataUserProfile { + /// The preferred audio language for the account + public let defaultAudioLanguage: String + /// The preferred subtitle language for the account + public let defaultSubtitleLanguage: String + /// If the account has automatically select audio and subtitle tracks enabled + public let autoSelectAudio: Bool? + /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + public let autoSelectSubtitle: Operations.PostUsersSignInDataAutoSelectSubtitle? + /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + public let defaultSubtitleAccessibility: Operations.PostUsersSignInDataDefaultSubtitleAccessibility? + /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + public let defaultSubtitleForced: Operations.PostUsersSignInDataDefaultSubtitleForced? + public let mediaReviewsVisibility: Operations.PostUsersSignInDataMediaReviewsVisibility? + public let watchedIndicator: Operations.PostUsersSignInDataWatchedIndicator? + + /// Creates an object with the specified parameters + /// + /// - Parameter defaultAudioLanguage: The preferred audio language for the account + /// - Parameter defaultSubtitleLanguage: The preferred subtitle language for the account + /// - Parameter autoSelectAudio: If the account has automatically select audio and subtitle tracks enabled + /// - Parameter autoSelectSubtitle: The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + /// - Parameter defaultSubtitleAccessibility: The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + /// - Parameter defaultSubtitleForced: The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + /// + public init(defaultAudioLanguage: String, defaultSubtitleLanguage: String, autoSelectAudio: Bool? = nil, autoSelectSubtitle: Operations.PostUsersSignInDataAutoSelectSubtitle? = nil, defaultSubtitleAccessibility: Operations.PostUsersSignInDataDefaultSubtitleAccessibility? = nil, defaultSubtitleForced: Operations.PostUsersSignInDataDefaultSubtitleForced? = nil, mediaReviewsVisibility: Operations.PostUsersSignInDataMediaReviewsVisibility? = nil, watchedIndicator: Operations.PostUsersSignInDataWatchedIndicator? = nil) { + self.defaultAudioLanguage = defaultAudioLanguage + self.defaultSubtitleLanguage = defaultSubtitleLanguage + self.autoSelectAudio = autoSelectAudio + self.autoSelectSubtitle = autoSelectSubtitle + self.defaultSubtitleAccessibility = defaultSubtitleAccessibility + self.defaultSubtitleForced = defaultSubtitleForced + self.mediaReviewsVisibility = mediaReviewsVisibility + self.watchedIndicator = watchedIndicator + } + }} + +extension Operations.PostUsersSignInDataUserProfile: Codable { + enum CodingKeys: String, CodingKey { + case defaultAudioLanguage + case defaultSubtitleLanguage + case autoSelectAudio + case autoSelectSubtitle + case defaultSubtitleAccessibility + case defaultSubtitleForced + case mediaReviewsVisibility + case watchedIndicator + } +} + diff --git a/Sources/Plexswift/models/operations/PostUsersSignInDataWatchedIndicator.swift b/Sources/Plexswift/models/operations/PostUsersSignInDataWatchedIndicator.swift new file mode 100644 index 0000000..9c8b1c5 --- /dev/null +++ b/Sources/Plexswift/models/operations/PostUsersSignInDataWatchedIndicator.swift @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum PostUsersSignInDataWatchedIndicator: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/Producer.swift b/Sources/Plexswift/models/operations/Producer.swift index 135f02d..7ea0bca 100644 --- a/Sources/Plexswift/models/operations/Producer.swift +++ b/Sources/Plexswift/models/operations/Producer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -21,8 +21,7 @@ extension Operations { self.tagKey = tagKey self.thumb = thumb } - } -} + }} extension Operations.Producer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Provider.swift b/Sources/Plexswift/models/operations/Provider.swift index 42d9c4a..259bfaa 100644 --- a/Sources/Plexswift/models/operations/Provider.swift +++ b/Sources/Plexswift/models/operations/Provider.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -17,8 +17,7 @@ extension Operations { self.title = title self.type = type } - } -} + }} extension Operations.Provider: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/QueryParamFilter.swift b/Sources/Plexswift/models/operations/QueryParamFilter.swift new file mode 100644 index 0000000..1e9992d --- /dev/null +++ b/Sources/Plexswift/models/operations/QueryParamFilter.swift @@ -0,0 +1,20 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Filters content by field and direction/equality + /// (Unknown if viewedAt is the only supported column) + /// + public struct QueryParamFilter { + + /// Creates an object + /// + /// + public init() { + } + }} + +extension Operations.QueryParamFilter: Codable { +} + diff --git a/Sources/Plexswift/models/operations/QueryParamForce.swift b/Sources/Plexswift/models/operations/QueryParamForce.swift new file mode 100644 index 0000000..6169f17 --- /dev/null +++ b/Sources/Plexswift/models/operations/QueryParamForce.swift @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Force overwriting of duplicate playlists. + /// By default, a playlist file uploaded with the same path will overwrite the existing playlist. + /// The `force` argument is used to disable overwriting. + /// If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + /// + public enum QueryParamForce: Int, Codable, APIValue { + case zero = 0 + case one = 1 + }} diff --git a/Sources/Plexswift/models/operations/QueryParamOnlyTransient.swift b/Sources/Plexswift/models/operations/QueryParamOnlyTransient.swift index 6dfe630..5e75328 100644 --- a/Sources/Plexswift/models/operations/QueryParamOnlyTransient.swift +++ b/Sources/Plexswift/models/operations/QueryParamOnlyTransient.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum QueryParamOnlyTransient: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/QueryParamSmart.swift b/Sources/Plexswift/models/operations/QueryParamSmart.swift index adc6baa..14d51e0 100644 --- a/Sources/Plexswift/models/operations/QueryParamSmart.swift +++ b/Sources/Plexswift/models/operations/QueryParamSmart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum QueryParamSmart: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/QueryParamType.swift b/Sources/Plexswift/models/operations/QueryParamType.swift index 4cdacb0..54c9e67 100644 --- a/Sources/Plexswift/models/operations/QueryParamType.swift +++ b/Sources/Plexswift/models/operations/QueryParamType.swift @@ -1,12 +1,18 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { - /// type of playlist to create - public enum QueryParamType: String, Codable, APIValue { - case audio = "audio" - case video = "video" - case photo = "photo" - } -} + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// + public enum QueryParamType: Int, Codable, APIValue { + case one = 1 + case two = 2 + case three = 3 + case four = 4 + }} diff --git a/Sources/Plexswift/models/operations/Ratings.swift b/Sources/Plexswift/models/operations/Ratings.swift index e49ec07..5298917 100644 --- a/Sources/Plexswift/models/operations/Ratings.swift +++ b/Sources/Plexswift/models/operations/Ratings.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -18,8 +18,7 @@ extension Operations { self.type = type self._value = DecimalSerialized(wrappedValue: value) } - } -} + }} extension Operations.Ratings: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/RefreshLibraryErrors.swift b/Sources/Plexswift/models/operations/RefreshLibraryErrors.swift deleted file mode 100644 index 1f4926f..0000000 --- a/Sources/Plexswift/models/operations/RefreshLibraryErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct RefreshLibraryErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.RefreshLibraryErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.RefreshLibraryErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/RefreshLibraryRequest.swift b/Sources/Plexswift/models/operations/RefreshLibraryRequest.swift deleted file mode 100644 index 1dbb9bd..0000000 --- a/Sources/Plexswift/models/operations/RefreshLibraryRequest.swift +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct RefreshLibraryRequest: APIValue { - /// the Id of the library to refresh - @DecimalSerialized - public private(set) var sectionId: Double - - /// Creates an object with the specified parameters - /// - /// - Parameter sectionId: the Id of the library to refresh - /// - public init(sectionId: Double) { - self._sectionId = DecimalSerialized(wrappedValue: sectionId) - } - } -} -extension Operations.RefreshLibraryRequest { - var sectionIdWrapper: DecimalSerialized { - return _sectionId - } -} diff --git a/Sources/Plexswift/models/operations/RefreshLibraryResponse.swift b/Sources/Plexswift/models/operations/RefreshLibraryResponse.swift deleted file mode 100644 index 1b1fec7..0000000 --- a/Sources/Plexswift/models/operations/RefreshLibraryResponse.swift +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A response model - public enum RefreshLibraryResponse { - case empty - case object(Operations.RefreshLibraryResponseBody) - - var isEmpty: Bool { - if case .empty = self { - return true - } else { - return false - } - } - - public func object() throws -> Operations.RefreshLibraryResponseBody { - guard case .object(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - } -} diff --git a/Sources/Plexswift/models/operations/RefreshLibraryResponseBody.swift b/Sources/Plexswift/models/operations/RefreshLibraryResponseBody.swift deleted file mode 100644 index 900b534..0000000 --- a/Sources/Plexswift/models/operations/RefreshLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct RefreshLibraryResponseBody { - public let errors: [Operations.RefreshLibraryErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.RefreshLibraryErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.RefreshLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/Release.swift b/Sources/Plexswift/models/operations/Release.swift index 1b6d6d8..e481595 100644 --- a/Sources/Plexswift/models/operations/Release.swift +++ b/Sources/Plexswift/models/operations/Release.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,8 +23,7 @@ extension Operations { self.state = state self.version = version } - } -} + }} extension Operations.Release: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/ResponseBody.swift b/Sources/Plexswift/models/operations/ResponseBody.swift new file mode 100644 index 0000000..a9afb9b --- /dev/null +++ b/Sources/Plexswift/models/operations/ResponseBody.swift @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct ResponseBody { + public let baseURL: String + public let identifier: String + public let linkURL: String + public let provides: String + public let title: String + /// The plex authtoken used to identify with + public let token: String + + /// Creates an object with the specified parameters + /// + /// - Parameter token: The plex authtoken used to identify with + /// + public init(baseURL: String, identifier: String, linkURL: String, provides: String, title: String, token: String) { + self.baseURL = baseURL + self.identifier = identifier + self.linkURL = linkURL + self.provides = provides + self.title = title + self.token = token + } + }} + +extension Operations.ResponseBody: Codable { + enum CodingKeys: String, CodingKey { + case baseURL + case identifier + case linkURL + case provides + case title + case token + } +} + diff --git a/Sources/Plexswift/models/operations/Role.swift b/Sources/Plexswift/models/operations/Role.swift index 5cbeef2..2cd5563 100644 --- a/Sources/Plexswift/models/operations/Role.swift +++ b/Sources/Plexswift/models/operations/Role.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.Role: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Scope.swift b/Sources/Plexswift/models/operations/Scope.swift index 941f8e1..b43238f 100644 --- a/Sources/Plexswift/models/operations/Scope.swift +++ b/Sources/Plexswift/models/operations/Scope.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,5 +6,4 @@ extension Operations { /// `all` - This is the only supported `scope` parameter. public enum Scope: String, Codable, APIValue { case all = "all" - } -} + }} diff --git a/Sources/Plexswift/models/operations/SearchLibraryErrors.swift b/Sources/Plexswift/models/operations/SearchLibraryErrors.swift deleted file mode 100644 index 2cd7d7f..0000000 --- a/Sources/Plexswift/models/operations/SearchLibraryErrors.swift +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct SearchLibraryErrors { - @DecimalSerialized - public private(set) var code: Double? - public let message: String? - @DecimalSerialized - public private(set) var status: Double? - - /// Creates an object with the specified parameters - /// - /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) - self.message = message - self._status = DecimalSerialized(wrappedValue: status) - } - } -} - -extension Operations.SearchLibraryErrors: Codable { - enum CodingKeys: String, CodingKey { - case code - case message - case status - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } -} - -extension Operations.SearchLibraryErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/SearchLibraryLibraryResponseBody.swift b/Sources/Plexswift/models/operations/SearchLibraryLibraryResponseBody.swift deleted file mode 100644 index 5026b3b..0000000 --- a/Sources/Plexswift/models/operations/SearchLibraryLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct SearchLibraryLibraryResponseBody { - public let errors: [Operations.SearchLibraryErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.SearchLibraryErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.SearchLibraryLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/SearchLibraryRequest.swift b/Sources/Plexswift/models/operations/SearchLibraryRequest.swift deleted file mode 100644 index fc6792b..0000000 --- a/Sources/Plexswift/models/operations/SearchLibraryRequest.swift +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A model object - public struct SearchLibraryRequest: APIValue { - /// the Id of the library to query - public let sectionId: Int - /// Plex content type to search for - public let type: Operations.TypeModel - - /// Creates an object with the specified parameters - /// - /// - Parameter sectionId: the Id of the library to query - /// - Parameter type: Plex content type to search for - /// - public init(sectionId: Int, type: Operations.TypeModel) { - self.sectionId = sectionId - self.type = type - } - } -} diff --git a/Sources/Plexswift/models/operations/SearchLibraryResponse.swift b/Sources/Plexswift/models/operations/SearchLibraryResponse.swift deleted file mode 100644 index 5f6c43b..0000000 --- a/Sources/Plexswift/models/operations/SearchLibraryResponse.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// A response model - public enum SearchLibraryResponse { - case empty - case twoHundredApplicationJsonObject(Operations.SearchLibraryResponseBody) - case fourHundredAndOneApplicationJsonObject(Operations.SearchLibraryLibraryResponseBody) - - var isEmpty: Bool { - if case .empty = self { - return true - } else { - return false - } - } - - public func twoHundredApplicationJsonObject() throws -> Operations.SearchLibraryResponseBody { - guard case .twoHundredApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - - public func fourHundredAndOneApplicationJsonObject() throws -> Operations.SearchLibraryLibraryResponseBody { - guard case .fourHundredAndOneApplicationJsonObject(let value) = self else { - throw PlexswiftError.missingResponseData - } - return value - } - } -} diff --git a/Sources/Plexswift/models/operations/SearchLibraryResponseBody.swift b/Sources/Plexswift/models/operations/SearchLibraryResponseBody.swift deleted file mode 100644 index 337cbf7..0000000 --- a/Sources/Plexswift/models/operations/SearchLibraryResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// The contents of the library by section and type - public struct SearchLibraryResponseBody { - public let mediaContainer: Operations.SearchLibraryMediaContainer? - - /// Creates an object with the specified parameters - /// - /// - public init(mediaContainer: Operations.SearchLibraryMediaContainer? = nil) { - self.mediaContainer = mediaContainer - } - } -} - -extension Operations.SearchLibraryResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case mediaContainer = "MediaContainer" - } -} - diff --git a/Sources/Plexswift/models/operations/Server.swift b/Sources/Plexswift/models/operations/Server.swift index 81e213c..b7ce4cf 100644 --- a/Sources/Plexswift/models/operations/Server.swift +++ b/Sources/Plexswift/models/operations/Server.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -35,8 +35,7 @@ extension Operations { self._protocolVersion = DecimalSerialized(wrappedValue: protocolVersion) self.version = version } - } -} + }} extension Operations.Server: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Services.swift b/Sources/Plexswift/models/operations/Services.swift new file mode 100644 index 0000000..a6f5e80 --- /dev/null +++ b/Sources/Plexswift/models/operations/Services.swift @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Services { + public let endpoint: String + public let identifier: String + public let secret: String + public let status: Operations.GetTokenDetailsStatus + public let token: String + + /// Creates an object with the specified parameters + /// + /// + public init(endpoint: String, identifier: String, secret: String, status: Operations.GetTokenDetailsStatus, token: String) { + self.endpoint = endpoint + self.identifier = identifier + self.secret = secret + self.status = status + self.token = token + } + }} + +extension Operations.Services: Codable { + enum CodingKeys: String, CodingKey { + case endpoint + case identifier + case secret + case status + case token + } +} + diff --git a/Sources/Plexswift/models/operations/Session.swift b/Sources/Plexswift/models/operations/Session.swift index 4bcb584..edb0d56 100644 --- a/Sources/Plexswift/models/operations/Session.swift +++ b/Sources/Plexswift/models/operations/Session.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -17,8 +17,7 @@ extension Operations { self.id = id self.location = location } - } -} + }} extension Operations.Session: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Setting.swift b/Sources/Plexswift/models/operations/Setting.swift index d7dcfd4..66ceb0a 100644 --- a/Sources/Plexswift/models/operations/Setting.swift +++ b/Sources/Plexswift/models/operations/Setting.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -31,8 +31,7 @@ extension Operations { self.type = type self.value = value } - } -} + }} extension Operations.Setting: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/SharedServers.swift b/Sources/Plexswift/models/operations/SharedServers.swift new file mode 100644 index 0000000..81a6a6e --- /dev/null +++ b/Sources/Plexswift/models/operations/SharedServers.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct SharedServers { + + /// Creates an object + /// + /// + public init() { + } + }} + +extension Operations.SharedServers: Codable { +} + diff --git a/Sources/Plexswift/models/operations/SharedSources.swift b/Sources/Plexswift/models/operations/SharedSources.swift new file mode 100644 index 0000000..2adb25f --- /dev/null +++ b/Sources/Plexswift/models/operations/SharedSources.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct SharedSources { + + /// Creates an object + /// + /// + public init() { + } + }} + +extension Operations.SharedSources: Codable { +} + diff --git a/Sources/Plexswift/models/operations/Skip.swift b/Sources/Plexswift/models/operations/Skip.swift index 7b014e9..dfecc85 100644 --- a/Sources/Plexswift/models/operations/Skip.swift +++ b/Sources/Plexswift/models/operations/Skip.swift @@ -1,11 +1,10 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { - /// Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + /// Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. public enum Skip: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/Smart.swift b/Sources/Plexswift/models/operations/Smart.swift index f51a741..61b528a 100644 --- a/Sources/Plexswift/models/operations/Smart.swift +++ b/Sources/Plexswift/models/operations/Smart.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum Smart: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/Sort.swift b/Sources/Plexswift/models/operations/Sort.swift index fa5b139..38cdc37 100644 --- a/Sources/Plexswift/models/operations/Sort.swift +++ b/Sources/Plexswift/models/operations/Sort.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,8 +23,7 @@ extension Operations { self.key = key self.title = title } - } -} + }} extension Operations.Sort: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/StartAllTasksBadRequest.swift b/Sources/Plexswift/models/operations/StartAllTasksBadRequest.swift new file mode 100644 index 0000000..5c1a6eb --- /dev/null +++ b/Sources/Plexswift/models/operations/StartAllTasksBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct StartAllTasksBadRequest { + public let errors: [Operations.StartAllTasksErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.StartAllTasksErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StartAllTasksBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StartAllTasksButlerErrors.swift b/Sources/Plexswift/models/operations/StartAllTasksButlerErrors.swift new file mode 100644 index 0000000..9d83710 --- /dev/null +++ b/Sources/Plexswift/models/operations/StartAllTasksButlerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct StartAllTasksButlerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.StartAllTasksButlerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/StartAllTasksErrors.swift b/Sources/Plexswift/models/operations/StartAllTasksErrors.swift index b14f548..40aeae8 100644 --- a/Sources/Plexswift/models/operations/StartAllTasksErrors.swift +++ b/Sources/Plexswift/models/operations/StartAllTasksErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct StartAllTasksErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.StartAllTasksErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.StartAllTasksErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.StartAllTasksErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/StartAllTasksResponse.swift b/Sources/Plexswift/models/operations/StartAllTasksResponse.swift index 98d09b6..7fbc6d6 100644 --- a/Sources/Plexswift/models/operations/StartAllTasksResponse.swift +++ b/Sources/Plexswift/models/operations/StartAllTasksResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum StartAllTasksResponse { case empty - case object(Operations.StartAllTasksResponseBody) + case badRequest(Operations.StartAllTasksBadRequest) + case unauthorized(Operations.StartAllTasksUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.StartAllTasksResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.StartAllTasksBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.StartAllTasksUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/StartAllTasksResponseBody.swift b/Sources/Plexswift/models/operations/StartAllTasksResponseBody.swift deleted file mode 100644 index cebc072..0000000 --- a/Sources/Plexswift/models/operations/StartAllTasksResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct StartAllTasksResponseBody { - public let errors: [Operations.StartAllTasksErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.StartAllTasksErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.StartAllTasksResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/StartAllTasksUnauthorized.swift b/Sources/Plexswift/models/operations/StartAllTasksUnauthorized.swift new file mode 100644 index 0000000..e2e384c --- /dev/null +++ b/Sources/Plexswift/models/operations/StartAllTasksUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct StartAllTasksUnauthorized { + public let errors: [Operations.StartAllTasksButlerErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.StartAllTasksButlerErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StartAllTasksUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StartTaskBadRequest.swift b/Sources/Plexswift/models/operations/StartTaskBadRequest.swift new file mode 100644 index 0000000..65f98b7 --- /dev/null +++ b/Sources/Plexswift/models/operations/StartTaskBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct StartTaskBadRequest { + public let errors: [Operations.StartTaskErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.StartTaskErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StartTaskBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StartTaskButlerErrors.swift b/Sources/Plexswift/models/operations/StartTaskButlerErrors.swift new file mode 100644 index 0000000..1bcf7b7 --- /dev/null +++ b/Sources/Plexswift/models/operations/StartTaskButlerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct StartTaskButlerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.StartTaskButlerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/StartTaskErrors.swift b/Sources/Plexswift/models/operations/StartTaskErrors.swift index 5504583..0e2b6ba 100644 --- a/Sources/Plexswift/models/operations/StartTaskErrors.swift +++ b/Sources/Plexswift/models/operations/StartTaskErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct StartTaskErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.StartTaskErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.StartTaskErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.StartTaskErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/StartTaskRequest.swift b/Sources/Plexswift/models/operations/StartTaskRequest.swift index bc05212..8ddbdbf 100644 --- a/Sources/Plexswift/models/operations/StartTaskRequest.swift +++ b/Sources/Plexswift/models/operations/StartTaskRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,5 +15,4 @@ extension Operations { public init(taskName: Operations.TaskName) { self.taskName = taskName } - } -} + }} diff --git a/Sources/Plexswift/models/operations/StartTaskResponse.swift b/Sources/Plexswift/models/operations/StartTaskResponse.swift index 9527d94..7ede288 100644 --- a/Sources/Plexswift/models/operations/StartTaskResponse.swift +++ b/Sources/Plexswift/models/operations/StartTaskResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum StartTaskResponse { case empty - case object(Operations.StartTaskResponseBody) + case badRequest(Operations.StartTaskBadRequest) + case unauthorized(Operations.StartTaskUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.StartTaskResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.StartTaskBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.StartTaskUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/GetFileHashResponseBody.swift b/Sources/Plexswift/models/operations/StartTaskUnauthorized.swift similarity index 51% rename from Sources/Plexswift/models/operations/GetFileHashResponseBody.swift rename to Sources/Plexswift/models/operations/StartTaskUnauthorized.swift index c53bb93..d8c93d3 100644 --- a/Sources/Plexswift/models/operations/GetFileHashResponseBody.swift +++ b/Sources/Plexswift/models/operations/StartTaskUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct GetFileHashResponseBody { - public let errors: [Operations.GetFileHashErrors]? + public struct StartTaskUnauthorized { + public let errors: [Operations.StartTaskButlerErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.GetFileHashErrors]? = nil) { + public init(errors: [Operations.StartTaskButlerErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.GetFileHashResponseBody: Codable { +extension Operations.StartTaskUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/StartUniversalTranscodeBadRequest.swift b/Sources/Plexswift/models/operations/StartUniversalTranscodeBadRequest.swift new file mode 100644 index 0000000..8b8aa48 --- /dev/null +++ b/Sources/Plexswift/models/operations/StartUniversalTranscodeBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct StartUniversalTranscodeBadRequest { + public let errors: [Operations.StartUniversalTranscodeErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.StartUniversalTranscodeErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StartUniversalTranscodeBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StartUniversalTranscodeErrors.swift b/Sources/Plexswift/models/operations/StartUniversalTranscodeErrors.swift index b9f5fcc..6096919 100644 --- a/Sources/Plexswift/models/operations/StartUniversalTranscodeErrors.swift +++ b/Sources/Plexswift/models/operations/StartUniversalTranscodeErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct StartUniversalTranscodeErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.StartUniversalTranscodeErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.StartUniversalTranscodeErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.StartUniversalTranscodeErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/StartUniversalTranscodeRequest.swift b/Sources/Plexswift/models/operations/StartUniversalTranscodeRequest.swift index 6a14053..9763865 100644 --- a/Sources/Plexswift/models/operations/StartUniversalTranscodeRequest.swift +++ b/Sources/Plexswift/models/operations/StartUniversalTranscodeRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -86,8 +86,7 @@ extension Operations { self.subtites = subtites self._subtitleSize = DecimalSerialized(wrappedValue: subtitleSize) } - } -} + }} extension Operations.StartUniversalTranscodeRequest { var hasMDEWrapper: DecimalSerialized { return _hasMDE diff --git a/Sources/Plexswift/models/operations/StartUniversalTranscodeResponse.swift b/Sources/Plexswift/models/operations/StartUniversalTranscodeResponse.swift index d45c3fd..aeffd0c 100644 --- a/Sources/Plexswift/models/operations/StartUniversalTranscodeResponse.swift +++ b/Sources/Plexswift/models/operations/StartUniversalTranscodeResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum StartUniversalTranscodeResponse { case empty - case object(Operations.StartUniversalTranscodeResponseBody) + case badRequest(Operations.StartUniversalTranscodeBadRequest) + case unauthorized(Operations.StartUniversalTranscodeUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.StartUniversalTranscodeResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.StartUniversalTranscodeBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.StartUniversalTranscodeUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/StartUniversalTranscodeUnauthorized.swift b/Sources/Plexswift/models/operations/StartUniversalTranscodeUnauthorized.swift new file mode 100644 index 0000000..d86e98d --- /dev/null +++ b/Sources/Plexswift/models/operations/StartUniversalTranscodeUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct StartUniversalTranscodeUnauthorized { + public let errors: [Operations.StartUniversalTranscodeVideoErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.StartUniversalTranscodeVideoErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StartUniversalTranscodeUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StartUniversalTranscodeVideoErrors.swift b/Sources/Plexswift/models/operations/StartUniversalTranscodeVideoErrors.swift new file mode 100644 index 0000000..f83c16f --- /dev/null +++ b/Sources/Plexswift/models/operations/StartUniversalTranscodeVideoErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct StartUniversalTranscodeVideoErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.StartUniversalTranscodeVideoErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/State.swift b/Sources/Plexswift/models/operations/State.swift index 8f9fec5..0e33c5a 100644 --- a/Sources/Plexswift/models/operations/State.swift +++ b/Sources/Plexswift/models/operations/State.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -8,5 +8,4 @@ extension Operations { case playing = "playing" case paused = "paused" case stopped = "stopped" - } -} + }} diff --git a/Sources/Plexswift/models/operations/StatisticsBandwidth.swift b/Sources/Plexswift/models/operations/StatisticsBandwidth.swift index ce03039..8319b73 100644 --- a/Sources/Plexswift/models/operations/StatisticsBandwidth.swift +++ b/Sources/Plexswift/models/operations/StatisticsBandwidth.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -23,8 +23,7 @@ extension Operations { self.lan = lan self.timespan = timespan } - } -} + }} extension Operations.StatisticsBandwidth: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/StatisticsMedia.swift b/Sources/Plexswift/models/operations/StatisticsMedia.swift index 17ac629..8a1e0c8 100644 --- a/Sources/Plexswift/models/operations/StatisticsMedia.swift +++ b/Sources/Plexswift/models/operations/StatisticsMedia.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -25,8 +25,7 @@ extension Operations { self.metadataType = metadataType self.timespan = timespan } - } -} + }} extension Operations.StatisticsMedia: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/StatisticsResources.swift b/Sources/Plexswift/models/operations/StatisticsResources.swift index 03093c2..27a5e5b 100644 --- a/Sources/Plexswift/models/operations/StatisticsResources.swift +++ b/Sources/Plexswift/models/operations/StatisticsResources.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -27,8 +27,7 @@ extension Operations { self._processMemoryUtilization = DecimalSerialized(wrappedValue: processMemoryUtilization) self.timespan = timespan } - } -} + }} extension Operations.StatisticsResources: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Status.swift b/Sources/Plexswift/models/operations/Status.swift new file mode 100644 index 0000000..c1065ab --- /dev/null +++ b/Sources/Plexswift/models/operations/Status.swift @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Current friend request status + public enum Status: String, Codable, APIValue { + case accepted = "accepted" + }} diff --git a/Sources/Plexswift/models/operations/StopAllTasksBadRequest.swift b/Sources/Plexswift/models/operations/StopAllTasksBadRequest.swift new file mode 100644 index 0000000..9130220 --- /dev/null +++ b/Sources/Plexswift/models/operations/StopAllTasksBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct StopAllTasksBadRequest { + public let errors: [Operations.StopAllTasksErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.StopAllTasksErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StopAllTasksBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StopAllTasksButlerErrors.swift b/Sources/Plexswift/models/operations/StopAllTasksButlerErrors.swift new file mode 100644 index 0000000..f674f4b --- /dev/null +++ b/Sources/Plexswift/models/operations/StopAllTasksButlerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct StopAllTasksButlerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.StopAllTasksButlerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/StopAllTasksErrors.swift b/Sources/Plexswift/models/operations/StopAllTasksErrors.swift index 78d53fc..b0fc51c 100644 --- a/Sources/Plexswift/models/operations/StopAllTasksErrors.swift +++ b/Sources/Plexswift/models/operations/StopAllTasksErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct StopAllTasksErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.StopAllTasksErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.StopAllTasksErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.StopAllTasksErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/StopAllTasksResponse.swift b/Sources/Plexswift/models/operations/StopAllTasksResponse.swift index 7f41f69..8e53cf6 100644 --- a/Sources/Plexswift/models/operations/StopAllTasksResponse.swift +++ b/Sources/Plexswift/models/operations/StopAllTasksResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum StopAllTasksResponse { case empty - case object(Operations.StopAllTasksResponseBody) + case badRequest(Operations.StopAllTasksBadRequest) + case unauthorized(Operations.StopAllTasksUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.StopAllTasksResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.StopAllTasksBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.StopAllTasksUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/StopAllTasksResponseBody.swift b/Sources/Plexswift/models/operations/StopAllTasksResponseBody.swift deleted file mode 100644 index 8e69945..0000000 --- a/Sources/Plexswift/models/operations/StopAllTasksResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct StopAllTasksResponseBody { - public let errors: [Operations.StopAllTasksErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.StopAllTasksErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.StopAllTasksResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/ApplyUpdatesResponseBody.swift b/Sources/Plexswift/models/operations/StopAllTasksUnauthorized.swift similarity index 50% rename from Sources/Plexswift/models/operations/ApplyUpdatesResponseBody.swift rename to Sources/Plexswift/models/operations/StopAllTasksUnauthorized.swift index a4e84c5..452847e 100644 --- a/Sources/Plexswift/models/operations/ApplyUpdatesResponseBody.swift +++ b/Sources/Plexswift/models/operations/StopAllTasksUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct ApplyUpdatesResponseBody { - public let errors: [Operations.ApplyUpdatesErrors]? + public struct StopAllTasksUnauthorized { + public let errors: [Operations.StopAllTasksButlerErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.ApplyUpdatesErrors]? = nil) { + public init(errors: [Operations.StopAllTasksButlerErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.ApplyUpdatesResponseBody: Codable { +extension Operations.StopAllTasksUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/StopTaskBadRequest.swift b/Sources/Plexswift/models/operations/StopTaskBadRequest.swift new file mode 100644 index 0000000..64ca894 --- /dev/null +++ b/Sources/Plexswift/models/operations/StopTaskBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct StopTaskBadRequest { + public let errors: [Operations.StopTaskErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.StopTaskErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StopTaskBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StopTaskButlerErrors.swift b/Sources/Plexswift/models/operations/StopTaskButlerErrors.swift new file mode 100644 index 0000000..bcf0233 --- /dev/null +++ b/Sources/Plexswift/models/operations/StopTaskButlerErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct StopTaskButlerErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.StopTaskButlerErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/StopTaskErrors.swift b/Sources/Plexswift/models/operations/StopTaskErrors.swift index 762ef36..70021ce 100644 --- a/Sources/Plexswift/models/operations/StopTaskErrors.swift +++ b/Sources/Plexswift/models/operations/StopTaskErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct StopTaskErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.StopTaskErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.StopTaskErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.StopTaskErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/StopTaskRequest.swift b/Sources/Plexswift/models/operations/StopTaskRequest.swift index 431f5e6..fc31f98 100644 --- a/Sources/Plexswift/models/operations/StopTaskRequest.swift +++ b/Sources/Plexswift/models/operations/StopTaskRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,5 +15,4 @@ extension Operations { public init(taskName: Operations.PathParamTaskName) { self.taskName = taskName } - } -} + }} diff --git a/Sources/Plexswift/models/operations/StopTaskResponse.swift b/Sources/Plexswift/models/operations/StopTaskResponse.swift index de41d97..821b3a6 100644 --- a/Sources/Plexswift/models/operations/StopTaskResponse.swift +++ b/Sources/Plexswift/models/operations/StopTaskResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum StopTaskResponse { case empty - case object(Operations.StopTaskResponseBody) + case badRequest(Operations.StopTaskBadRequest) + case unauthorized(Operations.StopTaskUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.StopTaskResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.StopTaskBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.StopTaskUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/StopTaskResponseBody.swift b/Sources/Plexswift/models/operations/StopTaskResponseBody.swift deleted file mode 100644 index 2797541..0000000 --- a/Sources/Plexswift/models/operations/StopTaskResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct StopTaskResponseBody { - public let errors: [Operations.StopTaskErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.StopTaskErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.StopTaskResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/StartTaskResponseBody.swift b/Sources/Plexswift/models/operations/StopTaskUnauthorized.swift similarity index 52% rename from Sources/Plexswift/models/operations/StartTaskResponseBody.swift rename to Sources/Plexswift/models/operations/StopTaskUnauthorized.swift index b17376d..6752ce8 100644 --- a/Sources/Plexswift/models/operations/StartTaskResponseBody.swift +++ b/Sources/Plexswift/models/operations/StopTaskUnauthorized.swift @@ -1,22 +1,21 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct StartTaskResponseBody { - public let errors: [Operations.StartTaskErrors]? + public struct StopTaskUnauthorized { + public let errors: [Operations.StopTaskButlerErrors]? /// Creates an object with the specified parameters /// /// - public init(errors: [Operations.StartTaskErrors]? = nil) { + public init(errors: [Operations.StopTaskButlerErrors]? = nil) { self.errors = errors } - } -} + }} -extension Operations.StartTaskResponseBody: Codable { +extension Operations.StopTaskUnauthorized: Codable { enum CodingKeys: String, CodingKey { case errors } diff --git a/Sources/Plexswift/models/operations/StopTranscodeSessionBadRequest.swift b/Sources/Plexswift/models/operations/StopTranscodeSessionBadRequest.swift new file mode 100644 index 0000000..093f31f --- /dev/null +++ b/Sources/Plexswift/models/operations/StopTranscodeSessionBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct StopTranscodeSessionBadRequest { + public let errors: [Operations.StopTranscodeSessionErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.StopTranscodeSessionErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StopTranscodeSessionBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/StopTranscodeSessionErrors.swift b/Sources/Plexswift/models/operations/StopTranscodeSessionErrors.swift index 1b64caf..11b7f80 100644 --- a/Sources/Plexswift/models/operations/StopTranscodeSessionErrors.swift +++ b/Sources/Plexswift/models/operations/StopTranscodeSessionErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct StopTranscodeSessionErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.StopTranscodeSessionErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.StopTranscodeSessionErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.StopTranscodeSessionErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/StopTranscodeSessionRequest.swift b/Sources/Plexswift/models/operations/StopTranscodeSessionRequest.swift index 13352e6..674f78f 100644 --- a/Sources/Plexswift/models/operations/StopTranscodeSessionRequest.swift +++ b/Sources/Plexswift/models/operations/StopTranscodeSessionRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -15,5 +15,4 @@ extension Operations { public init(sessionKey: String) { self.sessionKey = sessionKey } - } -} + }} diff --git a/Sources/Plexswift/models/operations/StopTranscodeSessionResponse.swift b/Sources/Plexswift/models/operations/StopTranscodeSessionResponse.swift index b185940..13c6228 100644 --- a/Sources/Plexswift/models/operations/StopTranscodeSessionResponse.swift +++ b/Sources/Plexswift/models/operations/StopTranscodeSessionResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum StopTranscodeSessionResponse { case empty - case object(Operations.StopTranscodeSessionResponseBody) + case badRequest(Operations.StopTranscodeSessionBadRequest) + case unauthorized(Operations.StopTranscodeSessionUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.StopTranscodeSessionResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.StopTranscodeSessionBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.StopTranscodeSessionUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/StopTranscodeSessionSessionsErrors.swift b/Sources/Plexswift/models/operations/StopTranscodeSessionSessionsErrors.swift new file mode 100644 index 0000000..69234e5 --- /dev/null +++ b/Sources/Plexswift/models/operations/StopTranscodeSessionSessionsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct StopTranscodeSessionSessionsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.StopTranscodeSessionSessionsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/StopTranscodeSessionUnauthorized.swift b/Sources/Plexswift/models/operations/StopTranscodeSessionUnauthorized.swift new file mode 100644 index 0000000..599c8e4 --- /dev/null +++ b/Sources/Plexswift/models/operations/StopTranscodeSessionUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct StopTranscodeSessionUnauthorized { + public let errors: [Operations.StopTranscodeSessionSessionsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.StopTranscodeSessionSessionsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.StopTranscodeSessionUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/Stream.swift b/Sources/Plexswift/models/operations/Stream.swift index c4b80e4..ba61da3 100644 --- a/Sources/Plexswift/models/operations/Stream.swift +++ b/Sources/Plexswift/models/operations/Stream.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -75,8 +75,7 @@ extension Operations { self.streamType = streamType self.width = width } - } -} + }} extension Operations.Stream: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Subscription.swift b/Sources/Plexswift/models/operations/Subscription.swift new file mode 100644 index 0000000..693bdca --- /dev/null +++ b/Sources/Plexswift/models/operations/Subscription.swift @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// If the account’s Plex Pass subscription is active + public struct Subscription { + /// If the account's Plex Pass subscription is active + public let active: Bool? + /// List of features allowed on your Plex Pass subscription + public let features: [Operations.Features]? + /// Payment service used for your Plex Pass subscription + public let paymentService: String? + /// Name of Plex Pass subscription plan + public let plan: String? + /// String representation of subscriptionActive + public let status: Operations.GetTokenDetailsAuthenticationStatus? + /// Date the account subscribed to Plex Pass + public let subscribedAt: String? + + /// Creates an object with the specified parameters + /// + /// - Parameter active: If the account's Plex Pass subscription is active + /// - Parameter features: List of features allowed on your Plex Pass subscription + /// - Parameter paymentService: Payment service used for your Plex Pass subscription + /// - Parameter plan: Name of Plex Pass subscription plan + /// - Parameter status: String representation of subscriptionActive + /// - Parameter subscribedAt: Date the account subscribed to Plex Pass + /// + public init(active: Bool? = nil, features: [Operations.Features]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.GetTokenDetailsAuthenticationStatus? = nil, subscribedAt: String? = nil) { + self.active = active + self.features = features + self.paymentService = paymentService + self.plan = plan + self.status = status + self.subscribedAt = subscribedAt + } + }} + +extension Operations.Subscription: Codable { + enum CodingKeys: String, CodingKey { + case active + case features + case paymentService + case plan + case status + case subscribedAt + } +} + diff --git a/Sources/Plexswift/models/operations/Tag.swift b/Sources/Plexswift/models/operations/Tag.swift index ba79fea..2d41744 100644 --- a/Sources/Plexswift/models/operations/Tag.swift +++ b/Sources/Plexswift/models/operations/Tag.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -24,5 +24,4 @@ extension Operations { case resolution = "resolution" case firstCharacter = "firstCharacter" case folder = "folder" - } -} + }} diff --git a/Sources/Plexswift/models/operations/TaskName.swift b/Sources/Plexswift/models/operations/TaskName.swift index 1e5e7d9..675e12a 100644 --- a/Sources/Plexswift/models/operations/TaskName.swift +++ b/Sources/Plexswift/models/operations/TaskName.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -19,5 +19,4 @@ extension Operations { case refreshLocalMedia = "RefreshLocalMedia" case refreshPeriodicMetadata = "RefreshPeriodicMetadata" case upgradeMediaAnalysis = "UpgradeMediaAnalysis" - } -} + }} diff --git a/Sources/Plexswift/models/operations/Tonight.swift b/Sources/Plexswift/models/operations/Tonight.swift index 2fc14e9..8dfa5bf 100644 --- a/Sources/Plexswift/models/operations/Tonight.swift +++ b/Sources/Plexswift/models/operations/Tonight.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum Tonight: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/TranscodeSession.swift b/Sources/Plexswift/models/operations/TranscodeSession.swift index 7a3c4ce..4d72a2f 100644 --- a/Sources/Plexswift/models/operations/TranscodeSession.swift +++ b/Sources/Plexswift/models/operations/TranscodeSession.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -64,8 +64,7 @@ extension Operations { self.videoCodec = videoCodec self.videoDecision = videoDecision } - } -} + }} extension Operations.TranscodeSession: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/Trials.swift b/Sources/Plexswift/models/operations/Trials.swift new file mode 100644 index 0000000..12792d2 --- /dev/null +++ b/Sources/Plexswift/models/operations/Trials.swift @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct Trials { + + /// Creates an object + /// + /// + public init() { + } + }} + +extension Operations.Trials: Codable { +} + diff --git a/Sources/Plexswift/models/operations/TypeModel.swift b/Sources/Plexswift/models/operations/TypeModel.swift index 218c729..976dafc 100644 --- a/Sources/Plexswift/models/operations/TypeModel.swift +++ b/Sources/Plexswift/models/operations/TypeModel.swift @@ -1,13 +1,18 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { - /// Plex content type to search for + /// The type of media to retrieve. + /// 1 = movie + /// 2 = show + /// 3 = season + /// 4 = episode + /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + /// public enum TypeModel: Int, Codable, APIValue { case one = 1 case two = 2 case three = 3 case four = 4 - } -} + }} diff --git a/Sources/Plexswift/models/operations/UpdatePlayProgressBadRequest.swift b/Sources/Plexswift/models/operations/UpdatePlayProgressBadRequest.swift new file mode 100644 index 0000000..5b1243a --- /dev/null +++ b/Sources/Plexswift/models/operations/UpdatePlayProgressBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct UpdatePlayProgressBadRequest { + public let errors: [Operations.UpdatePlayProgressErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.UpdatePlayProgressErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.UpdatePlayProgressBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/UpdatePlayProgressErrors.swift b/Sources/Plexswift/models/operations/UpdatePlayProgressErrors.swift index 31f7fe9..537db42 100644 --- a/Sources/Plexswift/models/operations/UpdatePlayProgressErrors.swift +++ b/Sources/Plexswift/models/operations/UpdatePlayProgressErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct UpdatePlayProgressErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.UpdatePlayProgressErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.UpdatePlayProgressErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.UpdatePlayProgressErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/UpdatePlayProgressMediaErrors.swift b/Sources/Plexswift/models/operations/UpdatePlayProgressMediaErrors.swift new file mode 100644 index 0000000..df85264 --- /dev/null +++ b/Sources/Plexswift/models/operations/UpdatePlayProgressMediaErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct UpdatePlayProgressMediaErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.UpdatePlayProgressMediaErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/UpdatePlayProgressRequest.swift b/Sources/Plexswift/models/operations/UpdatePlayProgressRequest.swift index bab1113..d2c523d 100644 --- a/Sources/Plexswift/models/operations/UpdatePlayProgressRequest.swift +++ b/Sources/Plexswift/models/operations/UpdatePlayProgressRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -24,8 +24,7 @@ extension Operations { self.state = state self._time = DecimalSerialized(wrappedValue: time) } - } -} + }} extension Operations.UpdatePlayProgressRequest { var timeWrapper: DecimalSerialized { return _time diff --git a/Sources/Plexswift/models/operations/UpdatePlayProgressResponse.swift b/Sources/Plexswift/models/operations/UpdatePlayProgressResponse.swift index 14cbd0f..44a53de 100644 --- a/Sources/Plexswift/models/operations/UpdatePlayProgressResponse.swift +++ b/Sources/Plexswift/models/operations/UpdatePlayProgressResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum UpdatePlayProgressResponse { case empty - case object(Operations.UpdatePlayProgressResponseBody) + case badRequest(Operations.UpdatePlayProgressBadRequest) + case unauthorized(Operations.UpdatePlayProgressUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.UpdatePlayProgressResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.UpdatePlayProgressBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.UpdatePlayProgressUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/UpdatePlayProgressUnauthorized.swift b/Sources/Plexswift/models/operations/UpdatePlayProgressUnauthorized.swift new file mode 100644 index 0000000..4dd2baf --- /dev/null +++ b/Sources/Plexswift/models/operations/UpdatePlayProgressUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct UpdatePlayProgressUnauthorized { + public let errors: [Operations.UpdatePlayProgressMediaErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.UpdatePlayProgressMediaErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.UpdatePlayProgressUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/UpdatePlaylistBadRequest.swift b/Sources/Plexswift/models/operations/UpdatePlaylistBadRequest.swift new file mode 100644 index 0000000..ea0ea92 --- /dev/null +++ b/Sources/Plexswift/models/operations/UpdatePlaylistBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct UpdatePlaylistBadRequest { + public let errors: [Operations.UpdatePlaylistErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.UpdatePlaylistErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.UpdatePlaylistBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/UpdatePlaylistErrors.swift b/Sources/Plexswift/models/operations/UpdatePlaylistErrors.swift index 19e6475..ee20002 100644 --- a/Sources/Plexswift/models/operations/UpdatePlaylistErrors.swift +++ b/Sources/Plexswift/models/operations/UpdatePlaylistErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct UpdatePlaylistErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.UpdatePlaylistErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.UpdatePlaylistErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.UpdatePlaylistErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/UpdatePlaylistPlaylistsErrors.swift b/Sources/Plexswift/models/operations/UpdatePlaylistPlaylistsErrors.swift new file mode 100644 index 0000000..059c3f4 --- /dev/null +++ b/Sources/Plexswift/models/operations/UpdatePlaylistPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct UpdatePlaylistPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.UpdatePlaylistPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/UpdatePlaylistRequest.swift b/Sources/Plexswift/models/operations/UpdatePlaylistRequest.swift index 5e8e4e5..6819fad 100644 --- a/Sources/Plexswift/models/operations/UpdatePlaylistRequest.swift +++ b/Sources/Plexswift/models/operations/UpdatePlaylistRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -24,8 +24,7 @@ extension Operations { self.summary = summary self.title = title } - } -} + }} extension Operations.UpdatePlaylistRequest { var playlistIDWrapper: DecimalSerialized { return _playlistID diff --git a/Sources/Plexswift/models/operations/UpdatePlaylistResponse.swift b/Sources/Plexswift/models/operations/UpdatePlaylistResponse.swift index ae5bc13..6ed3815 100644 --- a/Sources/Plexswift/models/operations/UpdatePlaylistResponse.swift +++ b/Sources/Plexswift/models/operations/UpdatePlaylistResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum UpdatePlaylistResponse { case empty - case object(Operations.UpdatePlaylistResponseBody) + case badRequest(Operations.UpdatePlaylistBadRequest) + case unauthorized(Operations.UpdatePlaylistUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.UpdatePlaylistResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.UpdatePlaylistBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.UpdatePlaylistUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/UpdatePlaylistResponseBody.swift b/Sources/Plexswift/models/operations/UpdatePlaylistResponseBody.swift deleted file mode 100644 index 3cf4f4a..0000000 --- a/Sources/Plexswift/models/operations/UpdatePlaylistResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct UpdatePlaylistResponseBody { - public let errors: [Operations.UpdatePlaylistErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.UpdatePlaylistErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.UpdatePlaylistResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/UpdatePlaylistUnauthorized.swift b/Sources/Plexswift/models/operations/UpdatePlaylistUnauthorized.swift new file mode 100644 index 0000000..903c267 --- /dev/null +++ b/Sources/Plexswift/models/operations/UpdatePlaylistUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct UpdatePlaylistUnauthorized { + public let errors: [Operations.UpdatePlaylistPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.UpdatePlaylistPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.UpdatePlaylistUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/UploadPlaylistBadRequest.swift b/Sources/Plexswift/models/operations/UploadPlaylistBadRequest.swift new file mode 100644 index 0000000..acc858a --- /dev/null +++ b/Sources/Plexswift/models/operations/UploadPlaylistBadRequest.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Bad Request - A parameter was not specified, or was specified incorrectly. + public struct UploadPlaylistBadRequest { + public let errors: [Operations.UploadPlaylistErrors]? + + /// Creates a request model with the specified parameters + /// + /// + public init(errors: [Operations.UploadPlaylistErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.UploadPlaylistBadRequest: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/UploadPlaylistErrors.swift b/Sources/Plexswift/models/operations/UploadPlaylistErrors.swift index 01ade9a..2a8a73d 100644 --- a/Sources/Plexswift/models/operations/UploadPlaylistErrors.swift +++ b/Sources/Plexswift/models/operations/UploadPlaylistErrors.swift @@ -1,26 +1,23 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation extension Operations { /// A model object public struct UploadPlaylistErrors { - @DecimalSerialized - public private(set) var code: Double? + public let code: Int? public let message: String? - @DecimalSerialized - public private(set) var status: Double? + public let status: Int? /// Creates an object with the specified parameters /// /// - public init(code: Double? = nil, message: String? = nil, status: Double? = nil) { - self._code = DecimalSerialized(wrappedValue: code) + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code self.message = message - self._status = DecimalSerialized(wrappedValue: status) + self.status = status } - } -} + }} extension Operations.UploadPlaylistErrors: Codable { enum CodingKeys: String, CodingKey { @@ -28,31 +25,5 @@ extension Operations.UploadPlaylistErrors: Codable { case message case status } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self._code = try container.decodeIfPresent(DecimalSerialized.self, forKey: .code) ?? DecimalSerialized(wrappedValue: nil) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - self._status = try container.decodeIfPresent(DecimalSerialized.self, forKey: .status) ?? DecimalSerialized(wrappedValue: nil) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - if self.code != nil { - try container.encode(self._code, forKey: .code) - } - try container.encodeIfPresent(self.message, forKey: .message) - if self.status != nil { - try container.encode(self._status, forKey: .status) - } - } } -extension Operations.UploadPlaylistErrors { - var codeWrapper: DecimalSerialized { - return _code - } - var statusWrapper: DecimalSerialized { - return _status - } -} diff --git a/Sources/Plexswift/models/operations/UploadPlaylistPlaylistsErrors.swift b/Sources/Plexswift/models/operations/UploadPlaylistPlaylistsErrors.swift new file mode 100644 index 0000000..16bc532 --- /dev/null +++ b/Sources/Plexswift/models/operations/UploadPlaylistPlaylistsErrors.swift @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct UploadPlaylistPlaylistsErrors { + public let code: Int? + public let message: String? + public let status: Int? + + /// Creates an object with the specified parameters + /// + /// + public init(code: Int? = nil, message: String? = nil, status: Int? = nil) { + self.code = code + self.message = message + self.status = status + } + }} + +extension Operations.UploadPlaylistPlaylistsErrors: Codable { + enum CodingKeys: String, CodingKey { + case code + case message + case status + } +} + diff --git a/Sources/Plexswift/models/operations/UploadPlaylistRequest.swift b/Sources/Plexswift/models/operations/UploadPlaylistRequest.swift index 7fdbf70..450ca14 100644 --- a/Sources/Plexswift/models/operations/UploadPlaylistRequest.swift +++ b/Sources/Plexswift/models/operations/UploadPlaylistRequest.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -10,7 +10,7 @@ extension Operations { /// 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 let force: Operations.Force + public let force: Operations.QueryParamForce /// 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. @@ -35,9 +35,8 @@ extension Operations { /// The GUID of each playlist is based on the filename. /// /// - public init(force: Operations.Force, path: String) { + public init(force: Operations.QueryParamForce, path: String) { self.force = force self.path = path } - } -} + }} diff --git a/Sources/Plexswift/models/operations/UploadPlaylistResponse.swift b/Sources/Plexswift/models/operations/UploadPlaylistResponse.swift index 5b7ad6b..d83a549 100644 --- a/Sources/Plexswift/models/operations/UploadPlaylistResponse.swift +++ b/Sources/Plexswift/models/operations/UploadPlaylistResponse.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,7 +6,8 @@ extension Operations { /// A response model public enum UploadPlaylistResponse { case empty - case object(Operations.UploadPlaylistResponseBody) + case badRequest(Operations.UploadPlaylistBadRequest) + case unauthorized(Operations.UploadPlaylistUnauthorized) var isEmpty: Bool { if case .empty = self { @@ -16,11 +17,17 @@ extension Operations { } } - public func object() throws -> Operations.UploadPlaylistResponseBody { - guard case .object(let value) = self else { + public func badRequest() throws -> Operations.UploadPlaylistBadRequest { + guard case .badRequest(let value) = self else { throw PlexswiftError.missingResponseData } return value } - } -} + + public func unauthorized() throws -> Operations.UploadPlaylistUnauthorized { + guard case .unauthorized(let value) = self else { + throw PlexswiftError.missingResponseData + } + return value + } + }} diff --git a/Sources/Plexswift/models/operations/UploadPlaylistResponseBody.swift b/Sources/Plexswift/models/operations/UploadPlaylistResponseBody.swift deleted file mode 100644 index 952c785..0000000 --- a/Sources/Plexswift/models/operations/UploadPlaylistResponseBody.swift +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -import Foundation - -extension Operations { - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - public struct UploadPlaylistResponseBody { - public let errors: [Operations.UploadPlaylistErrors]? - - /// Creates an object with the specified parameters - /// - /// - public init(errors: [Operations.UploadPlaylistErrors]? = nil) { - self.errors = errors - } - } -} - -extension Operations.UploadPlaylistResponseBody: Codable { - enum CodingKeys: String, CodingKey { - case errors - } -} - diff --git a/Sources/Plexswift/models/operations/UploadPlaylistUnauthorized.swift b/Sources/Plexswift/models/operations/UploadPlaylistUnauthorized.swift new file mode 100644 index 0000000..356ae15 --- /dev/null +++ b/Sources/Plexswift/models/operations/UploadPlaylistUnauthorized.swift @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + public struct UploadPlaylistUnauthorized { + public let errors: [Operations.UploadPlaylistPlaylistsErrors]? + + /// Creates an object with the specified parameters + /// + /// + public init(errors: [Operations.UploadPlaylistPlaylistsErrors]? = nil) { + self.errors = errors + } + }} + +extension Operations.UploadPlaylistUnauthorized: Codable { + enum CodingKeys: String, CodingKey { + case errors + } +} + diff --git a/Sources/Plexswift/models/operations/Upscale.swift b/Sources/Plexswift/models/operations/Upscale.swift index 36a3857..bd6f38d 100644 --- a/Sources/Plexswift/models/operations/Upscale.swift +++ b/Sources/Plexswift/models/operations/Upscale.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -7,5 +7,4 @@ extension Operations { public enum Upscale: Int, Codable, APIValue { case zero = 0 case one = 1 - } -} + }} diff --git a/Sources/Plexswift/models/operations/User.swift b/Sources/Plexswift/models/operations/User.swift index f0b4398..d4d7162 100644 --- a/Sources/Plexswift/models/operations/User.swift +++ b/Sources/Plexswift/models/operations/User.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(id: Int? = nil) { self.id = id } - } -} + }} extension Operations.User: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/operations/UserProfile.swift b/Sources/Plexswift/models/operations/UserProfile.swift new file mode 100644 index 0000000..73ab565 --- /dev/null +++ b/Sources/Plexswift/models/operations/UserProfile.swift @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + /// A model object + public struct UserProfile { + /// The preferred audio language for the account + public let defaultAudioLanguage: String + /// The preferred subtitle language for the account + public let defaultSubtitleLanguage: String + /// If the account has automatically select audio and subtitle tracks enabled + public let autoSelectAudio: Bool? + /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + public let autoSelectSubtitle: Operations.AutoSelectSubtitle? + /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + public let defaultSubtitleAccessibility: Operations.DefaultSubtitleAccessibility? + /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + public let defaultSubtitleForced: Operations.DefaultSubtitleForced? + public let mediaReviewsVisibility: Operations.MediaReviewsVisibility? + public let watchedIndicator: Operations.WatchedIndicator? + + /// Creates an object with the specified parameters + /// + /// - Parameter defaultAudioLanguage: The preferred audio language for the account + /// - Parameter defaultSubtitleLanguage: The preferred subtitle language for the account + /// - Parameter autoSelectAudio: If the account has automatically select audio and subtitle tracks enabled + /// - Parameter autoSelectSubtitle: The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + /// - Parameter defaultSubtitleAccessibility: The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + /// - Parameter defaultSubtitleForced: The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + /// + public init(defaultAudioLanguage: String, defaultSubtitleLanguage: String, autoSelectAudio: Bool? = nil, autoSelectSubtitle: Operations.AutoSelectSubtitle? = nil, defaultSubtitleAccessibility: Operations.DefaultSubtitleAccessibility? = nil, defaultSubtitleForced: Operations.DefaultSubtitleForced? = nil, mediaReviewsVisibility: Operations.MediaReviewsVisibility? = nil, watchedIndicator: Operations.WatchedIndicator? = nil) { + self.defaultAudioLanguage = defaultAudioLanguage + self.defaultSubtitleLanguage = defaultSubtitleLanguage + self.autoSelectAudio = autoSelectAudio + self.autoSelectSubtitle = autoSelectSubtitle + self.defaultSubtitleAccessibility = defaultSubtitleAccessibility + self.defaultSubtitleForced = defaultSubtitleForced + self.mediaReviewsVisibility = mediaReviewsVisibility + self.watchedIndicator = watchedIndicator + } + }} + +extension Operations.UserProfile: Codable { + enum CodingKeys: String, CodingKey { + case defaultAudioLanguage + case defaultSubtitleLanguage + case autoSelectAudio + case autoSelectSubtitle + case defaultSubtitleAccessibility + case defaultSubtitleForced + case mediaReviewsVisibility + case watchedIndicator + } +} + diff --git a/Sources/Plexswift/models/operations/WatchedIndicator.swift b/Sources/Plexswift/models/operations/WatchedIndicator.swift new file mode 100644 index 0000000..a84586a --- /dev/null +++ b/Sources/Plexswift/models/operations/WatchedIndicator.swift @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +import Foundation + +extension Operations { + public enum WatchedIndicator: String, Codable, APIValue { + case zero = "0" + case one = "1" + }} diff --git a/Sources/Plexswift/models/operations/Writer.swift b/Sources/Plexswift/models/operations/Writer.swift index 7fd7525..70294d0 100644 --- a/Sources/Plexswift/models/operations/Writer.swift +++ b/Sources/Plexswift/models/operations/Writer.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -13,8 +13,7 @@ extension Operations { public init(tag: String? = nil) { self.tag = tag } - } -} + }} extension Operations.Writer: Codable { enum CodingKeys: String, CodingKey { diff --git a/Sources/Plexswift/models/shared/Security.swift b/Sources/Plexswift/models/shared/Security.swift index 74db21e..9a38fe9 100644 --- a/Sources/Plexswift/models/shared/Security.swift +++ b/Sources/Plexswift/models/shared/Security.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -6,5 +6,4 @@ extension Shared { /// Describes the available authentication methods when connecting to the API. public enum Security { case accessToken(String) - } -} + }} diff --git a/Sources/plexswift/AnyValue.swift b/Sources/plexswift/AnyValue.swift index 253e4de..1ac0613 100644 --- a/Sources/plexswift/AnyValue.swift +++ b/Sources/plexswift/AnyValue.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/PlexswiftAPI.swift b/Sources/plexswift/PlexswiftAPI.swift index fa40e9b..07b758b 100644 --- a/Sources/plexswift/PlexswiftAPI.swift +++ b/Sources/plexswift/PlexswiftAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -26,13 +26,13 @@ import Foundation /// - ``hubs`` /// - ``search`` /// - ``library`` +/// - ``watchlist`` /// - ``log`` /// - ``playlists`` /// - ``authentication`` /// - ``statistics`` /// - ``sessions`` /// - ``updater`` -/// - ``watchlist`` /// public protocol PlexswiftAPI { @@ -70,6 +70,9 @@ public protocol PlexswiftAPI { /// API Calls interacting with Plex Media Server Libraries /// var library: LibraryAPI { get } + /// API Calls that perform operations with Plex Media Server Watchlists + /// + var watchlist: WatchlistAPI { get } /// Submit logs to the Log Handler for Plex Media Server /// var log: LogAPI { get } @@ -92,9 +95,6 @@ public protocol PlexswiftAPI { /// Updates to the status can be observed via the Event API. /// var updater: UpdaterAPI { get } - /// API Calls that perform operations with Plex Media Server Watchlists - /// - var watchlist: WatchlistAPI { get } } // MARK: - ServerAPI @@ -113,6 +113,7 @@ public protocol PlexswiftAPI { /// - ``getServerIdentity()`` /// - ``getMyPlexAccount()`` /// - ``getResizedPhoto(request:)`` +/// - ``getMediaProviders(request:)`` /// - ``getServerList()`` /// public protocol ServerAPI { @@ -140,7 +141,7 @@ public protocol ServerAPI { /// - Throws: An error of type ``PlexswiftError`` func getDevices() async throws -> Response - /// Get Server Identity + /// This request is useful to determine if the server is online or offline /// /// - Returns: A ``Operations/GetServerIdentityResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` @@ -160,6 +161,13 @@ public protocol ServerAPI { /// - Throws: An error of type ``PlexswiftError`` func getResizedPhoto(request: Operations.GetResizedPhotoRequest) async throws -> Response + /// Retrieves media providers and their features from the Plex server. + /// + /// - Parameter request: A ``Operations/GetMediaProvidersRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetMediaProvidersResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getMediaProviders(request: Operations.GetMediaProvidersRequest) async throws -> Response + /// Get Server List /// /// - Returns: A ``Operations/GetServerListResponse`` object describing the result of the API operation @@ -179,6 +187,8 @@ public protocol ServerAPI { /// - ``markPlayed(request:)`` /// - ``markUnplayed(request:)`` /// - ``updatePlayProgress(request:)`` +/// - ``getBannerImage(request:)`` +/// - ``getThumbImage(request:)`` /// public protocol MediaAPI { /// This will mark the provided media key as Played. @@ -202,6 +212,20 @@ public protocol MediaAPI { /// - Returns: A ``Operations/UpdatePlayProgressResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` func updatePlayProgress(request: Operations.UpdatePlayProgressRequest) async throws -> Response + + /// Gets the banner image of the media item + /// + /// - Parameter request: A ``Operations/GetBannerImageRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetBannerImageResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getBannerImage(request: Operations.GetBannerImageRequest) async throws -> ResponseWithHeaders + + /// Gets the thumbnail image of the media item + /// + /// - Parameter request: A ``Operations/GetThumbImageRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetThumbImageResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getThumbImage(request: Operations.GetThumbImageRequest) async throws -> ResponseWithHeaders } // MARK: - VideoAPI @@ -329,13 +353,13 @@ public protocol ButlerAPI { // MARK: - PlexAPI public enum PlexServers { -/// Describes the available servers that can be used when making 'getPin' requests. +/// Describes the available servers that can be used when making 'getCompanionsData' requests. /// -/// Use this type when making calls to ``PlexAPI/getPin(request:server:)`` to customize the server which is used. - public enum GetPin: Servers, ServerConvertible { +/// Use this type when making calls to ``PlexAPI/getCompanionsData(server:)`` to customize the server which is used. + public enum GetCompanionsData: Servers, ServerConvertible { /// Supported server value. /// - /// Corresponds to `https://plex.tv/api/v2` + /// Corresponds to `https://plex.tv/api/v2/` case server1 /// Defines the raw URL strings for each server option. @@ -345,11 +369,151 @@ public enum PlexServers { /// The available URL strings are defined as: /// ```swift /// public static let urlStrings = [ - /// "https://plex.tv/api/v2" + /// "https://plex.tv/api/v2/" /// ] /// ``` public static let urlStrings = [ - "https://plex.tv/api/v2" + "https://plex.tv/api/v2/" + ] + + static func `default`() throws -> Server { + return try PlexServers.GetCompanionsData.server1.server() + } + + func server() throws -> Server { + switch self { + case .server1: + return try type(of: self).server(at: 0, substituting: nil) + } + } + } + +/// Describes the available servers that can be used when making 'getUserFriends' requests. +/// +/// Use this type when making calls to ``PlexAPI/getUserFriends(server:)`` to customize the server which is used. + public enum GetUserFriends: Servers, ServerConvertible { + /// Supported server value. + /// + /// Corresponds to `https://plex.tv/api/v2/` + case server1 + + /// Defines the raw URL strings for each server option. + /// + /// > Note: You do not need to use these values directly. + /// + /// The available URL strings are defined as: + /// ```swift + /// public static let urlStrings = [ + /// "https://plex.tv/api/v2/" + /// ] + /// ``` + public static let urlStrings = [ + "https://plex.tv/api/v2/" + ] + + static func `default`() throws -> Server { + return try PlexServers.GetUserFriends.server1.server() + } + + func server() throws -> Server { + switch self { + case .server1: + return try type(of: self).server(at: 0, substituting: nil) + } + } + } + +/// Describes the available servers that can be used when making 'getGeoData' requests. +/// +/// Use this type when making calls to ``PlexAPI/getGeoData(server:)`` to customize the server which is used. + public enum GetGeoData: Servers, ServerConvertible { + /// Supported server value. + /// + /// Corresponds to `https://plex.tv/api/v2/` + case server1 + + /// Defines the raw URL strings for each server option. + /// + /// > Note: You do not need to use these values directly. + /// + /// The available URL strings are defined as: + /// ```swift + /// public static let urlStrings = [ + /// "https://plex.tv/api/v2/" + /// ] + /// ``` + public static let urlStrings = [ + "https://plex.tv/api/v2/" + ] + + static func `default`() throws -> Server { + return try PlexServers.GetGeoData.server1.server() + } + + func server() throws -> Server { + switch self { + case .server1: + return try type(of: self).server(at: 0, substituting: nil) + } + } + } + +/// Describes the available servers that can be used when making 'get-server-resources' requests. +/// +/// Use this type when making calls to ``PlexAPI/getServerResources(request:server:)`` to customize the server which is used. + public enum GetServerResources: Servers, ServerConvertible { + /// Supported server value. + /// + /// Corresponds to `https://plex.tv/api/v2/` + case server1 + + /// Defines the raw URL strings for each server option. + /// + /// > Note: You do not need to use these values directly. + /// + /// The available URL strings are defined as: + /// ```swift + /// public static let urlStrings = [ + /// "https://plex.tv/api/v2/" + /// ] + /// ``` + public static let urlStrings = [ + "https://plex.tv/api/v2/" + ] + + static func `default`() throws -> Server { + return try PlexServers.GetServerResources.server1.server() + } + + func server() throws -> Server { + switch self { + case .server1: + return try type(of: self).server(at: 0, substituting: nil) + } + } + } + +/// Describes the available servers that can be used when making 'getPin' requests. +/// +/// Use this type when making calls to ``PlexAPI/getPin(request:server:)`` to customize the server which is used. + public enum GetPin: Servers, ServerConvertible { + /// Supported server value. + /// + /// Corresponds to `https://plex.tv/api/v2/` + case server1 + + /// Defines the raw URL strings for each server option. + /// + /// > Note: You do not need to use these values directly. + /// + /// The available URL strings are defined as: + /// ```swift + /// public static let urlStrings = [ + /// "https://plex.tv/api/v2/" + /// ] + /// ``` + public static let urlStrings = [ + "https://plex.tv/api/v2/" ] static func `default`() throws -> Server { @@ -364,13 +528,13 @@ public enum PlexServers { } } -/// Describes the available servers that can be used when making 'getToken' requests. +/// Describes the available servers that can be used when making 'getTokenByPinId' requests. /// -/// Use this type when making calls to ``PlexAPI/getToken(request:server:)`` to customize the server which is used. - public enum GetToken: Servers, ServerConvertible { +/// Use this type when making calls to ``PlexAPI/getTokenByPinId(request:server:)`` to customize the server which is used. + public enum GetTokenByPinId: Servers, ServerConvertible { /// Supported server value. /// - /// Corresponds to `https://plex.tv/api/v2` + /// Corresponds to `https://plex.tv/api/v2/` case server1 /// Defines the raw URL strings for each server option. @@ -380,15 +544,15 @@ public enum PlexServers { /// The available URL strings are defined as: /// ```swift /// public static let urlStrings = [ - /// "https://plex.tv/api/v2" + /// "https://plex.tv/api/v2/" /// ] /// ``` public static let urlStrings = [ - "https://plex.tv/api/v2" + "https://plex.tv/api/v2/" ] static func `default`() throws -> Server { - return try PlexServers.GetToken.server1.server() + return try PlexServers.GetTokenByPinId.server1.server() } func server() throws -> Server { @@ -407,17 +571,50 @@ public enum PlexServers { /// /// ### API calls /// +/// - ``getCompanionsData(server:)`` +/// - ``getUserFriends(server:)`` +/// - ``getGeoData(server:)`` /// - ``getHomeData()`` +/// - ``getServerResources(request:server:)`` /// - ``getPin(request:server:)`` -/// - ``getToken(request:server:)`` +/// - ``getTokenByPinId(request:server:)`` /// public protocol PlexAPI { + /// Get Companions Data + /// + /// - Parameter server: An optional server override to use for this operation + /// - Returns: A ``Operations/GetCompanionsDataResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getCompanionsData(server: PlexServers.GetCompanionsData?) async throws -> Response + + /// Get friends of provided auth token. + /// + /// - Parameter server: An optional server override to use for this operation + /// - Returns: A ``Operations/GetUserFriendsResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getUserFriends(server: PlexServers.GetUserFriends?) async throws -> Response + + /// Returns the geolocation and locale data of the caller + /// + /// - Parameter server: An optional server override to use for this operation + /// - Returns: A ``Operations/GetGeoDataResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getGeoData(server: PlexServers.GetGeoData?) async throws -> Response + /// Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. /// /// - Returns: A ``Operations/GetHomeDataResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` func getHomeData() async throws -> Response + /// Get Plex server access tokens and server connections + /// + /// - Parameter request: A ``Operations/GetServerResourcesRequest`` object describing the input to the API operation + /// - Parameter server: An optional server override to use for this operation + /// - Returns: A ``Operations/GetServerResourcesResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getServerResources(request: Operations.GetServerResourcesRequest, server: PlexServers.GetServerResources?) async throws -> Response + /// Retrieve a Pin from Plex.tv for authentication flows /// /// - Parameter request: A ``Operations/GetPinRequest`` object describing the input to the API operation @@ -426,13 +623,13 @@ public protocol PlexAPI { /// - Throws: An error of type ``PlexswiftError`` func getPin(request: Operations.GetPinRequest, server: PlexServers.GetPin?) async throws -> Response - /// Retrieve an Access Token from Plex.tv after the Pin has already been authenticated + /// Retrieve an Access Token from Plex.tv after the Pin has been authenticated /// - /// - Parameter request: A ``Operations/GetTokenRequest`` object describing the input to the API operation + /// - Parameter request: A ``Operations/GetTokenByPinIdRequest`` object describing the input to the API operation /// - Parameter server: An optional server override to use for this operation - /// - Returns: A ``Operations/GetTokenResponse`` object describing the result of the API operation + /// - Returns: A ``Operations/GetTokenByPinIdResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func getToken(request: Operations.GetTokenRequest, server: PlexServers.GetToken?) async throws -> Response + func getTokenByPinId(request: Operations.GetTokenByPinIdRequest, server: PlexServers.GetTokenByPinId?) async throws -> Response } // MARK: - HubsAPI @@ -526,14 +723,14 @@ public protocol SearchAPI { /// ### API calls /// /// - ``getFileHash(request:)`` -/// - ``getRecentlyAdded()`` -/// - ``getLibraries()`` -/// - ``getLibrary(request:)`` +/// - ``getRecentlyAdded(request:)`` +/// - ``getAllLibraries()`` +/// - ``getLibraryDetails(request:)`` /// - ``deleteLibrary(request:)`` /// - ``getLibraryItems(request:)`` -/// - ``refreshLibrary(request:)`` -/// - ``searchLibrary(request:)`` -/// - ``getMetadata(request:)`` +/// - ``getRefreshLibraryMetadata(request:)`` +/// - ``getSearchLibrary(request:)`` +/// - ``getMetaDataByRatingKey(request:)`` /// - ``getMetadataChildren(request:)`` /// - ``getTopWatchedContent(request:)`` /// - ``getOnDeck()`` @@ -549,9 +746,10 @@ public protocol LibraryAPI { /// This endpoint will return the recently added content. /// /// + /// - Parameter request: A ``Operations/GetRecentlyAddedRequest`` object describing the input to the API operation /// - Returns: A ``Operations/GetRecentlyAddedResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func getRecentlyAdded() async throws -> Response + func getRecentlyAdded(request: Operations.GetRecentlyAddedRequest) async throws -> Response /// 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. @@ -561,9 +759,9 @@ public protocol LibraryAPI { /// This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). /// /// - /// - Returns: A ``Operations/GetLibrariesResponse`` object describing the result of the API operation + /// - Returns: A ``Operations/GetAllLibrariesResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func getLibraries() async throws -> Response + func getAllLibraries() async throws -> Response /// ## Library Details Endpoint /// @@ -606,12 +804,12 @@ public protocol LibraryAPI { /// > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. /// /// - /// - Parameter request: A ``Operations/GetLibraryRequest`` object describing the input to the API operation - /// - Returns: A ``Operations/GetLibraryResponse`` object describing the result of the API operation + /// - Parameter request: A ``Operations/GetLibraryDetailsRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetLibraryDetailsResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func getLibrary(request: Operations.GetLibraryRequest) async throws -> Response + func getLibraryDetails(request: Operations.GetLibraryDetailsRequest) async throws -> Response - /// Delate a library using a specific section + /// Delete a library using a specific section id /// /// - Parameter request: A ``Operations/DeleteLibraryRequest`` object describing the input to the API operation /// - Returns: A ``Operations/DeleteLibraryResponse`` object describing the result of the API operation @@ -645,13 +843,13 @@ public protocol LibraryAPI { /// - Throws: An error of type ``PlexswiftError`` func getLibraryItems(request: Operations.GetLibraryItemsRequest) async throws -> Response - /// This endpoint Refreshes the library. + /// This endpoint Refreshes all the Metadata of the library. /// /// - /// - Parameter request: A ``Operations/RefreshLibraryRequest`` object describing the input to the API operation - /// - Returns: A ``Operations/RefreshLibraryResponse`` object describing the result of the API operation + /// - Parameter request: A ``Operations/GetRefreshLibraryMetadataRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetRefreshLibraryMetadataResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func refreshLibrary(request: Operations.RefreshLibraryRequest) async throws -> Response + func getRefreshLibraryMetadata(request: Operations.GetRefreshLibraryMetadataRequest) async throws -> Response /// Search for content within a specific section of the library. /// @@ -673,18 +871,18 @@ public protocol LibraryAPI { /// > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. /// /// - /// - Parameter request: A ``Operations/SearchLibraryRequest`` object describing the input to the API operation - /// - Returns: A ``Operations/SearchLibraryResponse`` object describing the result of the API operation + /// - Parameter request: A ``Operations/GetSearchLibraryRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetSearchLibraryResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func searchLibrary(request: Operations.SearchLibraryRequest) async throws -> Response + func getSearchLibrary(request: Operations.GetSearchLibraryRequest) async throws -> Response /// This endpoint will return the metadata of a library item specified with the ratingKey. /// /// - /// - Parameter request: A ``Operations/GetMetadataRequest`` object describing the input to the API operation - /// - Returns: A ``Operations/GetMetadataResponse`` object describing the result of the API operation + /// - Parameter request: A ``Operations/GetMetaDataByRatingKeyRequest`` object describing the input to the API operation + /// - Returns: A ``Operations/GetMetaDataByRatingKeyResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` - func getMetadata(request: Operations.GetMetadataRequest) async throws -> Response + func getMetaDataByRatingKey(request: Operations.GetMetaDataByRatingKeyRequest) async throws -> Response /// This endpoint will return the children of of a library item specified with the ratingKey. /// @@ -710,6 +908,64 @@ public protocol LibraryAPI { func getOnDeck() async throws -> Response } +// MARK: - WatchlistAPI +public enum WatchlistServers { + +/// Describes the available servers that can be used when making 'get-watch-list' requests. +/// +/// Use this type when making calls to ``WatchlistAPI/getWatchList(request:server:)`` to customize the server which is used. + public enum GetWatchList: Servers, ServerConvertible { + /// Supported server value. + /// + /// Corresponds to `https://metadata.provider.plex.tv` + case server1 + + /// Defines the raw URL strings for each server option. + /// + /// > Note: You do not need to use these values directly. + /// + /// The available URL strings are defined as: + /// ```swift + /// public static let urlStrings = [ + /// "https://metadata.provider.plex.tv" + /// ] + /// ``` + public static let urlStrings = [ + "https://metadata.provider.plex.tv" + ] + + static func `default`() throws -> Server { + return try WatchlistServers.GetWatchList.server1.server() + } + + func server() throws -> Server { + switch self { + case .server1: + return try type(of: self).server(at: 0, substituting: nil) + } + } + } +} + +/// API Calls that perform operations with Plex Media Server Watchlists +/// +/// +/// ## Topics +/// +/// ### API calls +/// +/// - ``getWatchList(request:server:)`` +/// +public protocol WatchlistAPI { + /// Get User Watchlist + /// + /// - Parameter request: A ``Operations/GetWatchListRequest`` object describing the input to the API operation + /// - Parameter server: An optional server override to use for this operation + /// - Returns: A ``Operations/GetWatchListResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getWatchList(request: Operations.GetWatchListRequest, server: WatchlistServers.GetWatchList?) async throws -> Response +} + // MARK: - LogAPI /// Submit logs to the Log Handler for Plex Media Server @@ -871,6 +1127,78 @@ public protocol PlaylistsAPI { } // MARK: - AuthenticationAPI +public enum AuthenticationServers { + +/// Describes the available servers that can be used when making 'getTokenDetails' requests. +/// +/// Use this type when making calls to ``AuthenticationAPI/getTokenDetails(server:)`` to customize the server which is used. + public enum GetTokenDetails: Servers, ServerConvertible { + /// Supported server value. + /// + /// Corresponds to `https://plex.tv/api/v2/` + case server1 + + /// Defines the raw URL strings for each server option. + /// + /// > Note: You do not need to use these values directly. + /// + /// The available URL strings are defined as: + /// ```swift + /// public static let urlStrings = [ + /// "https://plex.tv/api/v2/" + /// ] + /// ``` + public static let urlStrings = [ + "https://plex.tv/api/v2/" + ] + + static func `default`() throws -> Server { + return try AuthenticationServers.GetTokenDetails.server1.server() + } + + func server() throws -> Server { + switch self { + case .server1: + return try type(of: self).server(at: 0, substituting: nil) + } + } + } + +/// Describes the available servers that can be used when making 'post-users-sign-in-data' requests. +/// +/// Use this type when making calls to ``AuthenticationAPI/postUsersSignInData(request:server:)`` to customize the server which is used. + public enum PostUsersSignInData: Servers, ServerConvertible { + /// Supported server value. + /// + /// Corresponds to `https://plex.tv/api/v2/` + case server1 + + /// Defines the raw URL strings for each server option. + /// + /// > Note: You do not need to use these values directly. + /// + /// The available URL strings are defined as: + /// ```swift + /// public static let urlStrings = [ + /// "https://plex.tv/api/v2/" + /// ] + /// ``` + public static let urlStrings = [ + "https://plex.tv/api/v2/" + ] + + static func `default`() throws -> Server { + return try AuthenticationServers.PostUsersSignInData.server1.server() + } + + func server() throws -> Server { + switch self { + case .server1: + return try type(of: self).server(at: 0, substituting: nil) + } + } + } +} /// API Calls regarding authentication for Plex Media Server /// @@ -881,6 +1209,8 @@ public protocol PlaylistsAPI { /// /// - ``getTransientToken(request:)`` /// - ``getSourceConnectionInformation(request:)`` +/// - ``getTokenDetails(server:)`` +/// - ``postUsersSignInData(request:server:)`` /// public protocol AuthenticationAPI { /// 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. @@ -899,6 +1229,21 @@ public protocol AuthenticationAPI { /// - Returns: A ``Operations/GetSourceConnectionInformationResponse`` object describing the result of the API operation /// - Throws: An error of type ``PlexswiftError`` func getSourceConnectionInformation(request: Operations.GetSourceConnectionInformationRequest) async throws -> Response + + /// Get the User data from the provided X-Plex-Token + /// + /// - Parameter server: An optional server override to use for this operation + /// - Returns: A ``Operations/GetTokenDetailsResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func getTokenDetails(server: AuthenticationServers.GetTokenDetails?) async throws -> Response + + /// Sign in user with username and password and return user data with Plex authentication token + /// + /// - Parameter request: A ``Operations/PostUsersSignInDataRequest`` object describing the input to the API operation + /// - Parameter server: An optional server override to use for this operation + /// - Returns: A ``Operations/PostUsersSignInDataResponse`` object describing the result of the API operation + /// - Throws: An error of type ``PlexswiftError`` + func postUsersSignInData(request: Operations.PostUsersSignInDataRequest, server: AuthenticationServers.PostUsersSignInData?) async throws -> Response } // MARK: - StatisticsAPI @@ -1015,61 +1360,3 @@ public protocol UpdaterAPI { /// - Throws: An error of type ``PlexswiftError`` func applyUpdates(request: Operations.ApplyUpdatesRequest) async throws -> Response } - -// MARK: - WatchlistAPI -public enum WatchlistServers { - -/// Describes the available servers that can be used when making 'getWatchlist' requests. -/// -/// Use this type when making calls to ``WatchlistAPI/getWatchlist(request:server:)`` to customize the server which is used. - public enum GetWatchlist: Servers, ServerConvertible { - /// Supported server value. - /// - /// Corresponds to `https://metadata.provider.plex.tv` - case server1 - - /// Defines the raw URL strings for each server option. - /// - /// > Note: You do not need to use these values directly. - /// - /// The available URL strings are defined as: - /// ```swift - /// public static let urlStrings = [ - /// "https://metadata.provider.plex.tv" - /// ] - /// ``` - public static let urlStrings = [ - "https://metadata.provider.plex.tv" - ] - - static func `default`() throws -> Server { - return try WatchlistServers.GetWatchlist.server1.server() - } - - func server() throws -> Server { - switch self { - case .server1: - return try type(of: self).server(at: 0, substituting: nil) - } - } - } -} - -/// API Calls that perform operations with Plex Media Server Watchlists -/// -/// -/// ## Topics -/// -/// ### API calls -/// -/// - ``getWatchlist(request:server:)`` -/// -public protocol WatchlistAPI { - /// Get User Watchlist - /// - /// - Parameter request: A ``Operations/GetWatchlistRequest`` object describing the input to the API operation - /// - Parameter server: An optional server override to use for this operation - /// - Returns: A ``Operations/GetWatchlistResponse`` object describing the result of the API operation - /// - Throws: An error of type ``PlexswiftError`` - func getWatchlist(request: Operations.GetWatchlistRequest, server: WatchlistServers.GetWatchlist?) async throws -> Response -} diff --git a/Sources/plexswift/PlexswiftError.swift b/Sources/plexswift/PlexswiftError.swift index 9ff4926..50b35e8 100644 --- a/Sources/plexswift/PlexswiftError.swift +++ b/Sources/plexswift/PlexswiftError.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/api/Client+PlexswiftAPI.swift b/Sources/plexswift/internal/api/Client+PlexswiftAPI.swift index ddb8b17..8ae7dc7 100644 --- a/Sources/plexswift/internal/api/Client+PlexswiftAPI.swift +++ b/Sources/plexswift/internal/api/Client+PlexswiftAPI.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -43,6 +43,10 @@ extension Client: PlexswiftAPI { return _LibraryAPI(client: self) } + public var watchlist: WatchlistAPI { + return _WatchlistAPI(client: self) + } + public var log: LogAPI { return _LogAPI(client: self) } @@ -66,10 +70,6 @@ extension Client: PlexswiftAPI { public var updater: UpdaterAPI { return _UpdaterAPI(client: self) } - - public var watchlist: WatchlistAPI { - return _WatchlistAPI(client: self) - } } // MARK: - Request Configuration diff --git a/Sources/plexswift/internal/client/Response.swift b/Sources/plexswift/internal/client/Response.swift index 1999f16..91fe1e4 100644 --- a/Sources/plexswift/internal/client/Response.swift +++ b/Sources/plexswift/internal/client/Response.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation #if os(Linux) diff --git a/Sources/plexswift/internal/client/Servers.swift b/Sources/plexswift/internal/client/Servers.swift index 7a93684..28b36de 100644 --- a/Sources/plexswift/internal/client/Servers.swift +++ b/Sources/plexswift/internal/client/Servers.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/client/URLRequestBuilder.swift b/Sources/plexswift/internal/client/URLRequestBuilder.swift index 615d0fc..1c06de5 100644 --- a/Sources/plexswift/internal/client/URLRequestBuilder.swift +++ b/Sources/plexswift/internal/client/URLRequestBuilder.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation @@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration { urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type") } - urlRequest.setValue("speakeasy-sdk/swift 0.5.0 2.349.6 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName) + urlRequest.setValue("speakeasy-sdk/swift 0.6.0 2.415.8 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName) addSecurityParameters(to: &urlRequest) diff --git a/Sources/plexswift/internal/client/URLRequestConfiguration.swift b/Sources/plexswift/internal/client/URLRequestConfiguration.swift index 7abf26b..4982afc 100644 --- a/Sources/plexswift/internal/client/URLRequestConfiguration.swift +++ b/Sources/plexswift/internal/client/URLRequestConfiguration.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/extensions/HTTPURLResponse+ContentType.swift b/Sources/plexswift/internal/extensions/HTTPURLResponse+ContentType.swift index 59d0c33..bb3a91b 100644 --- a/Sources/plexswift/internal/extensions/HTTPURLResponse+ContentType.swift +++ b/Sources/plexswift/internal/extensions/HTTPURLResponse+ContentType.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation #if os(Linux) diff --git a/Sources/plexswift/internal/extensions/String+ContentType.swift b/Sources/plexswift/internal/extensions/String+ContentType.swift index 23ab2b3..b0c843d 100644 --- a/Sources/plexswift/internal/extensions/String+ContentType.swift +++ b/Sources/plexswift/internal/extensions/String+ContentType.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/extensions/String+ParameterSubstitution.swift b/Sources/plexswift/internal/extensions/String+ParameterSubstitution.swift index 2154ed5..ecc17a3 100644 --- a/Sources/plexswift/internal/extensions/String+ParameterSubstitution.swift +++ b/Sources/plexswift/internal/extensions/String+ParameterSubstitution.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/Form.swift b/Sources/plexswift/internal/serialization/Form.swift index 15f037c..7fe4ffe 100644 --- a/Sources/plexswift/internal/serialization/Form.swift +++ b/Sources/plexswift/internal/serialization/Form.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/JSON.swift b/Sources/plexswift/internal/serialization/JSON.swift index 520e272..13d5b57 100644 --- a/Sources/plexswift/internal/serialization/JSON.swift +++ b/Sources/plexswift/internal/serialization/JSON.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/Maps.swift b/Sources/plexswift/internal/serialization/Maps.swift index dc89391..960000c 100644 --- a/Sources/plexswift/internal/serialization/Maps.swift +++ b/Sources/plexswift/internal/serialization/Maps.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/Parameters.swift b/Sources/plexswift/internal/serialization/Parameters.swift index 2cb6e57..40b4541 100644 --- a/Sources/plexswift/internal/serialization/Parameters.swift +++ b/Sources/plexswift/internal/serialization/Parameters.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/PropertyWrappers.swift b/Sources/plexswift/internal/serialization/PropertyWrappers.swift index bdfe692..5b779f9 100644 --- a/Sources/plexswift/internal/serialization/PropertyWrappers.swift +++ b/Sources/plexswift/internal/serialization/PropertyWrappers.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/QueryParameters.swift b/Sources/plexswift/internal/serialization/QueryParameters.swift index 995720c..c5e0e9e 100644 --- a/Sources/plexswift/internal/serialization/QueryParameters.swift +++ b/Sources/plexswift/internal/serialization/QueryParameters.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/SecurityParameters.swift b/Sources/plexswift/internal/serialization/SecurityParameters.swift index c11c802..388c624 100644 --- a/Sources/plexswift/internal/serialization/SecurityParameters.swift +++ b/Sources/plexswift/internal/serialization/SecurityParameters.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/Sources/plexswift/internal/serialization/Serializable.swift b/Sources/plexswift/internal/serialization/Serializable.swift index e8b10e0..096574d 100644 --- a/Sources/plexswift/internal/serialization/Serializable.swift +++ b/Sources/plexswift/internal/serialization/Serializable.swift @@ -1,4 +1,4 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. import Foundation diff --git a/USAGE.md b/USAGE.md index d968c81..8725528 100644 --- a/USAGE.md +++ b/USAGE.md @@ -8,10 +8,13 @@ let client = Client(security: .accessToken("")) let response = try await client.server.getServerCapabilities() switch response.data { -case .twoHundredApplicationJsonObject(let twoHundredApplicationJsonObject): +case .object(let object): // Handle response break -case .fourHundredAndOneApplicationJsonObject(let fourHundredAndOneApplicationJsonObject): +case .badRequest(let badRequest): + // Handle response + break +case .unauthorized(let unauthorized): // Handle response break case .empty: