"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .v3_incidents_incidentactions_circlecirebuildresponse import (
    V3IncidentsIncidentActionsCircleCIRebuildResponse,
    V3IncidentsIncidentActionsCircleCIRebuildResponseTypedDict,
)
from .v3_incidents_incidentactions_rebuildcircleciprojectrequest import (
    V3IncidentsIncidentActionsRebuildCircleCIProjectRequest,
    V3IncidentsIncidentActionsRebuildCircleCIProjectRequestTypedDict,
)
import pydantic
from squadcast_sdk.types import BaseModel
from squadcast_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class IncidentActionsRebuildAProjectInCircleciRequestTypedDict(TypedDict):
    incident_id: str
    build_number: str
    v3_incidents_incident_actions_rebuild_circle_ci_project_request: (
        V3IncidentsIncidentActionsRebuildCircleCIProjectRequestTypedDict
    )


class IncidentActionsRebuildAProjectInCircleciRequest(BaseModel):
    incident_id: Annotated[
        str,
        pydantic.Field(alias="incidentID"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]

    build_number: Annotated[
        str,
        pydantic.Field(alias="buildNumber"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]

    v3_incidents_incident_actions_rebuild_circle_ci_project_request: Annotated[
        V3IncidentsIncidentActionsRebuildCircleCIProjectRequest,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class IncidentActionsRebuildAProjectInCircleciMetaTypedDict(TypedDict):
    status_code: int


class IncidentActionsRebuildAProjectInCircleciMeta(BaseModel):
    status_code: int


class IncidentActionsRebuildAProjectInCircleciResponseTypedDict(TypedDict):
    r"""The request has succeeded."""

    data: V3IncidentsIncidentActionsCircleCIRebuildResponseTypedDict
    r"""Represents the response structure for rebuilding a project in CircleCI."""
    meta: NotRequired[IncidentActionsRebuildAProjectInCircleciMetaTypedDict]


class IncidentActionsRebuildAProjectInCircleciResponse(BaseModel):
    r"""The request has succeeded."""

    data: V3IncidentsIncidentActionsCircleCIRebuildResponse
    r"""Represents the response structure for rebuilding a project in CircleCI."""

    meta: Optional[IncidentActionsRebuildAProjectInCircleciMeta] = None
