"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations import httpx from plex_api_client.types import BaseModel from plex_api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata import pydantic from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict class GetMetadataChildrenRequestTypedDict(TypedDict): rating_key: float r"""the id of the library item to return the children of.""" include_elements: NotRequired[str] r"""Adds additional elements to the response. Supported types are (Stream) """ class GetMetadataChildrenRequest(BaseModel): rating_key: Annotated[ float, pydantic.Field(alias="ratingKey"), FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), ] r"""the id of the library item to return the children of.""" include_elements: Annotated[ Optional[str], pydantic.Field(alias="includeElements"), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None r"""Adds additional elements to the response. Supported types are (Stream) """ class GetMetadataChildrenDirectoryTypedDict(TypedDict): leaf_count: NotRequired[int] thumb: NotRequired[str] viewed_leaf_count: NotRequired[int] key: NotRequired[str] title: NotRequired[str] class GetMetadataChildrenDirectory(BaseModel): leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None thumb: Optional[str] = None viewed_leaf_count: Annotated[ Optional[int], pydantic.Field(alias="viewedLeafCount") ] = None key: Optional[str] = None title: Optional[str] = None class GetMetadataChildrenMetadataTypedDict(TypedDict): rating_key: NotRequired[str] key: NotRequired[str] parent_rating_key: NotRequired[str] guid: NotRequired[str] parent_guid: NotRequired[str] parent_studio: NotRequired[str] type: NotRequired[str] title: NotRequired[str] parent_key: NotRequired[str] parent_title: NotRequired[str] summary: NotRequired[str] index: NotRequired[int] parent_index: NotRequired[int] view_count: NotRequired[int] last_viewed_at: NotRequired[int] parent_year: NotRequired[int] thumb: NotRequired[str] art: NotRequired[str] parent_thumb: NotRequired[str] parent_theme: NotRequired[str] leaf_count: NotRequired[int] viewed_leaf_count: NotRequired[int] added_at: NotRequired[int] updated_at: NotRequired[int] user_rating: NotRequired[int] skip_count: NotRequired[int] last_rated_at: NotRequired[int] class GetMetadataChildrenMetadata(BaseModel): rating_key: Annotated[Optional[str], pydantic.Field(alias="ratingKey")] = None key: Optional[str] = None parent_rating_key: Annotated[ Optional[str], pydantic.Field(alias="parentRatingKey") ] = None guid: Optional[str] = None parent_guid: Annotated[Optional[str], pydantic.Field(alias="parentGuid")] = None parent_studio: Annotated[Optional[str], pydantic.Field(alias="parentStudio")] = None type: Optional[str] = None title: Optional[str] = None parent_key: Annotated[Optional[str], pydantic.Field(alias="parentKey")] = None parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None summary: Optional[str] = None index: Optional[int] = None parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None view_count: Annotated[Optional[int], pydantic.Field(alias="viewCount")] = None last_viewed_at: Annotated[Optional[int], pydantic.Field(alias="lastViewedAt")] = ( None ) parent_year: Annotated[Optional[int], pydantic.Field(alias="parentYear")] = None thumb: Optional[str] = None art: Optional[str] = None parent_thumb: Annotated[Optional[str], pydantic.Field(alias="parentThumb")] = None parent_theme: Annotated[Optional[str], pydantic.Field(alias="parentTheme")] = None leaf_count: Annotated[Optional[int], pydantic.Field(alias="leafCount")] = None viewed_leaf_count: Annotated[ Optional[int], pydantic.Field(alias="viewedLeafCount") ] = None added_at: Annotated[Optional[int], pydantic.Field(alias="addedAt")] = None updated_at: Annotated[Optional[int], pydantic.Field(alias="updatedAt")] = None user_rating: Annotated[Optional[int], pydantic.Field(alias="userRating")] = None skip_count: Annotated[Optional[int], pydantic.Field(alias="skipCount")] = None last_rated_at: Annotated[Optional[int], pydantic.Field(alias="lastRatedAt")] = None class GetMetadataChildrenMediaContainerTypedDict(TypedDict): size: NotRequired[int] allow_sync: NotRequired[bool] art: NotRequired[str] identifier: NotRequired[str] key: NotRequired[str] library_section_id: NotRequired[int] library_section_title: NotRequired[str] library_section_uuid: NotRequired[str] media_tag_prefix: NotRequired[str] media_tag_version: NotRequired[int] nocache: NotRequired[bool] parent_index: NotRequired[int] parent_title: NotRequired[str] parent_year: NotRequired[int] summary: NotRequired[str] theme: NotRequired[str] thumb: NotRequired[str] title1: NotRequired[str] title2: NotRequired[str] view_group: NotRequired[str] view_mode: NotRequired[int] directory: NotRequired[List[GetMetadataChildrenDirectoryTypedDict]] metadata: NotRequired[List[GetMetadataChildrenMetadataTypedDict]] class GetMetadataChildrenMediaContainer(BaseModel): size: Optional[int] = None allow_sync: Annotated[Optional[bool], pydantic.Field(alias="allowSync")] = None art: Optional[str] = None identifier: Optional[str] = None key: Optional[str] = None library_section_id: Annotated[ Optional[int], pydantic.Field(alias="librarySectionID") ] = None library_section_title: Annotated[ Optional[str], pydantic.Field(alias="librarySectionTitle") ] = None library_section_uuid: Annotated[ Optional[str], pydantic.Field(alias="librarySectionUUID") ] = None media_tag_prefix: Annotated[ Optional[str], pydantic.Field(alias="mediaTagPrefix") ] = None media_tag_version: Annotated[ Optional[int], pydantic.Field(alias="mediaTagVersion") ] = None nocache: Optional[bool] = None parent_index: Annotated[Optional[int], pydantic.Field(alias="parentIndex")] = None parent_title: Annotated[Optional[str], pydantic.Field(alias="parentTitle")] = None parent_year: Annotated[Optional[int], pydantic.Field(alias="parentYear")] = None summary: Optional[str] = None theme: Optional[str] = None thumb: Optional[str] = None title1: Optional[str] = None title2: Optional[str] = None view_group: Annotated[Optional[str], pydantic.Field(alias="viewGroup")] = None view_mode: Annotated[Optional[int], pydantic.Field(alias="viewMode")] = None directory: Annotated[ Optional[List[GetMetadataChildrenDirectory]], pydantic.Field(alias="Directory") ] = None metadata: Annotated[ Optional[List[GetMetadataChildrenMetadata]], pydantic.Field(alias="Metadata") ] = None class GetMetadataChildrenResponseBodyTypedDict(TypedDict): r"""The children of the library item.""" media_container: NotRequired[GetMetadataChildrenMediaContainerTypedDict] class GetMetadataChildrenResponseBody(BaseModel): r"""The children of the library item.""" media_container: Annotated[ Optional[GetMetadataChildrenMediaContainer], pydantic.Field(alias="MediaContainer"), ] = None class GetMetadataChildrenResponseTypedDict(TypedDict): content_type: str r"""HTTP response content type for this operation""" status_code: int r"""HTTP response status code for this operation""" raw_response: httpx.Response r"""Raw HTTP response; suitable for custom response parsing""" object: NotRequired[GetMetadataChildrenResponseBodyTypedDict] r"""The children of the library item.""" class GetMetadataChildrenResponse(BaseModel): content_type: str r"""HTTP response content type for this operation""" status_code: int r"""HTTP response status code for this operation""" raw_response: httpx.Response r"""Raw HTTP response; suitable for custom response parsing""" object: Optional[GetMetadataChildrenResponseBody] = None r"""The children of the library item."""