# Generated by ariadne-codegen
# Source: exponent/core/graphql/operations

from typing import Any, List, Literal, Union

from pydantic import Field

from .base_model import BaseModel


class RebuildCloudRepository(BaseModel):
    rebuild_cloud_repository: Union[
        "RebuildCloudRepositoryRebuildCloudRepositoryContainerImages",
        "RebuildCloudRepositoryRebuildCloudRepositoryUnauthenticatedError",
        "RebuildCloudRepositoryRebuildCloudRepositoryCloudConfigNotFoundError",
        "RebuildCloudRepositoryRebuildCloudRepositoryGithubConfigNotFoundError",
        "RebuildCloudRepositoryRebuildCloudRepositoryCloudSessionError",
        "RebuildCloudRepositoryRebuildCloudRepositoryError",
    ] = Field(alias="rebuildCloudRepository", discriminator="typename__")


class RebuildCloudRepositoryRebuildCloudRepositoryContainerImages(BaseModel):
    typename__: Literal["ContainerImages"] = Field(alias="__typename")
    images: List["RebuildCloudRepositoryRebuildCloudRepositoryContainerImagesImages"]


class RebuildCloudRepositoryRebuildCloudRepositoryContainerImagesImages(BaseModel):
    build_ref: str = Field(alias="buildRef")
    created_at: Any = Field(alias="createdAt")
    updated_at: Any = Field(alias="updatedAt")


class RebuildCloudRepositoryRebuildCloudRepositoryUnauthenticatedError(BaseModel):
    typename__: Literal["UnauthenticatedError"] = Field(alias="__typename")
    message: str


class RebuildCloudRepositoryRebuildCloudRepositoryCloudConfigNotFoundError(BaseModel):
    typename__: Literal["CloudConfigNotFoundError"] = Field(alias="__typename")
    message: str


class RebuildCloudRepositoryRebuildCloudRepositoryGithubConfigNotFoundError(BaseModel):
    typename__: Literal["GithubConfigNotFoundError"] = Field(alias="__typename")
    message: str


class RebuildCloudRepositoryRebuildCloudRepositoryCloudSessionError(BaseModel):
    typename__: Literal["CloudSessionError"] = Field(alias="__typename")
    message: str


class RebuildCloudRepositoryRebuildCloudRepositoryError(BaseModel):
    typename__: Literal["Error"] = Field(alias="__typename")
    message: str


RebuildCloudRepository.model_rebuild()
RebuildCloudRepositoryRebuildCloudRepositoryContainerImages.model_rebuild()
