# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .complete_multipart_upload_request_entity_type import CompleteMultipartUploadRequestEntityType
from .multipart_upload_part import MultipartUploadPart


class CompleteMultipartUploadRequest(UniversalBaseModel):
    file_name: str
    project_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    If null, the default project is used
    """

    entity_type: CompleteMultipartUploadRequestEntityType
    entity_id: str
    container_id: typing.Optional[str] = None
    file_size: int
    mime_type: typing.Optional[str] = None
    upload_id: str
    uploaded_file_parts: typing.List[MultipartUploadPart]

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
