# Generated by ariadne-codegen
# Source: gitsrht/graphql/

from typing import Literal, Optional, Union

from pydantic import Field

from .base_model import BaseModel


class DeleteRepository(BaseModel):
    repository: Optional["DeleteRepositoryRepository"]


class DeleteRepositoryRepository(BaseModel):
    id: int
    name: str
    owner: Union[
        "DeleteRepositoryRepositoryOwnerEntity", "DeleteRepositoryRepositoryOwnerUser"
    ] = Field(discriminator="typename__")


class DeleteRepositoryRepositoryOwnerEntity(BaseModel):
    typename__: Literal["Entity"] = Field(alias="__typename")
    canonical_name: str = Field(alias="canonicalName")


class DeleteRepositoryRepositoryOwnerUser(BaseModel):
    typename__: Literal["User"] = Field(alias="__typename")
    canonical_name: str = Field(alias="canonicalName")
    username: str


DeleteRepository.model_rebuild()
DeleteRepositoryRepository.model_rebuild()
