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

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import PipelineType


class GetWorkspacePipelines(BaseModel):
    pipelines: "GetWorkspacePipelinesPipelines"


class GetWorkspacePipelinesPipelines(BaseModel):
    total_pages: int = Field(alias="totalPages")
    items: List["GetWorkspacePipelinesPipelinesItems"]


class GetWorkspacePipelinesPipelinesItems(BaseModel):
    id: Any
    code: str
    name: Optional[str]
    type: PipelineType
    current_version: Optional["GetWorkspacePipelinesPipelinesItemsCurrentVersion"] = (
        Field(alias="currentVersion")
    )


class GetWorkspacePipelinesPipelinesItemsCurrentVersion(BaseModel):
    id: Any
    name: Optional[str]
    version_number: int = Field(alias="versionNumber")


GetWorkspacePipelines.model_rebuild()
GetWorkspacePipelinesPipelines.model_rebuild()
GetWorkspacePipelinesPipelinesItems.model_rebuild()
