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

from typing import Literal, Union

from pydantic import Field

from .base_model import BaseModel


class TextData(BaseModel):
    object_: Union["TextDataObjectObject", "TextDataObjectTextBlob"] = Field(
        discriminator="typename__"
    )


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


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


TextData.model_rebuild()
