# Generated by ariadne-codegen
# Source: queries.graphql

from typing import Literal, Optional, Union

from pydantic import Field

from .base_model import BaseModel
from .fragments import InvalidInputSelection, OperationErrorSelection, UserSelection


class UsersSetAdmin(BaseModel):
    admin: "UsersSetAdminAdmin"


class UsersSetAdminAdmin(BaseModel):
    user: "UsersSetAdminAdminUser"


class UsersSetAdminAdminUser(BaseModel):
    mutate: Optional["UsersSetAdminAdminUserMutate"]


class UsersSetAdminAdminUserMutate(BaseModel):
    set_admin: Union[
        "UsersSetAdminAdminUserMutateSetAdminUser",
        "UsersSetAdminAdminUserMutateSetAdminInvalidInput",
        "UsersSetAdminAdminUserMutateSetAdminOperationError",
    ] = Field(alias="setAdmin", discriminator="typename__")


class UsersSetAdminAdminUserMutateSetAdminUser(UserSelection):
    typename__: Literal["User"] = Field(alias="__typename")


class UsersSetAdminAdminUserMutateSetAdminInvalidInput(InvalidInputSelection):
    typename__: Literal["InvalidInput"] = Field(alias="__typename")


class UsersSetAdminAdminUserMutateSetAdminOperationError(OperationErrorSelection):
    typename__: Literal["OperationError"] = Field(alias="__typename")


UsersSetAdmin.model_rebuild()
UsersSetAdminAdmin.model_rebuild()
UsersSetAdminAdminUser.model_rebuild()
UsersSetAdminAdminUserMutate.model_rebuild()
