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

from __future__ import annotations
import pydantic
from squadcast_sdk.types import BaseModel
from typing_extensions import Annotated, TypedDict


class BuildParametersTypedDict(TypedDict):
    circle_job: str


class BuildParameters(BaseModel):
    circle_job: Annotated[str, pydantic.Field(alias="CIRCLE_JOB")]


class PreviousTypedDict(TypedDict):
    build_num: int
    build_time_millis: int
    status: str


class Previous(BaseModel):
    build_num: int

    build_time_millis: int

    status: str


class PreviousSuccessfulBuildTypedDict(TypedDict):
    build_num: int
    build_time_millis: int
    status: str


class PreviousSuccessfulBuild(BaseModel):
    build_num: int

    build_time_millis: int

    status: str


class CircleciResponseTypedDict(TypedDict):
    username: str
    reponame: str
    build_num: int
    build_url: str
    build_parameters: BuildParametersTypedDict
    previous: PreviousTypedDict
    previous_successful_build: PreviousSuccessfulBuildTypedDict
    retry_of: int
    body: str
    subject: str
    status: str
    lifecycle: str
    outcome: str
    committer_date: str
    committer_email: str
    committer_name: str
    author_date: str
    author_email: str
    author_name: str
    branch: str
    vcs_type: str
    vcs_url: str
    start_time: str
    stop_time: str


class CircleciResponse(BaseModel):
    username: str

    reponame: str

    build_num: int

    build_url: str

    build_parameters: BuildParameters

    previous: Previous

    previous_successful_build: PreviousSuccessfulBuild

    retry_of: int

    body: str

    subject: str

    status: str

    lifecycle: str

    outcome: str

    committer_date: str

    committer_email: str

    committer_name: str

    author_date: str

    author_email: str

    author_name: str

    branch: str

    vcs_type: str

    vcs_url: str

    start_time: str

    stop_time: str


class V3IncidentsIncidentActionsCircleCIRebuildResponseTypedDict(TypedDict):
    r"""Represents the response structure for rebuilding a project in CircleCI."""

    action_id: str
    circleci_response: CircleciResponseTypedDict


class V3IncidentsIncidentActionsCircleCIRebuildResponse(BaseModel):
    r"""Represents the response structure for rebuilding a project in CircleCI."""

    action_id: str

    circleci_response: CircleciResponse
