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

from typing import Literal, Union

from pydantic import Field

from .base_model import BaseModel
from .fragments import APIKeySelection, InvalidInputSelection


class ApiKeyCreate(BaseModel):
    api_key_create: Union["ApiKeyCreateApiKeyCreateAPIKeyCreated", "ApiKeyCreateApiKeyCreateInvalidInput"] = Field(
        alias="apiKeyCreate", discriminator="typename__"
    )


class ApiKeyCreateApiKeyCreateAPIKeyCreated(BaseModel):
    typename__: Literal["APIKeyCreated"] = Field(alias="__typename")
    api_key: "ApiKeyCreateApiKeyCreateAPIKeyCreatedApiKey" = Field(alias="apiKey")
    secret: str


class ApiKeyCreateApiKeyCreateAPIKeyCreatedApiKey(APIKeySelection):
    pass


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


ApiKeyCreate.model_rebuild()
ApiKeyCreateApiKeyCreateAPIKeyCreated.model_rebuild()
