# Generated by ariadne-codegen
# Source: hubsrht/services/git/

from typing import Literal, Optional, Union

from pydantic import Field

from .base_model import BaseModel
from .enums import Visibility


class GetManifests(BaseModel):
    user: Optional["GetManifestsUser"]


class GetManifestsUser(BaseModel):
    repository: Optional["GetManifestsUserRepository"]


class GetManifestsUserRepository(BaseModel):
    name: str
    visibility: Visibility
    multiple: Optional["GetManifestsUserRepositoryMultiple"]
    single_yml: Optional["GetManifestsUserRepositorySingleYml"] = Field(
        alias="singleYML"
    )
    single_yaml: Optional["GetManifestsUserRepositorySingleYaml"] = Field(
        alias="singleYAML"
    )


class GetManifestsUserRepositoryMultiple(BaseModel):
    object_: Union[
        "GetManifestsUserRepositoryMultipleObjectObject",
        "GetManifestsUserRepositoryMultipleObjectTree",
    ] = Field(discriminator="typename__")


class GetManifestsUserRepositoryMultipleObjectObject(BaseModel):
    typename__: Literal["BinaryBlob", "Commit", "Object", "Tag", "TextBlob"] = Field(
        alias="__typename"
    )


class GetManifestsUserRepositoryMultipleObjectTree(BaseModel):
    typename__: Literal["Tree"] = Field(alias="__typename")
    entries: "GetManifestsUserRepositoryMultipleObjectTreeEntries"


class GetManifestsUserRepositoryMultipleObjectTreeEntries(BaseModel):
    results: list["GetManifestsUserRepositoryMultipleObjectTreeEntriesResults"]


class GetManifestsUserRepositoryMultipleObjectTreeEntriesResults(BaseModel):
    name: str
    object_: Union[
        "GetManifestsUserRepositoryMultipleObjectTreeEntriesResultsObjectObject",
        "GetManifestsUserRepositoryMultipleObjectTreeEntriesResultsObjectTextBlob",
    ] = Field(discriminator="typename__")


class GetManifestsUserRepositoryMultipleObjectTreeEntriesResultsObjectObject(BaseModel):
    typename__: Literal["BinaryBlob", "Commit", "Object", "Tag", "Tree"] = Field(
        alias="__typename"
    )


class GetManifestsUserRepositoryMultipleObjectTreeEntriesResultsObjectTextBlob(
    BaseModel
):
    typename__: Literal["TextBlob"] = Field(alias="__typename")
    text: str


class GetManifestsUserRepositorySingleYml(BaseModel):
    object_: Union[
        "GetManifestsUserRepositorySingleYmlObjectObject",
        "GetManifestsUserRepositorySingleYmlObjectTextBlob",
    ] = Field(discriminator="typename__")


class GetManifestsUserRepositorySingleYmlObjectObject(BaseModel):
    typename__: Literal["BinaryBlob", "Commit", "Object", "Tag", "Tree"] = Field(
        alias="__typename"
    )


class GetManifestsUserRepositorySingleYmlObjectTextBlob(BaseModel):
    typename__: Literal["TextBlob"] = Field(alias="__typename")
    text: str


class GetManifestsUserRepositorySingleYaml(BaseModel):
    object_: Union[
        "GetManifestsUserRepositorySingleYamlObjectObject",
        "GetManifestsUserRepositorySingleYamlObjectTextBlob",
    ] = Field(discriminator="typename__")


class GetManifestsUserRepositorySingleYamlObjectObject(BaseModel):
    typename__: Literal["BinaryBlob", "Commit", "Object", "Tag", "Tree"] = Field(
        alias="__typename"
    )


class GetManifestsUserRepositorySingleYamlObjectTextBlob(BaseModel):
    typename__: Literal["TextBlob"] = Field(alias="__typename")
    text: str


GetManifests.model_rebuild()
GetManifestsUser.model_rebuild()
GetManifestsUserRepository.model_rebuild()
GetManifestsUserRepositoryMultiple.model_rebuild()
GetManifestsUserRepositoryMultipleObjectTree.model_rebuild()
GetManifestsUserRepositoryMultipleObjectTreeEntries.model_rebuild()
GetManifestsUserRepositoryMultipleObjectTreeEntriesResults.model_rebuild()
GetManifestsUserRepositorySingleYml.model_rebuild()
GetManifestsUserRepositorySingleYaml.model_rebuild()
