# Code generated by sqlc. DO NOT EDIT.
# versions:
#   sqlc v1.29.0
import dataclasses
import datetime
from typing import Any, List, Optional
import uuid


@dataclasses.dataclass()
class HypeCronJob:
    jobid: int
    schedule: Optional[str]
    command_type: Any
    command_params: Any
    active: bool
    jobname: str
    activated_at: Optional[datetime.datetime]
    scheduled_jobs_confirmed_until: Optional[datetime.datetime]
    should_backfill: Optional[bool]


@dataclasses.dataclass()
class HypeCronJobRunDetail:
    jobid: int
    runid: int
    command_type: Any
    command_params: Any
    status: Optional[Any]
    schedule_time: datetime.datetime
    start_time: Optional[datetime.datetime]
    end_time: Optional[datetime.datetime]


@dataclasses.dataclass()
class HyrexApp:
    id: int
    app_info: Optional[Any]


@dataclasses.dataclass()
class HyrexCronJob:
    jobid: int
    schedule: Optional[str]
    command: str
    active: bool
    jobname: str
    job_source: Any
    activated_at: Optional[datetime.datetime]
    scheduled_jobs_confirmed_until: Optional[datetime.datetime]
    should_backfill: Optional[bool]


@dataclasses.dataclass()
class HyrexCronJobRunDetail:
    jobid: int
    runid: int
    command: str
    status: Optional[Any]
    schedule_time: datetime.datetime
    start_time: Optional[datetime.datetime]
    end_time: Optional[datetime.datetime]


@dataclasses.dataclass()
class HyrexExecutor:
    id: uuid.UUID
    name: str
    worker_name: str
    queue_pattern: str
    queues: List[str]
    started: Optional[datetime.datetime]
    stopped: Optional[datetime.datetime]
    last_heartbeat: Optional[datetime.datetime]
    stats: Optional[Any]
    status: Any


@dataclasses.dataclass()
class HyrexKv:
    key: str
    value: str
    created_at: datetime.datetime


@dataclasses.dataclass()
class HyrexSchedulerLock:
    lockid: int
    worker_name: str
    acquired_at: datetime.datetime
    heartbeat_at: datetime.datetime
    release_at: datetime.datetime
    is_active: bool


@dataclasses.dataclass()
class HyrexStatsTaskStatusCount:
    timepoint: datetime.datetime
    queued: Optional[int]
    running: Optional[int]
    waiting: Optional[int]
    failed: Optional[int]
    success: Optional[int]
    lost: Optional[int]
    total: Optional[int]
    queued_delta: Optional[int]
    success_delta: Optional[int]
    failed_delta: Optional[int]
    lost_delta: Optional[int]


@dataclasses.dataclass()
class HyrexSystemLog:
    id: uuid.UUID
    timestamp: Optional[datetime.datetime]
    event_name: str
    event_body: Any


@dataclasses.dataclass()
class HyrexTaskDef:
    task_name: str
    cron_expr: Optional[str]
    source_code: Optional[str]
    arg_schema: Optional[Any]
    queue: Optional[str]
    priority: Optional[int]
    max_retries: Optional[int]
    timeout_seconds: Optional[int]
    last_updated: Optional[datetime.datetime]


@dataclasses.dataclass()
class HyrexTaskResult:
    task_id: uuid.UUID
    result: Optional[Any]
    created_at: Optional[datetime.datetime]


@dataclasses.dataclass()
class HyrexTaskRun:
    id: uuid.UUID
    durable_id: uuid.UUID
    root_id: uuid.UUID
    parent_id: Optional[uuid.UUID]
    workflow_run_id: Optional[uuid.UUID]
    workflow_dependencies: Optional[List[uuid.UUID]]
    task_name: str
    args: Any
    queue: str
    max_retries: int
    priority: int
    timeout_seconds: Optional[int]
    status: Any
    attempt_number: int
    scheduled_start: Optional[datetime.datetime]
    executor_id: Optional[uuid.UUID]
    queued: Optional[datetime.datetime]
    started: Optional[datetime.datetime]
    finished: Optional[datetime.datetime]
    last_heartbeat: Optional[datetime.datetime]
    idempotency_key: Optional[str]
    log_link: Optional[str]


@dataclasses.dataclass()
class HyrexWorkflow:
    workflow_name: str
    cron_expr: Optional[str]
    source_code: Optional[str]
    dag_structure: Optional[Any]
    last_updated: Optional[datetime.datetime]


@dataclasses.dataclass()
class HyrexWorkflowRun:
    id: uuid.UUID
    parent_id: Optional[uuid.UUID]
    workflow_name: str
    args: Any
    queue: str
    timeout_seconds: Optional[int]
    status: Any
    scheduled_start: Optional[datetime.datetime]
    queued: Optional[datetime.datetime]
    started: Optional[datetime.datetime]
    finished: Optional[datetime.datetime]
    last_heartbeat: Optional[datetime.datetime]
    idempotency_key: Optional[str]
