# 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 CreateConnectionError


class CreateConnection(BaseModel):
    create_connection: "CreateConnectionCreateConnection" = Field(
        alias="createConnection"
    )


class CreateConnectionCreateConnection(BaseModel):
    success: bool
    connection: Optional["CreateConnectionCreateConnectionConnection"]
    errors: List[CreateConnectionError]


class CreateConnectionCreateConnectionConnection(BaseModel):
    typename__: Literal[
        "Connection",
        "CustomConnection",
        "DHIS2Connection",
        "GCSConnection",
        "IASOConnection",
        "PostgreSQLConnection",
        "S3Connection",
    ] = Field(alias="__typename")
    id: str
    name: str


CreateConnection.model_rebuild()
CreateConnectionCreateConnection.model_rebuild()
