"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
import io
from novu_py.types import BaseModel
from novu_py.utils import (
    FieldMetadata,
    HeaderMetadata,
    MultipartFormMetadata,
    RequestMetadata,
)
import pydantic
from typing import IO, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class FileTypedDict(TypedDict):
    file_name: str
    content: Union[bytes, IO[bytes], io.BufferedReader]
    content_type: NotRequired[str]


class File(BaseModel):
    file_name: Annotated[
        str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
    ]

    content: Annotated[
        Union[bytes, IO[bytes], io.BufferedReader],
        pydantic.Field(alias=""),
        FieldMetadata(multipart=MultipartFormMetadata(content=True)),
    ]

    content_type: Annotated[
        Optional[str],
        pydantic.Field(alias="Content-Type"),
        FieldMetadata(multipart=True),
    ] = None


class TranslationControllerUploadMasterJSONEndpointRequestBodyTypedDict(TypedDict):
    file: FileTypedDict
    r"""Master JSON file with locale as filename (e.g., en_US.json)"""


class TranslationControllerUploadMasterJSONEndpointRequestBody(BaseModel):
    file: Annotated[File, FieldMetadata(multipart=MultipartFormMetadata(file=True))]
    r"""Master JSON file with locale as filename (e.g., en_US.json)"""


class TranslationControllerUploadMasterJSONEndpointRequestTypedDict(TypedDict):
    request_body: TranslationControllerUploadMasterJSONEndpointRequestBodyTypedDict
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class TranslationControllerUploadMasterJSONEndpointRequest(BaseModel):
    request_body: Annotated[
        TranslationControllerUploadMasterJSONEndpointRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="multipart/form-data")),
    ]

    idempotency_key: Annotated[
        Optional[str],
        pydantic.Field(alias="idempotency-key"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""A header for idempotency purposes"""
