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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .build_status_enum import BuildStatusEnum
from .container_image_build_config import ContainerImageBuildConfig
from .container_image_container_image_tag import ContainerImageContainerImageTag
from .entity_visibility import EntityVisibility


class ContainerImageRead(UniversalBaseModel):
    id: str
    name: str
    visibility: EntityVisibility
    created: dt.datetime
    modified: dt.datetime
    repository: str
    sha: str
    tags: typing.List[ContainerImageContainerImageTag]
    build_status: typing.Optional[BuildStatusEnum] = None
    build_config: typing.Optional[ContainerImageBuildConfig] = None

    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
