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

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


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
