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

from __future__ import annotations
from moovio_sdk import utils
from moovio_sdk.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class FileTypedDict(TypedDict):
    filename: NotRequired[str]
    mime_type: NotRequired[str]


class File(BaseModel):
    filename: Optional[str] = None

    mime_type: Annotated[Optional[str], pydantic.Field(alias="mimeType")] = None


class FileUploadValidationErrorData(BaseModel):
    evidence_type: Annotated[Optional[str], pydantic.Field(alias="evidenceType")] = None

    file: Optional[File] = None


class FileUploadValidationError(Exception):
    data: FileUploadValidationErrorData

    def __init__(self, data: FileUploadValidationErrorData):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(self.data, FileUploadValidationErrorData)
