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

from typing import List, Literal, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import ConnectionType


class GetConnection(BaseModel):
    connection_by_slug: Optional["GetConnectionConnectionBySlug"] = Field(
        alias="connectionBySlug"
    )


class GetConnectionConnectionBySlug(BaseModel):
    typename__: Literal[
        "Connection",
        "CustomConnection",
        "DHIS2Connection",
        "GCSConnection",
        "IASOConnection",
        "PostgreSQLConnection",
        "S3Connection",
    ] = Field(alias="__typename")
    type: ConnectionType
    fields: List["GetConnectionConnectionBySlugFields"]


class GetConnectionConnectionBySlugFields(BaseModel):
    code: str
    value: Optional[str]


GetConnection.model_rebuild()
GetConnectionConnectionBySlug.model_rebuild()
