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

from typing import Annotated, List, Literal, Union

from pydantic import Field

from .base_model import BaseModel
from .fragments import ManagedRoleSelection, UnmanagedRoleSelection


class RolesList(BaseModel):
    roles: List[
        Annotated[
            Union["RolesListRolesUnmanagedRole", "RolesListRolesManagedRole"],
            Field(discriminator="typename__"),
        ]
    ]


class RolesListRolesUnmanagedRole(UnmanagedRoleSelection):
    typename__: Literal["UnmanagedRole"] = Field(alias="__typename")


class RolesListRolesManagedRole(ManagedRoleSelection):
    typename__: Literal["ManagedRole"] = Field(alias="__typename")


RolesList.model_rebuild()
