# Generated by ariadne-codegen
# Source: listssrht/graphql/

from typing import Optional

from pydantic import Field

from .base_model import BaseModel


class GetPatchsetThreadBlocks(BaseModel):
    patchset: Optional["GetPatchsetThreadBlocksPatchset"]


class GetPatchsetThreadBlocksPatchset(BaseModel):
    thread: "GetPatchsetThreadBlocksPatchsetThread"


class GetPatchsetThreadBlocksPatchsetThread(BaseModel):
    blocks: list["GetPatchsetThreadBlocksPatchsetThreadBlocks"]


class GetPatchsetThreadBlocksPatchsetThreadBlocks(BaseModel):
    key: str
    source: "GetPatchsetThreadBlocksPatchsetThreadBlocksSource"
    source_range: "GetPatchsetThreadBlocksPatchsetThreadBlocksSourceRange" = Field(
        alias="sourceRange"
    )
    parent_range: Optional["GetPatchsetThreadBlocksPatchsetThreadBlocksParentRange"] = (
        Field(alias="parentRange")
    )


class GetPatchsetThreadBlocksPatchsetThreadBlocksSource(BaseModel):
    id: int


class GetPatchsetThreadBlocksPatchsetThreadBlocksSourceRange(BaseModel):
    start: int
    end: int


class GetPatchsetThreadBlocksPatchsetThreadBlocksParentRange(BaseModel):
    start: int
    end: int


GetPatchsetThreadBlocks.model_rebuild()
GetPatchsetThreadBlocksPatchset.model_rebuild()
GetPatchsetThreadBlocksPatchsetThread.model_rebuild()
GetPatchsetThreadBlocksPatchsetThreadBlocks.model_rebuild()
