# 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 UsersSetEmail(BaseModel):
    admin: "UsersSetEmailAdmin"


class UsersSetEmailAdmin(BaseModel):
    user: "UsersSetEmailAdminUser"


class UsersSetEmailAdminUser(BaseModel):
    mutate: Optional["UsersSetEmailAdminUserMutate"]


class UsersSetEmailAdminUserMutate(BaseModel):
    set_email: Union[
        "UsersSetEmailAdminUserMutateSetEmailUser",
        "UsersSetEmailAdminUserMutateSetEmailInvalidInput",
        "UsersSetEmailAdminUserMutateSetEmailOperationError",
    ] = Field(alias="setEmail", discriminator="typename__")


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


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


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


UsersSetEmail.model_rebuild()
UsersSetEmailAdmin.model_rebuild()
UsersSetEmailAdminUser.model_rebuild()
UsersSetEmailAdminUserMutate.model_rebuild()
