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

from typing import List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import CreatePipelineTemplateVersionError


class CreatePipelineTemplateVersion(BaseModel):
    create_pipeline_template_version: (
        "CreatePipelineTemplateVersionCreatePipelineTemplateVersion"
    ) = Field(alias="createPipelineTemplateVersion")


class CreatePipelineTemplateVersionCreatePipelineTemplateVersion(BaseModel):
    success: bool
    errors: Optional[List[CreatePipelineTemplateVersionError]]
    pipeline_template: Optional[
        "CreatePipelineTemplateVersionCreatePipelineTemplateVersionPipelineTemplate"
    ] = Field(alias="pipelineTemplate")


class CreatePipelineTemplateVersionCreatePipelineTemplateVersionPipelineTemplate(
    BaseModel
):
    name: str
    code: str


CreatePipelineTemplateVersion.model_rebuild()
CreatePipelineTemplateVersionCreatePipelineTemplateVersion.model_rebuild()
