mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 04:20:52 +00:00
91 lines
2.5 KiB
Python
91 lines
2.5 KiB
Python
"""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
|
|
import pydantic
|
|
from typing import List, Optional
|
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
|
|
|
class GetGlobalHubsHubsErrorsTypedDict(TypedDict):
|
|
code: NotRequired[int]
|
|
message: NotRequired[str]
|
|
status: NotRequired[int]
|
|
|
|
|
|
class GetGlobalHubsHubsErrors(BaseModel):
|
|
code: Optional[int] = None
|
|
|
|
message: Optional[str] = None
|
|
|
|
status: Optional[int] = None
|
|
|
|
|
|
class GetGlobalHubsUnauthorizedData(BaseModel):
|
|
errors: Optional[List[GetGlobalHubsHubsErrors]] = None
|
|
|
|
raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = (
|
|
None
|
|
)
|
|
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 = field(hash=False)
|
|
|
|
def __init__(
|
|
self,
|
|
data: GetGlobalHubsUnauthorizedData,
|
|
raw_response: httpx.Response,
|
|
body: Optional[str] = None,
|
|
):
|
|
message = body or raw_response.text
|
|
super().__init__(message, raw_response, body)
|
|
object.__setattr__(self, "data", data)
|
|
|
|
|
|
class GetGlobalHubsErrorsTypedDict(TypedDict):
|
|
code: NotRequired[int]
|
|
message: NotRequired[str]
|
|
status: NotRequired[int]
|
|
|
|
|
|
class GetGlobalHubsErrors(BaseModel):
|
|
code: Optional[int] = None
|
|
|
|
message: Optional[str] = None
|
|
|
|
status: Optional[int] = None
|
|
|
|
|
|
class GetGlobalHubsBadRequestData(BaseModel):
|
|
errors: Optional[List[GetGlobalHubsErrors]] = None
|
|
|
|
raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = (
|
|
None
|
|
)
|
|
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 = field(hash=False)
|
|
|
|
def __init__(
|
|
self,
|
|
data: GetGlobalHubsBadRequestData,
|
|
raw_response: httpx.Response,
|
|
body: Optional[str] = None,
|
|
):
|
|
message = body or raw_response.text
|
|
super().__init__(message, raw_response, body)
|
|
object.__setattr__(self, "data", data)
|