From de330d5951948c4908d7c515f263773a644b6e73 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 16 Sep 2025 00:04:22 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.615.2 --- .gitignore | 2 ++ .speakeasy/gen.lock | 16 ++++++++-------- .speakeasy/gen.yaml | 8 +++++++- .speakeasy/workflow.lock | 14 +++++++------- README.md | 12 ++++++++++-- RELEASES.md | 12 +++++++++++- USAGE.md | 2 +- poetry.toml | 1 + pyproject.toml | 4 +++- scripts/prepare_readme.py | 5 +++++ scripts/publish.sh | 1 - src/plex_api_client/_version.py | 6 +++--- src/plex_api_client/basesdk.py | 12 +++++++++++- .../models/components/__init__.py | 15 ++++++++++++++- src/plex_api_client/models/errors/__init__.py | 18 +++++++++++++++--- .../models/errors/addplaylistcontents.py | 11 +++++++---- .../models/errors/applyupdates.py | 11 +++++++---- .../models/errors/cancelserveractivities.py | 11 +++++++---- .../models/errors/checkforupdates.py | 11 +++++++---- .../models/errors/clearplaylistcontents.py | 11 +++++++---- .../models/errors/createplaylist.py | 11 +++++++---- .../models/errors/deletelibrary.py | 11 +++++++---- .../models/errors/deleteplaylist.py | 11 +++++++---- .../models/errors/enablepapertrail.py | 11 +++++++---- .../models/errors/get_actors_library.py | 11 +++++++---- .../models/errors/get_all_libraries.py | 11 +++++++---- .../models/errors/get_banner_image.py | 11 +++++++---- .../models/errors/get_countries_library.py | 11 +++++++---- .../models/errors/get_genres_library.py | 11 +++++++---- .../models/errors/get_library_details.py | 11 +++++++---- .../models/errors/get_library_items.py | 11 +++++++---- .../models/errors/get_library_sections_all.py | 11 +++++++---- .../models/errors/get_media_meta_data.py | 11 +++++++---- .../models/errors/get_media_providers.py | 11 +++++++---- .../errors/get_recently_added_library.py | 11 +++++++---- .../errors/get_refresh_library_metadata.py | 11 +++++++---- .../models/errors/get_search_all_libraries.py | 11 +++++++---- .../models/errors/get_search_library.py | 11 +++++++---- .../models/errors/get_server_identity.py | 6 ++++-- .../models/errors/get_server_resources.py | 11 +++++++---- .../models/errors/get_thumb_image.py | 11 +++++++---- src/plex_api_client/models/errors/get_users.py | 11 +++++++---- .../models/errors/get_watch_list.py | 11 +++++++---- .../models/errors/getavailableclients.py | 11 +++++++---- .../models/errors/getbandwidthstatistics.py | 11 +++++++---- .../models/errors/getbutlertasks.py | 11 +++++++---- .../models/errors/getcompanionsdata.py | 11 +++++++---- .../models/errors/getdevices.py | 11 +++++++---- .../models/errors/getfilehash.py | 11 +++++++---- .../models/errors/getgeodata.py | 11 +++++++---- .../models/errors/getglobalhubs.py | 11 +++++++---- .../models/errors/gethomedata.py | 11 +++++++---- .../models/errors/getlibraryhubs.py | 11 +++++++---- .../models/errors/getmetadatachildren.py | 11 +++++++---- .../models/errors/getmyplexaccount.py | 11 +++++++---- src/plex_api_client/models/errors/getpin.py | 6 ++++-- .../models/errors/getplaylist.py | 11 +++++++---- .../models/errors/getplaylistcontents.py | 11 +++++++---- .../models/errors/getplaylists.py | 11 +++++++---- .../models/errors/getresizedphoto.py | 11 +++++++---- .../models/errors/getresourcesstatistics.py | 11 +++++++---- .../models/errors/getsearchresults.py | 11 +++++++---- .../models/errors/getserveractivities.py | 11 +++++++---- .../models/errors/getservercapabilities.py | 11 +++++++---- .../models/errors/getserverlist.py | 11 +++++++---- .../models/errors/getserverpreferences.py | 11 +++++++---- .../models/errors/getsessionhistory.py | 11 +++++++---- .../models/errors/getsessions.py | 11 +++++++---- .../errors/getsourceconnectioninformation.py | 11 +++++++---- .../models/errors/getstatistics.py | 11 +++++++---- .../models/errors/gettimeline.py | 11 +++++++---- .../models/errors/gettokenbypinid.py | 11 +++++++---- .../models/errors/gettokendetails.py | 11 +++++++---- .../models/errors/gettopwatchedcontent.py | 11 +++++++---- .../models/errors/gettranscodesessions.py | 11 +++++++---- .../models/errors/gettransienttoken.py | 11 +++++++---- .../models/errors/getupdatestatus.py | 11 +++++++---- .../models/errors/getuserfriends.py | 11 +++++++---- src/plex_api_client/models/errors/logline.py | 11 +++++++---- .../models/errors/logmultiline.py | 11 +++++++---- .../models/errors/markplayed.py | 11 +++++++---- .../models/errors/markunplayed.py | 11 +++++++---- .../models/errors/no_response_error.py | 6 +++++- .../models/errors/performsearch.py | 11 +++++++---- .../models/errors/performvoicesearch.py | 11 +++++++---- .../models/errors/plexapierror.py | 18 +++++++++++------- .../models/errors/post_users_sign_in_data.py | 11 +++++++---- .../models/errors/responsevalidationerror.py | 2 ++ src/plex_api_client/models/errors/sdkerror.py | 2 ++ .../models/errors/startalltasks.py | 11 +++++++---- src/plex_api_client/models/errors/starttask.py | 11 +++++++---- .../models/errors/startuniversaltranscode.py | 11 +++++++---- .../models/errors/stopalltasks.py | 11 +++++++---- src/plex_api_client/models/errors/stoptask.py | 11 +++++++---- .../models/errors/stoptranscodesession.py | 11 +++++++---- .../models/errors/updateplaylist.py | 11 +++++++---- .../models/errors/updateplayprogress.py | 11 +++++++---- .../models/errors/uploadplaylist.py | 11 +++++++---- .../models/operations/__init__.py | 15 ++++++++++++++- .../models/operations/get_watch_list.py | 4 ++-- src/plex_api_client/sdk.py | 17 +++++++++++++++-- src/plex_api_client/utils/__init__.py | 18 +++++++++++++++--- src/plex_api_client/utils/eventstreaming.py | 10 ++++++++++ 103 files changed, 721 insertions(+), 358 deletions(-) diff --git a/.gitignore b/.gitignore index cd0cde6..0e11fe2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.env +.env.local **/__pycache__/ **/.speakeasy/temp/ **/.speakeasy/logs/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8bb6087..c9f133b 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 3eeea668-4ef4-464e-a888-bdfa023bedf5 management: - docChecksum: 77bdddd188d0778dc73b7f7906e1677c + docChecksum: addaf2dfdac23cef2e234b64492b9c90 docVersion: 0.0.3 - speakeasyVersion: 1.598.3 - generationVersion: 2.674.3 - releaseVersion: 0.29.1 - configChecksum: 4c64b23eb2bdceb31042a86bc975e504 + speakeasyVersion: 1.615.2 + generationVersion: 2.698.4 + releaseVersion: 0.30.0 + configChecksum: b2bfbb4d0b11fb9a5233c243839e5dbf repoURL: https://github.com/LukeHagar/plexpy.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexpy.git @@ -15,16 +15,16 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.5 - core: 5.19.7 + core: 5.20.4 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 downloadStreams: 1.0.1 enumUnions: 0.1.0 enums: 3.1.2 envVarSecurityUsage: 0.3.2 - errors: 3.3.1 + errors: 3.3.3 flattening: 3.1.1 - globalSecurity: 3.0.3 + globalSecurity: 3.0.4 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.1.1 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e27f7cd..cb99e76 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,15 +16,19 @@ generation: auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false + hoistGlobalSecurity: true tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.29.1 + version: 0.30.0 additionalDependencies: dev: {} main: {} + allowedRedefinedBuiltins: + - id + - object author: LukeHagar authors: - Speakeasy @@ -52,9 +56,11 @@ python: methodArguments: require-security-and-request moduleName: "" outputModelSuffix: output + packageManager: poetry packageName: plex-api-client projectUrls: {} pytestFilterWarnings: [] pytestTimeout: 0 responseFormat: envelope + sseFlatResponse: false templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8c3d626..a66c42f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.598.3 +speakeasyVersion: 1.615.2 sources: my-source: sourceNamespace: my-source @@ -8,19 +8,19 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577 - sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1 + sourceRevisionDigest: sha256:5125adfea1b0daea399c6ecf755e32795de6b4131465ae6a1f32ad73b3bc7787 + sourceBlobDigest: sha256:95cea18b6e5f7d76d35db0aba5bcb59e72cf204451a2b09a99be0e3e9ec1f4c0 tags: - latest - - speakeasy-sdk-regen-1754524896 + - speakeasy-sdk-regen-1757980982 targets: plexpy: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577 - sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1 + sourceRevisionDigest: sha256:5125adfea1b0daea399c6ecf755e32795de6b4131465ae6a1f32ad73b3bc7787 + sourceBlobDigest: sha256:95cea18b6e5f7d76d35db0aba5bcb59e72cf204451a2b09a99be0e3e9ec1f4c0 codeSamplesNamespace: code-samples-python-plexpy - codeSamplesRevisionDigest: sha256:bde2fb8e391e014e9c1f080afb28f4d8e4a3193a4366b5b25495d1bcf38df33d + codeSamplesRevisionDigest: sha256:92cac100d2c46ee4ed5af2d9b877b2a5c3bcf8b6ad04a475b908adbaa6baab35 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index c06d241..6cda43f 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,15 @@ The following SDKs are generated from the OpenAPI Specification. They are automa > > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. -The SDK can be installed with either *pip* or *poetry* package managers. +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add plex-api-client +``` ### PIP @@ -155,7 +163,7 @@ with PlexAPI(
-The same SDK client can also be used to make asychronous requests by importing asyncio. +The same SDK client can also be used to make asynchronous requests by importing asyncio. ```python # Asynchronous Example import asyncio diff --git a/RELEASES.md b/RELEASES.md index 5b8df1b..a3302bb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1088,4 +1088,14 @@ Based on: ### Generated - [python v0.29.1] . ### Releases -- [PyPI v0.29.1] https://pypi.org/project/plex-api-client/0.29.1 - . \ No newline at end of file +- [PyPI v0.29.1] https://pypi.org/project/plex-api-client/0.29.1 - . + +## 2025-09-16 00:02:44 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.615.2 (2.698.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.30.0] . +### Releases +- [PyPI v0.30.0] https://pypi.org/project/plex-api-client/0.30.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index f53e9c8..a95e2bc 100644 --- a/USAGE.md +++ b/USAGE.md @@ -18,7 +18,7 @@ with PlexAPI(
-The same SDK client can also be used to make asychronous requests by importing asyncio. +The same SDK client can also be used to make asynchronous requests by importing asyncio. ```python # Asynchronous Example import asyncio diff --git a/poetry.toml b/poetry.toml index ab1033b..cd3492a 100644 --- a/poetry.toml +++ b/poetry.toml @@ -1,2 +1,3 @@ + [virtualenvs] in-project = true diff --git a/pyproject.toml b/pyproject.toml index 4e991c3..437cb49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ + [project] name = "plex-api-client" -version = "0.29.1" +version = "0.30.0" description = "Python Client SDK Generated by Speakeasy" authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" @@ -34,6 +35,7 @@ build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] asyncio_default_fixture_loop_scope = "function" +asyncio_mode = "auto" pythonpath = ["src"] [tool.mypy] diff --git a/scripts/prepare_readme.py b/scripts/prepare_readme.py index 95d3a12..500fc56 100644 --- a/scripts/prepare_readme.py +++ b/scripts/prepare_readme.py @@ -10,12 +10,17 @@ try: GITHUB_URL = ( GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL ) + REPO_SUBDIR = "." + # Ensure the subdirectory has a trailing slash + if not REPO_SUBDIR.endswith("/"): + REPO_SUBDIR += "/" # links on PyPI should have absolute URLs readme_contents = re.sub( r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))", lambda m: m.group(1) + GITHUB_URL + "/blob/master/" + + REPO_SUBDIR + m.group(2) + m.group(3), readme_contents, diff --git a/scripts/publish.sh b/scripts/publish.sh index f2f2cf2..2a3ead7 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN} poetry run python scripts/prepare_readme.py diff --git a/src/plex_api_client/_version.py b/src/plex_api_client/_version.py index 6cc6fb9..e9684f5 100644 --- a/src/plex_api_client/_version.py +++ b/src/plex_api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "plex-api-client" -__version__: str = "0.29.1" +__version__: str = "0.30.0" __openapi_doc_version__: str = "0.0.3" -__gen_version__: str = "2.674.3" -__user_agent__: str = "speakeasy-sdk/python 0.29.1 2.674.3 0.0.3 plex-api-client" +__gen_version__: str = "2.698.4" +__user_agent__: str = "speakeasy-sdk/python 0.30.0 2.698.4 0.0.3 plex-api-client" try: if __package__ is not None: diff --git a/src/plex_api_client/basesdk.py b/src/plex_api_client/basesdk.py index f6686d4..81d3ae0 100644 --- a/src/plex_api_client/basesdk.py +++ b/src/plex_api_client/basesdk.py @@ -16,9 +16,19 @@ from urllib.parse import parse_qs, urlparse class BaseSDK: sdk_configuration: SDKConfiguration + parent_ref: Optional[object] = None + """ + Reference to the root SDK instance, if any. This will prevent it from + being garbage collected while there are active streams. + """ - def __init__(self, sdk_config: SDKConfiguration) -> None: + def __init__( + self, + sdk_config: SDKConfiguration, + parent_ref: Optional[object] = None, + ) -> None: self.sdk_configuration = sdk_config + self.parent_ref = parent_ref def _get_url(self, base_url, url_variables): sdk_url, sdk_variables = self.sdk_configuration.get_server_details() diff --git a/src/plex_api_client/models/components/__init__.py b/src/plex_api_client/models/components/__init__.py index 66c8506..5470c9e 100644 --- a/src/plex_api_client/models/components/__init__.py +++ b/src/plex_api_client/models/components/__init__.py @@ -3,6 +3,7 @@ from typing import TYPE_CHECKING from importlib import import_module import builtins +import sys if TYPE_CHECKING: from .security import Security, SecurityTypedDict @@ -15,6 +16,18 @@ _dynamic_imports: dict[str, str] = { } +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + def __getattr__(attr_name: str) -> object: module_name = _dynamic_imports.get(attr_name) if module_name is None: @@ -23,7 +36,7 @@ def __getattr__(attr_name: str) -> object: ) try: - module = import_module(module_name, __package__) + module = dynamic_import(module_name) result = getattr(module, attr_name) return result except ImportError as e: diff --git a/src/plex_api_client/models/errors/__init__.py b/src/plex_api_client/models/errors/__init__.py index 5e2d4ca..c9d3afa 100644 --- a/src/plex_api_client/models/errors/__init__.py +++ b/src/plex_api_client/models/errors/__init__.py @@ -1,8 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from .plexapierror import PlexAPIError from typing import TYPE_CHECKING from importlib import import_module import builtins +import sys if TYPE_CHECKING: from .addplaylistcontents import ( @@ -686,7 +688,6 @@ if TYPE_CHECKING: PerformVoiceSearchUnauthorized, PerformVoiceSearchUnauthorizedData, ) - from .plexapierror import PlexAPIError from .post_users_sign_in_data import ( PostUsersSignInDataAuthenticationErrors, PostUsersSignInDataAuthenticationErrorsTypedDict, @@ -1963,7 +1964,6 @@ _dynamic_imports: dict[str, str] = { "PerformVoiceSearchSearchErrorsTypedDict": ".performvoicesearch", "PerformVoiceSearchUnauthorized": ".performvoicesearch", "PerformVoiceSearchUnauthorizedData": ".performvoicesearch", - "PlexAPIError": ".plexapierror", "PostUsersSignInDataAuthenticationErrors": ".post_users_sign_in_data", "PostUsersSignInDataAuthenticationErrorsTypedDict": ".post_users_sign_in_data", "PostUsersSignInDataBadRequest": ".post_users_sign_in_data", @@ -2049,6 +2049,18 @@ _dynamic_imports: dict[str, str] = { } +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + def __getattr__(attr_name: str) -> object: module_name = _dynamic_imports.get(attr_name) if module_name is None: @@ -2057,7 +2069,7 @@ def __getattr__(attr_name: str) -> object: ) try: - module = import_module(module_name, __package__) + module = dynamic_import(module_name) result = getattr(module, attr_name) return result except ImportError as e: diff --git a/src/plex_api_client/models/errors/addplaylistcontents.py b/src/plex_api_client/models/errors/addplaylistcontents.py index 4aeb9be..66120ee 100644 --- a/src/plex_api_client/models/errors/addplaylistcontents.py +++ b/src/plex_api_client/models/errors/addplaylistcontents.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class AddPlaylistContentsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class AddPlaylistContentsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: AddPlaylistContentsUnauthorizedData + data: AddPlaylistContentsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class AddPlaylistContentsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class AddPlaylistContentsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class AddPlaylistContentsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class AddPlaylistContentsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: AddPlaylistContentsBadRequestData + data: AddPlaylistContentsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class AddPlaylistContentsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/applyupdates.py b/src/plex_api_client/models/errors/applyupdates.py index 434c5b0..a92a06e 100644 --- a/src/plex_api_client/models/errors/applyupdates.py +++ b/src/plex_api_client/models/errors/applyupdates.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class ApplyUpdatesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class ApplyUpdatesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: ApplyUpdatesUnauthorizedData + data: ApplyUpdatesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class ApplyUpdatesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class ApplyUpdatesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class ApplyUpdatesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class ApplyUpdatesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: ApplyUpdatesBadRequestData + data: ApplyUpdatesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class ApplyUpdatesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/cancelserveractivities.py b/src/plex_api_client/models/errors/cancelserveractivities.py index f16f85d..b9d9547 100644 --- a/src/plex_api_client/models/errors/cancelserveractivities.py +++ b/src/plex_api_client/models/errors/cancelserveractivities.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class CancelServerActivitiesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class CancelServerActivitiesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: CancelServerActivitiesUnauthorizedData + data: CancelServerActivitiesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class CancelServerActivitiesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class CancelServerActivitiesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class CancelServerActivitiesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class CancelServerActivitiesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: CancelServerActivitiesBadRequestData + data: CancelServerActivitiesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class CancelServerActivitiesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/checkforupdates.py b/src/plex_api_client/models/errors/checkforupdates.py index db9c571..2930600 100644 --- a/src/plex_api_client/models/errors/checkforupdates.py +++ b/src/plex_api_client/models/errors/checkforupdates.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class CheckForUpdatesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class CheckForUpdatesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: CheckForUpdatesUnauthorizedData + data: CheckForUpdatesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class CheckForUpdatesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class CheckForUpdatesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class CheckForUpdatesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class CheckForUpdatesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: CheckForUpdatesBadRequestData + data: CheckForUpdatesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class CheckForUpdatesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/clearplaylistcontents.py b/src/plex_api_client/models/errors/clearplaylistcontents.py index ec7cbac..152891e 100644 --- a/src/plex_api_client/models/errors/clearplaylistcontents.py +++ b/src/plex_api_client/models/errors/clearplaylistcontents.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class ClearPlaylistContentsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class ClearPlaylistContentsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: ClearPlaylistContentsUnauthorizedData + data: ClearPlaylistContentsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class ClearPlaylistContentsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class ClearPlaylistContentsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class ClearPlaylistContentsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class ClearPlaylistContentsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: ClearPlaylistContentsBadRequestData + data: ClearPlaylistContentsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class ClearPlaylistContentsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/createplaylist.py b/src/plex_api_client/models/errors/createplaylist.py index 8dfbd9a..53f6996 100644 --- a/src/plex_api_client/models/errors/createplaylist.py +++ b/src/plex_api_client/models/errors/createplaylist.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class CreatePlaylistUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class CreatePlaylistUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: CreatePlaylistUnauthorizedData + data: CreatePlaylistUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class CreatePlaylistUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class CreatePlaylistErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class CreatePlaylistBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class CreatePlaylistBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: CreatePlaylistBadRequestData + data: CreatePlaylistBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class CreatePlaylistBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/deletelibrary.py b/src/plex_api_client/models/errors/deletelibrary.py index 14fc2bc..76e6b33 100644 --- a/src/plex_api_client/models/errors/deletelibrary.py +++ b/src/plex_api_client/models/errors/deletelibrary.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class DeleteLibraryUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class DeleteLibraryUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: DeleteLibraryUnauthorizedData + data: DeleteLibraryUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class DeleteLibraryUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class DeleteLibraryErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class DeleteLibraryBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class DeleteLibraryBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: DeleteLibraryBadRequestData + data: DeleteLibraryBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class DeleteLibraryBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/deleteplaylist.py b/src/plex_api_client/models/errors/deleteplaylist.py index 8ad089c..0cbdea4 100644 --- a/src/plex_api_client/models/errors/deleteplaylist.py +++ b/src/plex_api_client/models/errors/deleteplaylist.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class DeletePlaylistUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class DeletePlaylistUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: DeletePlaylistUnauthorizedData + data: DeletePlaylistUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class DeletePlaylistUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class DeletePlaylistErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class DeletePlaylistBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class DeletePlaylistBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: DeletePlaylistBadRequestData + data: DeletePlaylistBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class DeletePlaylistBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/enablepapertrail.py b/src/plex_api_client/models/errors/enablepapertrail.py index cc21ef0..1252ca9 100644 --- a/src/plex_api_client/models/errors/enablepapertrail.py +++ b/src/plex_api_client/models/errors/enablepapertrail.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class EnablePaperTrailUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class EnablePaperTrailUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: EnablePaperTrailUnauthorizedData + data: EnablePaperTrailUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class EnablePaperTrailUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class EnablePaperTrailErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class EnablePaperTrailBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class EnablePaperTrailBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: EnablePaperTrailBadRequestData + data: EnablePaperTrailBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class EnablePaperTrailBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_actors_library.py b/src/plex_api_client/models/errors/get_actors_library.py index 48a5c5d..5599591 100644 --- a/src/plex_api_client/models/errors/get_actors_library.py +++ b/src/plex_api_client/models/errors/get_actors_library.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetActorsLibraryUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetActorsLibraryUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetActorsLibraryUnauthorizedData + data: GetActorsLibraryUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetActorsLibraryUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetActorsLibraryErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetActorsLibraryBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetActorsLibraryBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetActorsLibraryBadRequestData + data: GetActorsLibraryBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetActorsLibraryBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_all_libraries.py b/src/plex_api_client/models/errors/get_all_libraries.py index 507f8bc..744bc1d 100644 --- a/src/plex_api_client/models/errors/get_all_libraries.py +++ b/src/plex_api_client/models/errors/get_all_libraries.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetAllLibrariesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetAllLibrariesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetAllLibrariesUnauthorizedData + data: GetAllLibrariesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetAllLibrariesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetAllLibrariesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetAllLibrariesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetAllLibrariesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetAllLibrariesBadRequestData + data: GetAllLibrariesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetAllLibrariesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_banner_image.py b/src/plex_api_client/models/errors/get_banner_image.py index 31dfcc6..2eb7613 100644 --- a/src/plex_api_client/models/errors/get_banner_image.py +++ b/src/plex_api_client/models/errors/get_banner_image.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetBannerImageUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetBannerImageUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetBannerImageUnauthorizedData + data: GetBannerImageUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetBannerImageUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetBannerImageErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetBannerImageBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetBannerImageBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetBannerImageBadRequestData + data: GetBannerImageBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetBannerImageBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_countries_library.py b/src/plex_api_client/models/errors/get_countries_library.py index ea9a859..7e07efe 100644 --- a/src/plex_api_client/models/errors/get_countries_library.py +++ b/src/plex_api_client/models/errors/get_countries_library.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetCountriesLibraryUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetCountriesLibraryUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetCountriesLibraryUnauthorizedData + data: GetCountriesLibraryUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetCountriesLibraryUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetCountriesLibraryErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetCountriesLibraryBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetCountriesLibraryBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetCountriesLibraryBadRequestData + data: GetCountriesLibraryBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetCountriesLibraryBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_genres_library.py b/src/plex_api_client/models/errors/get_genres_library.py index 809b36f..52f6777 100644 --- a/src/plex_api_client/models/errors/get_genres_library.py +++ b/src/plex_api_client/models/errors/get_genres_library.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetGenresLibraryUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetGenresLibraryUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetGenresLibraryUnauthorizedData + data: GetGenresLibraryUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetGenresLibraryUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetGenresLibraryErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetGenresLibraryBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetGenresLibraryBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetGenresLibraryBadRequestData + data: GetGenresLibraryBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetGenresLibraryBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_library_details.py b/src/plex_api_client/models/errors/get_library_details.py index 967fee0..6307cf1 100644 --- a/src/plex_api_client/models/errors/get_library_details.py +++ b/src/plex_api_client/models/errors/get_library_details.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetLibraryDetailsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibraryDetailsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetLibraryDetailsUnauthorizedData + data: GetLibraryDetailsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetLibraryDetailsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetLibraryDetailsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetLibraryDetailsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibraryDetailsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetLibraryDetailsBadRequestData + data: GetLibraryDetailsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetLibraryDetailsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_library_items.py b/src/plex_api_client/models/errors/get_library_items.py index deab881..01a20a6 100644 --- a/src/plex_api_client/models/errors/get_library_items.py +++ b/src/plex_api_client/models/errors/get_library_items.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetLibraryItemsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibraryItemsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetLibraryItemsUnauthorizedData + data: GetLibraryItemsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetLibraryItemsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetLibraryItemsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetLibraryItemsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibraryItemsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetLibraryItemsBadRequestData + data: GetLibraryItemsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetLibraryItemsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_library_sections_all.py b/src/plex_api_client/models/errors/get_library_sections_all.py index 0b65da9..7da9bee 100644 --- a/src/plex_api_client/models/errors/get_library_sections_all.py +++ b/src/plex_api_client/models/errors/get_library_sections_all.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetLibrarySectionsAllUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibrarySectionsAllUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetLibrarySectionsAllUnauthorizedData + data: GetLibrarySectionsAllUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetLibrarySectionsAllUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetLibrarySectionsAllErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetLibrarySectionsAllBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibrarySectionsAllBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetLibrarySectionsAllBadRequestData + data: GetLibrarySectionsAllBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetLibrarySectionsAllBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_media_meta_data.py b/src/plex_api_client/models/errors/get_media_meta_data.py index 0f04fa0..821e10f 100644 --- a/src/plex_api_client/models/errors/get_media_meta_data.py +++ b/src/plex_api_client/models/errors/get_media_meta_data.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetMediaMetaDataUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMediaMetaDataUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetMediaMetaDataUnauthorizedData + data: GetMediaMetaDataUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetMediaMetaDataUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetMediaMetaDataErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetMediaMetaDataBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMediaMetaDataBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetMediaMetaDataBadRequestData + data: GetMediaMetaDataBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetMediaMetaDataBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_media_providers.py b/src/plex_api_client/models/errors/get_media_providers.py index 8027d83..2d062da 100644 --- a/src/plex_api_client/models/errors/get_media_providers.py +++ b/src/plex_api_client/models/errors/get_media_providers.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetMediaProvidersUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMediaProvidersUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetMediaProvidersUnauthorizedData + data: GetMediaProvidersUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetMediaProvidersUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetMediaProvidersErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetMediaProvidersBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMediaProvidersBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetMediaProvidersBadRequestData + data: GetMediaProvidersBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetMediaProvidersBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_recently_added_library.py b/src/plex_api_client/models/errors/get_recently_added_library.py index 743596a..fffbdce 100644 --- a/src/plex_api_client/models/errors/get_recently_added_library.py +++ b/src/plex_api_client/models/errors/get_recently_added_library.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetRecentlyAddedLibraryUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetRecentlyAddedLibraryUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetRecentlyAddedLibraryUnauthorizedData + data: GetRecentlyAddedLibraryUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetRecentlyAddedLibraryUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetRecentlyAddedLibraryErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetRecentlyAddedLibraryBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetRecentlyAddedLibraryBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetRecentlyAddedLibraryBadRequestData + data: GetRecentlyAddedLibraryBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetRecentlyAddedLibraryBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_refresh_library_metadata.py b/src/plex_api_client/models/errors/get_refresh_library_metadata.py index 0037c5c..edd2a2f 100644 --- a/src/plex_api_client/models/errors/get_refresh_library_metadata.py +++ b/src/plex_api_client/models/errors/get_refresh_library_metadata.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetRefreshLibraryMetadataUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetRefreshLibraryMetadataUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetRefreshLibraryMetadataUnauthorizedData + data: GetRefreshLibraryMetadataUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetRefreshLibraryMetadataUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetRefreshLibraryMetadataErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetRefreshLibraryMetadataBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetRefreshLibraryMetadataBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetRefreshLibraryMetadataBadRequestData + data: GetRefreshLibraryMetadataBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetRefreshLibraryMetadataBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_search_all_libraries.py b/src/plex_api_client/models/errors/get_search_all_libraries.py index 186d7c7..08774be 100644 --- a/src/plex_api_client/models/errors/get_search_all_libraries.py +++ b/src/plex_api_client/models/errors/get_search_all_libraries.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetSearchAllLibrariesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSearchAllLibrariesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetSearchAllLibrariesUnauthorizedData + data: GetSearchAllLibrariesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetSearchAllLibrariesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetSearchAllLibrariesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetSearchAllLibrariesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSearchAllLibrariesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetSearchAllLibrariesBadRequestData + data: GetSearchAllLibrariesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetSearchAllLibrariesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_search_library.py b/src/plex_api_client/models/errors/get_search_library.py index f6a2839..bd66a58 100644 --- a/src/plex_api_client/models/errors/get_search_library.py +++ b/src/plex_api_client/models/errors/get_search_library.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetSearchLibraryUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSearchLibraryUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetSearchLibraryUnauthorizedData + data: GetSearchLibraryUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetSearchLibraryUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetSearchLibraryErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetSearchLibraryBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSearchLibraryBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetSearchLibraryBadRequestData + data: GetSearchLibraryBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetSearchLibraryBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_server_identity.py b/src/plex_api_client/models/errors/get_server_identity.py index 2592713..a93ecab 100644 --- a/src/plex_api_client/models/errors/get_server_identity.py +++ b/src/plex_api_client/models/errors/get_server_identity.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -20,10 +21,11 @@ class GetServerIdentityRequestTimeoutData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerIdentityRequestTimeout(PlexAPIError): r"""Request Timeout""" - data: GetServerIdentityRequestTimeoutData + data: GetServerIdentityRequestTimeoutData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ class GetServerIdentityRequestTimeout(PlexAPIError): fallback = body or raw_response.text message = str(data.message) or fallback super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_server_resources.py b/src/plex_api_client/models/errors/get_server_resources.py index 98beac5..87db7d3 100644 --- a/src/plex_api_client/models/errors/get_server_resources.py +++ b/src/plex_api_client/models/errors/get_server_resources.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetServerResourcesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerResourcesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetServerResourcesUnauthorizedData + data: GetServerResourcesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetServerResourcesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetServerResourcesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetServerResourcesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerResourcesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetServerResourcesBadRequestData + data: GetServerResourcesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetServerResourcesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_thumb_image.py b/src/plex_api_client/models/errors/get_thumb_image.py index 568e67f..a4bcd10 100644 --- a/src/plex_api_client/models/errors/get_thumb_image.py +++ b/src/plex_api_client/models/errors/get_thumb_image.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetThumbImageUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetThumbImageUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetThumbImageUnauthorizedData + data: GetThumbImageUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetThumbImageUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetThumbImageErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetThumbImageBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetThumbImageBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetThumbImageBadRequestData + data: GetThumbImageBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetThumbImageBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_users.py b/src/plex_api_client/models/errors/get_users.py index ce12235..5d4d127 100644 --- a/src/plex_api_client/models/errors/get_users.py +++ b/src/plex_api_client/models/errors/get_users.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetUsersUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetUsersUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetUsersUnauthorizedData + data: GetUsersUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetUsersUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetUsersErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetUsersBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetUsersBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetUsersBadRequestData + data: GetUsersBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetUsersBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/get_watch_list.py b/src/plex_api_client/models/errors/get_watch_list.py index 97c1640..48c8fa3 100644 --- a/src/plex_api_client/models/errors/get_watch_list.py +++ b/src/plex_api_client/models/errors/get_watch_list.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetWatchListUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetWatchListUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetWatchListUnauthorizedData + data: GetWatchListUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetWatchListUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetWatchListErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetWatchListBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetWatchListBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetWatchListBadRequestData + data: GetWatchListBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetWatchListBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getavailableclients.py b/src/plex_api_client/models/errors/getavailableclients.py index 226ec07..a6a67d5 100644 --- a/src/plex_api_client/models/errors/getavailableclients.py +++ b/src/plex_api_client/models/errors/getavailableclients.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetAvailableClientsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetAvailableClientsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetAvailableClientsUnauthorizedData + data: GetAvailableClientsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetAvailableClientsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetAvailableClientsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetAvailableClientsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetAvailableClientsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetAvailableClientsBadRequestData + data: GetAvailableClientsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetAvailableClientsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getbandwidthstatistics.py b/src/plex_api_client/models/errors/getbandwidthstatistics.py index 6ef0635..37f3c7f 100644 --- a/src/plex_api_client/models/errors/getbandwidthstatistics.py +++ b/src/plex_api_client/models/errors/getbandwidthstatistics.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetBandwidthStatisticsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetBandwidthStatisticsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetBandwidthStatisticsUnauthorizedData + data: GetBandwidthStatisticsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetBandwidthStatisticsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetBandwidthStatisticsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetBandwidthStatisticsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetBandwidthStatisticsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetBandwidthStatisticsBadRequestData + data: GetBandwidthStatisticsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetBandwidthStatisticsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getbutlertasks.py b/src/plex_api_client/models/errors/getbutlertasks.py index 6adc295..94d9e9f 100644 --- a/src/plex_api_client/models/errors/getbutlertasks.py +++ b/src/plex_api_client/models/errors/getbutlertasks.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetButlerTasksUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetButlerTasksUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetButlerTasksUnauthorizedData + data: GetButlerTasksUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetButlerTasksUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetButlerTasksErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetButlerTasksBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetButlerTasksBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetButlerTasksBadRequestData + data: GetButlerTasksBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetButlerTasksBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getcompanionsdata.py b/src/plex_api_client/models/errors/getcompanionsdata.py index 11b7f92..62c2b2b 100644 --- a/src/plex_api_client/models/errors/getcompanionsdata.py +++ b/src/plex_api_client/models/errors/getcompanionsdata.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetCompanionsDataUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetCompanionsDataUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetCompanionsDataUnauthorizedData + data: GetCompanionsDataUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetCompanionsDataUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetCompanionsDataErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetCompanionsDataBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetCompanionsDataBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetCompanionsDataBadRequestData + data: GetCompanionsDataBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetCompanionsDataBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getdevices.py b/src/plex_api_client/models/errors/getdevices.py index 0ec16eb..907062e 100644 --- a/src/plex_api_client/models/errors/getdevices.py +++ b/src/plex_api_client/models/errors/getdevices.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetDevicesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetDevicesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetDevicesUnauthorizedData + data: GetDevicesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetDevicesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetDevicesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetDevicesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetDevicesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetDevicesBadRequestData + data: GetDevicesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetDevicesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getfilehash.py b/src/plex_api_client/models/errors/getfilehash.py index d8e56a0..40ecee6 100644 --- a/src/plex_api_client/models/errors/getfilehash.py +++ b/src/plex_api_client/models/errors/getfilehash.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetFileHashUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetFileHashUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetFileHashUnauthorizedData + data: GetFileHashUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetFileHashUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetFileHashErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetFileHashBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetFileHashBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetFileHashBadRequestData + data: GetFileHashBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetFileHashBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getgeodata.py b/src/plex_api_client/models/errors/getgeodata.py index 4ea33ae..96fa83c 100644 --- a/src/plex_api_client/models/errors/getgeodata.py +++ b/src/plex_api_client/models/errors/getgeodata.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetGeoDataUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetGeoDataUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetGeoDataUnauthorizedData + data: GetGeoDataUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetGeoDataUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetGeoDataErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetGeoDataBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetGeoDataBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetGeoDataBadRequestData + data: GetGeoDataBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetGeoDataBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getglobalhubs.py b/src/plex_api_client/models/errors/getglobalhubs.py index c3095d4..e0fe688 100644 --- a/src/plex_api_client/models/errors/getglobalhubs.py +++ b/src/plex_api_client/models/errors/getglobalhubs.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetGlobalHubsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetGlobalHubsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetGlobalHubsUnauthorizedData + data: GetGlobalHubsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetGlobalHubsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetGlobalHubsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetGlobalHubsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetGlobalHubsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetGlobalHubsBadRequestData + data: GetGlobalHubsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetGlobalHubsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/gethomedata.py b/src/plex_api_client/models/errors/gethomedata.py index 446fd2b..8ad40bf 100644 --- a/src/plex_api_client/models/errors/gethomedata.py +++ b/src/plex_api_client/models/errors/gethomedata.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetHomeDataUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetHomeDataUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetHomeDataUnauthorizedData + data: GetHomeDataUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetHomeDataUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetHomeDataErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetHomeDataBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetHomeDataBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetHomeDataBadRequestData + data: GetHomeDataBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetHomeDataBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getlibraryhubs.py b/src/plex_api_client/models/errors/getlibraryhubs.py index 28cbc73..af9d407 100644 --- a/src/plex_api_client/models/errors/getlibraryhubs.py +++ b/src/plex_api_client/models/errors/getlibraryhubs.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetLibraryHubsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibraryHubsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetLibraryHubsUnauthorizedData + data: GetLibraryHubsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetLibraryHubsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetLibraryHubsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetLibraryHubsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetLibraryHubsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetLibraryHubsBadRequestData + data: GetLibraryHubsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetLibraryHubsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getmetadatachildren.py b/src/plex_api_client/models/errors/getmetadatachildren.py index 06ffd5d..5bccfa5 100644 --- a/src/plex_api_client/models/errors/getmetadatachildren.py +++ b/src/plex_api_client/models/errors/getmetadatachildren.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetMetadataChildrenUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMetadataChildrenUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetMetadataChildrenUnauthorizedData + data: GetMetadataChildrenUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetMetadataChildrenUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetMetadataChildrenErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetMetadataChildrenBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMetadataChildrenBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetMetadataChildrenBadRequestData + data: GetMetadataChildrenBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetMetadataChildrenBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getmyplexaccount.py b/src/plex_api_client/models/errors/getmyplexaccount.py index 25581bc..758528b 100644 --- a/src/plex_api_client/models/errors/getmyplexaccount.py +++ b/src/plex_api_client/models/errors/getmyplexaccount.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetMyPlexAccountUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMyPlexAccountUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetMyPlexAccountUnauthorizedData + data: GetMyPlexAccountUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetMyPlexAccountUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetMyPlexAccountErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetMyPlexAccountBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetMyPlexAccountBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetMyPlexAccountBadRequestData + data: GetMyPlexAccountBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetMyPlexAccountBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getpin.py b/src/plex_api_client/models/errors/getpin.py index 086a02e..9af7070 100644 --- a/src/plex_api_client/models/errors/getpin.py +++ b/src/plex_api_client/models/errors/getpin.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetPinBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetPinBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetPinBadRequestData + data: GetPinBadRequestData = field(hash=False) def __init__( self, @@ -45,4 +47,4 @@ class GetPinBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getplaylist.py b/src/plex_api_client/models/errors/getplaylist.py index b0f7eed..2111c53 100644 --- a/src/plex_api_client/models/errors/getplaylist.py +++ b/src/plex_api_client/models/errors/getplaylist.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetPlaylistUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetPlaylistUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetPlaylistUnauthorizedData + data: GetPlaylistUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetPlaylistUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetPlaylistErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetPlaylistBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetPlaylistBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetPlaylistBadRequestData + data: GetPlaylistBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetPlaylistBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getplaylistcontents.py b/src/plex_api_client/models/errors/getplaylistcontents.py index 56d82d2..2afb33e 100644 --- a/src/plex_api_client/models/errors/getplaylistcontents.py +++ b/src/plex_api_client/models/errors/getplaylistcontents.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetPlaylistContentsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetPlaylistContentsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetPlaylistContentsUnauthorizedData + data: GetPlaylistContentsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetPlaylistContentsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetPlaylistContentsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetPlaylistContentsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetPlaylistContentsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetPlaylistContentsBadRequestData + data: GetPlaylistContentsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetPlaylistContentsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getplaylists.py b/src/plex_api_client/models/errors/getplaylists.py index 97cf2ca..3c3ca92 100644 --- a/src/plex_api_client/models/errors/getplaylists.py +++ b/src/plex_api_client/models/errors/getplaylists.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetPlaylistsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetPlaylistsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetPlaylistsUnauthorizedData + data: GetPlaylistsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetPlaylistsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetPlaylistsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetPlaylistsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetPlaylistsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetPlaylistsBadRequestData + data: GetPlaylistsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetPlaylistsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getresizedphoto.py b/src/plex_api_client/models/errors/getresizedphoto.py index 986e9a5..e402e68 100644 --- a/src/plex_api_client/models/errors/getresizedphoto.py +++ b/src/plex_api_client/models/errors/getresizedphoto.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetResizedPhotoUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetResizedPhotoUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetResizedPhotoUnauthorizedData + data: GetResizedPhotoUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetResizedPhotoUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetResizedPhotoErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetResizedPhotoBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetResizedPhotoBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetResizedPhotoBadRequestData + data: GetResizedPhotoBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetResizedPhotoBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getresourcesstatistics.py b/src/plex_api_client/models/errors/getresourcesstatistics.py index 2557ca9..7d32e82 100644 --- a/src/plex_api_client/models/errors/getresourcesstatistics.py +++ b/src/plex_api_client/models/errors/getresourcesstatistics.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetResourcesStatisticsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetResourcesStatisticsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetResourcesStatisticsUnauthorizedData + data: GetResourcesStatisticsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetResourcesStatisticsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetResourcesStatisticsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetResourcesStatisticsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetResourcesStatisticsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetResourcesStatisticsBadRequestData + data: GetResourcesStatisticsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetResourcesStatisticsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getsearchresults.py b/src/plex_api_client/models/errors/getsearchresults.py index bc04493..b13b7b2 100644 --- a/src/plex_api_client/models/errors/getsearchresults.py +++ b/src/plex_api_client/models/errors/getsearchresults.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetSearchResultsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSearchResultsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetSearchResultsUnauthorizedData + data: GetSearchResultsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetSearchResultsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetSearchResultsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetSearchResultsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSearchResultsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetSearchResultsBadRequestData + data: GetSearchResultsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetSearchResultsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getserveractivities.py b/src/plex_api_client/models/errors/getserveractivities.py index d609f94..50f2255 100644 --- a/src/plex_api_client/models/errors/getserveractivities.py +++ b/src/plex_api_client/models/errors/getserveractivities.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetServerActivitiesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerActivitiesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetServerActivitiesUnauthorizedData + data: GetServerActivitiesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetServerActivitiesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetServerActivitiesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetServerActivitiesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerActivitiesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetServerActivitiesBadRequestData + data: GetServerActivitiesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetServerActivitiesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getservercapabilities.py b/src/plex_api_client/models/errors/getservercapabilities.py index 81abe5a..71cbb7d 100644 --- a/src/plex_api_client/models/errors/getservercapabilities.py +++ b/src/plex_api_client/models/errors/getservercapabilities.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetServerCapabilitiesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerCapabilitiesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetServerCapabilitiesUnauthorizedData + data: GetServerCapabilitiesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetServerCapabilitiesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class ErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetServerCapabilitiesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerCapabilitiesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetServerCapabilitiesBadRequestData + data: GetServerCapabilitiesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetServerCapabilitiesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getserverlist.py b/src/plex_api_client/models/errors/getserverlist.py index cf7a992..a037ef2 100644 --- a/src/plex_api_client/models/errors/getserverlist.py +++ b/src/plex_api_client/models/errors/getserverlist.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetServerListUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerListUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetServerListUnauthorizedData + data: GetServerListUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetServerListUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetServerListErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetServerListBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerListBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetServerListBadRequestData + data: GetServerListBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetServerListBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getserverpreferences.py b/src/plex_api_client/models/errors/getserverpreferences.py index 56da211..56d9a69 100644 --- a/src/plex_api_client/models/errors/getserverpreferences.py +++ b/src/plex_api_client/models/errors/getserverpreferences.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetServerPreferencesUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerPreferencesUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetServerPreferencesUnauthorizedData + data: GetServerPreferencesUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetServerPreferencesUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetServerPreferencesErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetServerPreferencesBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetServerPreferencesBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetServerPreferencesBadRequestData + data: GetServerPreferencesBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetServerPreferencesBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getsessionhistory.py b/src/plex_api_client/models/errors/getsessionhistory.py index 33a388c..5eb5163 100644 --- a/src/plex_api_client/models/errors/getsessionhistory.py +++ b/src/plex_api_client/models/errors/getsessionhistory.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetSessionHistoryUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSessionHistoryUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetSessionHistoryUnauthorizedData + data: GetSessionHistoryUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetSessionHistoryUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetSessionHistoryErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetSessionHistoryBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSessionHistoryBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetSessionHistoryBadRequestData + data: GetSessionHistoryBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetSessionHistoryBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getsessions.py b/src/plex_api_client/models/errors/getsessions.py index cb77038..7c5789d 100644 --- a/src/plex_api_client/models/errors/getsessions.py +++ b/src/plex_api_client/models/errors/getsessions.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetSessionsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSessionsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetSessionsUnauthorizedData + data: GetSessionsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetSessionsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetSessionsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetSessionsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSessionsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetSessionsBadRequestData + data: GetSessionsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetSessionsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getsourceconnectioninformation.py b/src/plex_api_client/models/errors/getsourceconnectioninformation.py index 11cde55..6d218bb 100644 --- a/src/plex_api_client/models/errors/getsourceconnectioninformation.py +++ b/src/plex_api_client/models/errors/getsourceconnectioninformation.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetSourceConnectionInformationUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSourceConnectionInformationUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetSourceConnectionInformationUnauthorizedData + data: GetSourceConnectionInformationUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetSourceConnectionInformationUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetSourceConnectionInformationErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetSourceConnectionInformationBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetSourceConnectionInformationBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetSourceConnectionInformationBadRequestData + data: GetSourceConnectionInformationBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetSourceConnectionInformationBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getstatistics.py b/src/plex_api_client/models/errors/getstatistics.py index 2700407..f07f81e 100644 --- a/src/plex_api_client/models/errors/getstatistics.py +++ b/src/plex_api_client/models/errors/getstatistics.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetStatisticsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetStatisticsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetStatisticsUnauthorizedData + data: GetStatisticsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetStatisticsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetStatisticsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetStatisticsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetStatisticsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetStatisticsBadRequestData + data: GetStatisticsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetStatisticsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/gettimeline.py b/src/plex_api_client/models/errors/gettimeline.py index fe3c1cf..09bce16 100644 --- a/src/plex_api_client/models/errors/gettimeline.py +++ b/src/plex_api_client/models/errors/gettimeline.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetTimelineUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTimelineUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetTimelineUnauthorizedData + data: GetTimelineUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetTimelineUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetTimelineErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetTimelineBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTimelineBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetTimelineBadRequestData + data: GetTimelineBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetTimelineBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/gettokenbypinid.py b/src/plex_api_client/models/errors/gettokenbypinid.py index a52071a..90cec9f 100644 --- a/src/plex_api_client/models/errors/gettokenbypinid.py +++ b/src/plex_api_client/models/errors/gettokenbypinid.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -29,10 +30,11 @@ class GetTokenByPinIDResponseBodyData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTokenByPinIDResponseBody(PlexAPIError): r"""Not Found or Expired""" - data: GetTokenByPinIDResponseBodyData + data: GetTokenByPinIDResponseBodyData = field(hash=False) def __init__( self, @@ -42,7 +44,7 @@ class GetTokenByPinIDResponseBody(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetTokenByPinIDErrorsTypedDict(TypedDict): @@ -68,10 +70,11 @@ class GetTokenByPinIDBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTokenByPinIDBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetTokenByPinIDBadRequestData + data: GetTokenByPinIDBadRequestData = field(hash=False) def __init__( self, @@ -81,4 +84,4 @@ class GetTokenByPinIDBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/gettokendetails.py b/src/plex_api_client/models/errors/gettokendetails.py index da1c727..da297ad 100644 --- a/src/plex_api_client/models/errors/gettokendetails.py +++ b/src/plex_api_client/models/errors/gettokendetails.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetTokenDetailsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTokenDetailsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetTokenDetailsUnauthorizedData + data: GetTokenDetailsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetTokenDetailsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetTokenDetailsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetTokenDetailsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTokenDetailsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetTokenDetailsBadRequestData + data: GetTokenDetailsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetTokenDetailsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/gettopwatchedcontent.py b/src/plex_api_client/models/errors/gettopwatchedcontent.py index 173387e..b61c41d 100644 --- a/src/plex_api_client/models/errors/gettopwatchedcontent.py +++ b/src/plex_api_client/models/errors/gettopwatchedcontent.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetTopWatchedContentUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTopWatchedContentUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetTopWatchedContentUnauthorizedData + data: GetTopWatchedContentUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetTopWatchedContentUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetTopWatchedContentErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetTopWatchedContentBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTopWatchedContentBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetTopWatchedContentBadRequestData + data: GetTopWatchedContentBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetTopWatchedContentBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/gettranscodesessions.py b/src/plex_api_client/models/errors/gettranscodesessions.py index 95a3200..92fd538 100644 --- a/src/plex_api_client/models/errors/gettranscodesessions.py +++ b/src/plex_api_client/models/errors/gettranscodesessions.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetTranscodeSessionsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTranscodeSessionsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetTranscodeSessionsUnauthorizedData + data: GetTranscodeSessionsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetTranscodeSessionsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetTranscodeSessionsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetTranscodeSessionsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTranscodeSessionsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetTranscodeSessionsBadRequestData + data: GetTranscodeSessionsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetTranscodeSessionsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/gettransienttoken.py b/src/plex_api_client/models/errors/gettransienttoken.py index 7337fcb..b3643ed 100644 --- a/src/plex_api_client/models/errors/gettransienttoken.py +++ b/src/plex_api_client/models/errors/gettransienttoken.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetTransientTokenUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTransientTokenUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetTransientTokenUnauthorizedData + data: GetTransientTokenUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetTransientTokenUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetTransientTokenErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetTransientTokenBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetTransientTokenBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetTransientTokenBadRequestData + data: GetTransientTokenBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetTransientTokenBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getupdatestatus.py b/src/plex_api_client/models/errors/getupdatestatus.py index 235baae..ccd84f7 100644 --- a/src/plex_api_client/models/errors/getupdatestatus.py +++ b/src/plex_api_client/models/errors/getupdatestatus.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetUpdateStatusUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetUpdateStatusUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetUpdateStatusUnauthorizedData + data: GetUpdateStatusUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetUpdateStatusUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetUpdateStatusErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetUpdateStatusBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetUpdateStatusBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetUpdateStatusBadRequestData + data: GetUpdateStatusBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetUpdateStatusBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/getuserfriends.py b/src/plex_api_client/models/errors/getuserfriends.py index 8f4b0be..3faed7e 100644 --- a/src/plex_api_client/models/errors/getuserfriends.py +++ b/src/plex_api_client/models/errors/getuserfriends.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class GetUserFriendsUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetUserFriendsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: GetUserFriendsUnauthorizedData + data: GetUserFriendsUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class GetUserFriendsUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class GetUserFriendsErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class GetUserFriendsBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class GetUserFriendsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: GetUserFriendsBadRequestData + data: GetUserFriendsBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class GetUserFriendsBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/logline.py b/src/plex_api_client/models/errors/logline.py index d7cfe6f..b9d98d7 100644 --- a/src/plex_api_client/models/errors/logline.py +++ b/src/plex_api_client/models/errors/logline.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class LogLineUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class LogLineUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: LogLineUnauthorizedData + data: LogLineUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class LogLineUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class LogLineErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class LogLineBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class LogLineBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: LogLineBadRequestData + data: LogLineBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class LogLineBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/logmultiline.py b/src/plex_api_client/models/errors/logmultiline.py index 23cd62b..9316993 100644 --- a/src/plex_api_client/models/errors/logmultiline.py +++ b/src/plex_api_client/models/errors/logmultiline.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class LogMultiLineUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class LogMultiLineUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: LogMultiLineUnauthorizedData + data: LogMultiLineUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class LogMultiLineUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class LogMultiLineErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class LogMultiLineBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class LogMultiLineBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: LogMultiLineBadRequestData + data: LogMultiLineBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class LogMultiLineBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/markplayed.py b/src/plex_api_client/models/errors/markplayed.py index 39bdf05..5b58551 100644 --- a/src/plex_api_client/models/errors/markplayed.py +++ b/src/plex_api_client/models/errors/markplayed.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class MarkPlayedUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class MarkPlayedUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: MarkPlayedUnauthorizedData + data: MarkPlayedUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class MarkPlayedUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class MarkPlayedErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class MarkPlayedBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class MarkPlayedBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: MarkPlayedBadRequestData + data: MarkPlayedBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class MarkPlayedBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/markunplayed.py b/src/plex_api_client/models/errors/markunplayed.py index 9a9b76f..24f4a18 100644 --- a/src/plex_api_client/models/errors/markunplayed.py +++ b/src/plex_api_client/models/errors/markunplayed.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class MarkUnplayedUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class MarkUnplayedUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: MarkUnplayedUnauthorizedData + data: MarkUnplayedUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class MarkUnplayedUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class MarkUnplayedErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class MarkUnplayedBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class MarkUnplayedBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: MarkUnplayedBadRequestData + data: MarkUnplayedBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class MarkUnplayedBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/no_response_error.py b/src/plex_api_client/models/errors/no_response_error.py index f98beea..b710ea2 100644 --- a/src/plex_api_client/models/errors/no_response_error.py +++ b/src/plex_api_client/models/errors/no_response_error.py @@ -1,12 +1,16 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from dataclasses import dataclass + + +@dataclass(frozen=True) class NoResponseError(Exception): """Error raised when no HTTP response is received from the server.""" message: str def __init__(self, message: str = "No response received"): - self.message = message + object.__setattr__(self, "message", message) super().__init__(message) def __str__(self): diff --git a/src/plex_api_client/models/errors/performsearch.py b/src/plex_api_client/models/errors/performsearch.py index d718ad5..466d675 100644 --- a/src/plex_api_client/models/errors/performsearch.py +++ b/src/plex_api_client/models/errors/performsearch.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class PerformSearchUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class PerformSearchUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: PerformSearchUnauthorizedData + data: PerformSearchUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class PerformSearchUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class PerformSearchErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class PerformSearchBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class PerformSearchBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: PerformSearchBadRequestData + data: PerformSearchBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class PerformSearchBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/performvoicesearch.py b/src/plex_api_client/models/errors/performvoicesearch.py index f7e710b..93d6e51 100644 --- a/src/plex_api_client/models/errors/performvoicesearch.py +++ b/src/plex_api_client/models/errors/performvoicesearch.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class PerformVoiceSearchUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class PerformVoiceSearchUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: PerformVoiceSearchUnauthorizedData + data: PerformVoiceSearchUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class PerformVoiceSearchUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class PerformVoiceSearchErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class PerformVoiceSearchBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class PerformVoiceSearchBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: PerformVoiceSearchBadRequestData + data: PerformVoiceSearchBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class PerformVoiceSearchBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/plexapierror.py b/src/plex_api_client/models/errors/plexapierror.py index be152d9..fb2a522 100644 --- a/src/plex_api_client/models/errors/plexapierror.py +++ b/src/plex_api_client/models/errors/plexapierror.py @@ -2,25 +2,29 @@ import httpx from typing import Optional +from dataclasses import dataclass, field +@dataclass(frozen=True) class PlexAPIError(Exception): """The base class for all HTTP error responses.""" message: str status_code: int body: str - headers: httpx.Headers - raw_response: httpx.Response + headers: httpx.Headers = field(hash=False) + raw_response: httpx.Response = field(hash=False) def __init__( self, message: str, raw_response: httpx.Response, body: Optional[str] = None ): - self.message = message - self.status_code = raw_response.status_code - self.body = body if body is not None else raw_response.text - self.headers = raw_response.headers - self.raw_response = raw_response + object.__setattr__(self, "message", message) + object.__setattr__(self, "status_code", raw_response.status_code) + object.__setattr__( + self, "body", body if body is not None else raw_response.text + ) + object.__setattr__(self, "headers", raw_response.headers) + object.__setattr__(self, "raw_response", raw_response) def __str__(self): return self.message diff --git a/src/plex_api_client/models/errors/post_users_sign_in_data.py b/src/plex_api_client/models/errors/post_users_sign_in_data.py index 7d06a39..c33f84e 100644 --- a/src/plex_api_client/models/errors/post_users_sign_in_data.py +++ b/src/plex_api_client/models/errors/post_users_sign_in_data.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class PostUsersSignInDataUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class PostUsersSignInDataUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: PostUsersSignInDataUnauthorizedData + data: PostUsersSignInDataUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class PostUsersSignInDataUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class PostUsersSignInDataErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class PostUsersSignInDataBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class PostUsersSignInDataBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: PostUsersSignInDataBadRequestData + data: PostUsersSignInDataBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class PostUsersSignInDataBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/responsevalidationerror.py b/src/plex_api_client/models/errors/responsevalidationerror.py index d41c119..ab8aa3f 100644 --- a/src/plex_api_client/models/errors/responsevalidationerror.py +++ b/src/plex_api_client/models/errors/responsevalidationerror.py @@ -2,10 +2,12 @@ import httpx from typing import Optional +from dataclasses import dataclass from plex_api_client.models.errors import PlexAPIError +@dataclass(frozen=True) class ResponseValidationError(PlexAPIError): """Error raised when there is a type mismatch between the response data and the expected Pydantic model.""" diff --git a/src/plex_api_client/models/errors/sdkerror.py b/src/plex_api_client/models/errors/sdkerror.py index f55be2a..6939c1c 100644 --- a/src/plex_api_client/models/errors/sdkerror.py +++ b/src/plex_api_client/models/errors/sdkerror.py @@ -2,12 +2,14 @@ import httpx from typing import Optional +from dataclasses import dataclass from plex_api_client.models.errors import PlexAPIError MAX_MESSAGE_LEN = 10_000 +@dataclass(frozen=True) class SDKError(PlexAPIError): """The fallback error class if no more specific error class is matched.""" diff --git a/src/plex_api_client/models/errors/startalltasks.py b/src/plex_api_client/models/errors/startalltasks.py index 850bf03..aeb3a60 100644 --- a/src/plex_api_client/models/errors/startalltasks.py +++ b/src/plex_api_client/models/errors/startalltasks.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class StartAllTasksUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StartAllTasksUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: StartAllTasksUnauthorizedData + data: StartAllTasksUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class StartAllTasksUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class StartAllTasksErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class StartAllTasksBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StartAllTasksBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: StartAllTasksBadRequestData + data: StartAllTasksBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class StartAllTasksBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/starttask.py b/src/plex_api_client/models/errors/starttask.py index af2b24a..512ec0e 100644 --- a/src/plex_api_client/models/errors/starttask.py +++ b/src/plex_api_client/models/errors/starttask.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class StartTaskUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StartTaskUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: StartTaskUnauthorizedData + data: StartTaskUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class StartTaskUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class StartTaskErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class StartTaskBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StartTaskBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: StartTaskBadRequestData + data: StartTaskBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class StartTaskBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/startuniversaltranscode.py b/src/plex_api_client/models/errors/startuniversaltranscode.py index f9e6336..73a2d3c 100644 --- a/src/plex_api_client/models/errors/startuniversaltranscode.py +++ b/src/plex_api_client/models/errors/startuniversaltranscode.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class StartUniversalTranscodeUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StartUniversalTranscodeUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: StartUniversalTranscodeUnauthorizedData + data: StartUniversalTranscodeUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class StartUniversalTranscodeUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class StartUniversalTranscodeErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class StartUniversalTranscodeBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StartUniversalTranscodeBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: StartUniversalTranscodeBadRequestData + data: StartUniversalTranscodeBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class StartUniversalTranscodeBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/stopalltasks.py b/src/plex_api_client/models/errors/stopalltasks.py index 0732cd0..762aed9 100644 --- a/src/plex_api_client/models/errors/stopalltasks.py +++ b/src/plex_api_client/models/errors/stopalltasks.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class StopAllTasksUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StopAllTasksUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: StopAllTasksUnauthorizedData + data: StopAllTasksUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class StopAllTasksUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class StopAllTasksErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class StopAllTasksBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StopAllTasksBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: StopAllTasksBadRequestData + data: StopAllTasksBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class StopAllTasksBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/stoptask.py b/src/plex_api_client/models/errors/stoptask.py index 2aec0fe..4f5a336 100644 --- a/src/plex_api_client/models/errors/stoptask.py +++ b/src/plex_api_client/models/errors/stoptask.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class StopTaskUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StopTaskUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: StopTaskUnauthorizedData + data: StopTaskUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class StopTaskUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class StopTaskErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class StopTaskBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StopTaskBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: StopTaskBadRequestData + data: StopTaskBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class StopTaskBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/stoptranscodesession.py b/src/plex_api_client/models/errors/stoptranscodesession.py index 05779c9..4c23e6c 100644 --- a/src/plex_api_client/models/errors/stoptranscodesession.py +++ b/src/plex_api_client/models/errors/stoptranscodesession.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class StopTranscodeSessionUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StopTranscodeSessionUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: StopTranscodeSessionUnauthorizedData + data: StopTranscodeSessionUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class StopTranscodeSessionUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class StopTranscodeSessionErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class StopTranscodeSessionBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class StopTranscodeSessionBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: StopTranscodeSessionBadRequestData + data: StopTranscodeSessionBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class StopTranscodeSessionBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/updateplaylist.py b/src/plex_api_client/models/errors/updateplaylist.py index 8958f81..4ea3ab7 100644 --- a/src/plex_api_client/models/errors/updateplaylist.py +++ b/src/plex_api_client/models/errors/updateplaylist.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class UpdatePlaylistUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class UpdatePlaylistUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: UpdatePlaylistUnauthorizedData + data: UpdatePlaylistUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class UpdatePlaylistUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class UpdatePlaylistErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class UpdatePlaylistBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class UpdatePlaylistBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: UpdatePlaylistBadRequestData + data: UpdatePlaylistBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class UpdatePlaylistBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/updateplayprogress.py b/src/plex_api_client/models/errors/updateplayprogress.py index 3ab21ac..861157c 100644 --- a/src/plex_api_client/models/errors/updateplayprogress.py +++ b/src/plex_api_client/models/errors/updateplayprogress.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class UpdatePlayProgressUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class UpdatePlayProgressUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: UpdatePlayProgressUnauthorizedData + data: UpdatePlayProgressUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class UpdatePlayProgressUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class UpdatePlayProgressErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class UpdatePlayProgressBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class UpdatePlayProgressBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: UpdatePlayProgressBadRequestData + data: UpdatePlayProgressBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class UpdatePlayProgressBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/errors/uploadplaylist.py b/src/plex_api_client/models/errors/uploadplaylist.py index 340114d..fc3243d 100644 --- a/src/plex_api_client/models/errors/uploadplaylist.py +++ b/src/plex_api_client/models/errors/uploadplaylist.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from plex_api_client.models.errors import PlexAPIError from plex_api_client.types import BaseModel @@ -32,10 +33,11 @@ class UploadPlaylistUnauthorizedData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class UploadPlaylistUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" - data: UploadPlaylistUnauthorizedData + data: UploadPlaylistUnauthorizedData = field(hash=False) def __init__( self, @@ -45,7 +47,7 @@ class UploadPlaylistUnauthorized(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) class UploadPlaylistErrorsTypedDict(TypedDict): @@ -71,10 +73,11 @@ class UploadPlaylistBadRequestData(BaseModel): r"""Raw HTTP response; suitable for custom response parsing""" +@dataclass(frozen=True) class UploadPlaylistBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" - data: UploadPlaylistBadRequestData + data: UploadPlaylistBadRequestData = field(hash=False) def __init__( self, @@ -84,4 +87,4 @@ class UploadPlaylistBadRequest(PlexAPIError): ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/plex_api_client/models/operations/__init__.py b/src/plex_api_client/models/operations/__init__.py index 87e0093..2361fa0 100644 --- a/src/plex_api_client/models/operations/__init__.py +++ b/src/plex_api_client/models/operations/__init__.py @@ -3,6 +3,7 @@ from typing import TYPE_CHECKING from importlib import import_module import builtins +import sys if TYPE_CHECKING: from .addplaylistcontents import ( @@ -3430,6 +3431,18 @@ _dynamic_imports: dict[str, str] = { } +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + def __getattr__(attr_name: str) -> object: module_name = _dynamic_imports.get(attr_name) if module_name is None: @@ -3438,7 +3451,7 @@ def __getattr__(attr_name: str) -> object: ) try: - module = import_module(module_name, __package__) + module = dynamic_import(module_name) result = getattr(module, attr_name) return result except ImportError as e: diff --git a/src/plex_api_client/models/operations/get_watch_list.py b/src/plex_api_client/models/operations/get_watch_list.py index 91cc50d..8194946 100644 --- a/src/plex_api_client/models/operations/get_watch_list.py +++ b/src/plex_api_client/models/operations/get_watch_list.py @@ -20,8 +20,8 @@ from typing_extensions import Annotated, NotRequired, TypedDict GET_WATCH_LIST_SERVERS = [ - # The plex metadata provider server - "https://metadata.provider.plex.tv", + # The plex discover provider server + "https://discover.provider.plex.tv", ] diff --git a/src/plex_api_client/sdk.py b/src/plex_api_client/sdk.py index 373f5c8..b73b3b9 100644 --- a/src/plex_api_client/sdk.py +++ b/src/plex_api_client/sdk.py @@ -11,6 +11,7 @@ from plex_api_client import utils from plex_api_client._hooks import SDKHooks from plex_api_client.models import components from plex_api_client.types import OptionalNullable, UNSET +import sys from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union, cast import weakref @@ -244,6 +245,7 @@ class PlexAPI(BaseSDK): timeout_ms=timeout_ms, debug_logger=debug_logger, ), + parent_ref=self, ) hooks = SDKHooks() @@ -268,13 +270,24 @@ class PlexAPI(BaseSDK): self.sdk_configuration.async_client_supplied, ) + def dynamic_import(self, modname, retries=3): + for attempt in range(retries): + try: + return importlib.import_module(modname) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + def __getattr__(self, name: str): if name in self._sub_sdk_map: module_path, class_name = self._sub_sdk_map[name] try: - module = importlib.import_module(module_path) + module = self.dynamic_import(module_path) klass = getattr(module, class_name) - instance = klass(self.sdk_configuration) + instance = klass(self.sdk_configuration, parent_ref=self) setattr(self, name, instance) return instance except ImportError as e: diff --git a/src/plex_api_client/utils/__init__.py b/src/plex_api_client/utils/__init__.py index dc88403..56164cf 100644 --- a/src/plex_api_client/utils/__init__.py +++ b/src/plex_api_client/utils/__init__.py @@ -3,6 +3,7 @@ from typing import TYPE_CHECKING from importlib import import_module import builtins +import sys if TYPE_CHECKING: from .annotations import get_discriminator @@ -159,6 +160,18 @@ _dynamic_imports: dict[str, str] = { } +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + def __getattr__(attr_name: str) -> object: module_name = _dynamic_imports.get(attr_name) if module_name is None: @@ -167,9 +180,8 @@ def __getattr__(attr_name: str) -> object: ) try: - module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result + module = dynamic_import(module_name) + return getattr(module, attr_name) except ImportError as e: raise ImportError( f"Failed to import {attr_name} from {module_name}: {e}" diff --git a/src/plex_api_client/utils/eventstreaming.py b/src/plex_api_client/utils/eventstreaming.py index 74a63f7..0969899 100644 --- a/src/plex_api_client/utils/eventstreaming.py +++ b/src/plex_api_client/utils/eventstreaming.py @@ -17,6 +17,9 @@ T = TypeVar("T") class EventStream(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: Generator[T, None, None] @@ -25,9 +28,11 @@ class EventStream(Generic[T]): response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, ): self.response = response self.generator = stream_events(response, decoder, sentinel) + self.client_ref = client_ref def __iter__(self): return self @@ -43,6 +48,9 @@ class EventStream(Generic[T]): class EventStreamAsync(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: AsyncGenerator[T, None] @@ -51,9 +59,11 @@ class EventStreamAsync(Generic[T]): response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, ): self.response = response self.generator = stream_events_async(response, decoder, sentinel) + self.client_ref = client_ref def __aiter__(self): return self