"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations 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 GetLibraryHubsHubsErrorsTypedDict(TypedDict): code: NotRequired[int] message: NotRequired[str] status: NotRequired[int] class GetLibraryHubsHubsErrors(BaseModel): code: Optional[int] = None message: Optional[str] = None status: Optional[int] = None class GetLibraryHubsUnauthorizedData(BaseModel): errors: Optional[List[GetLibraryHubsHubsErrors]] = None raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( None ) r"""Raw HTTP response; suitable for custom response parsing""" class GetLibraryHubsUnauthorized(PlexAPIError): r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query.""" data: GetLibraryHubsUnauthorizedData def __init__( self, data: GetLibraryHubsUnauthorizedData, raw_response: httpx.Response, body: Optional[str] = None, ): message = body or raw_response.text super().__init__(message, raw_response, body) self.data = data class GetLibraryHubsErrorsTypedDict(TypedDict): code: NotRequired[int] message: NotRequired[str] status: NotRequired[int] class GetLibraryHubsErrors(BaseModel): code: Optional[int] = None message: Optional[str] = None status: Optional[int] = None class GetLibraryHubsBadRequestData(BaseModel): errors: Optional[List[GetLibraryHubsErrors]] = None raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = ( None ) r"""Raw HTTP response; suitable for custom response parsing""" class GetLibraryHubsBadRequest(PlexAPIError): r"""Bad Request - A parameter was not specified, or was specified incorrectly.""" data: GetLibraryHubsBadRequestData def __init__( self, data: GetLibraryHubsBadRequestData, raw_response: httpx.Response, body: Optional[str] = None, ): message = body or raw_response.text super().__init__(message, raw_response, body) self.data = data