Files
plexpy/src/plex_api_client/models/operations/post_media_poster.py

66 lines
2.0 KiB
Python

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
import httpx
import io
from plex_api_client.types import BaseModel
from plex_api_client.utils import (
FieldMetadata,
PathParamMetadata,
QueryParamMetadata,
RequestMetadata,
)
import pydantic
from typing import IO, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class PostMediaPosterRequestTypedDict(TypedDict):
rating_key: int
r"""the id of the library item to return the posters of."""
url: NotRequired[str]
r"""The URL of the image, if uploading a remote image"""
request_body: NotRequired[Union[bytes, IO[bytes], io.BufferedReader]]
r"""The contents of the image, if uploading a local file"""
class PostMediaPosterRequest(BaseModel):
rating_key: Annotated[
int,
pydantic.Field(alias="ratingKey"),
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
]
r"""the id of the library item to return the posters of."""
url: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""The URL of the image, if uploading a remote image"""
request_body: Annotated[
Optional[Union[bytes, IO[bytes], io.BufferedReader]],
FieldMetadata(request=RequestMetadata(media_type="image/*")),
] = None
r"""The contents of the image, if uploading a local file"""
class PostMediaPosterResponseTypedDict(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"""
class PostMediaPosterResponse(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"""