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

from typing import Literal, Optional, Union

from pydantic import Field

from .base_model import BaseModel


class UpdateJob(BaseModel):
    update: Optional["UpdateJobUpdate"]


class UpdateJobUpdate(BaseModel):
    id: int
    owner: Union["UpdateJobUpdateOwnerEntity", "UpdateJobUpdateOwnerUser"] = Field(
        discriminator="typename__"
    )


class UpdateJobUpdateOwnerEntity(BaseModel):
    typename__: Literal["Entity"] = Field(alias="__typename")


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


UpdateJob.model_rebuild()
UpdateJobUpdate.model_rebuild()
