# Auto-generated by DjangoCFG - see CLAUDE.md

from __future__ import annotations
import datetime
from typing import Any

from pydantic import BaseModel, ConfigDict, Field


class QueueStats(BaseModel):
    """
    Queue statistics serializer. Provides basic queue statistics.

    Response model (includes read-only fields).
    """

    model_config = ConfigDict(
        validate_assignment=True,
        extra="allow",
        frozen=False,
    )

    name: str = Field(description='Queue name')
    count: int = Field(description='Total jobs in queue')
    queued_jobs: int | None = Field(None, description='Jobs waiting to be processed')
    started_jobs: int | None = Field(None, description='Jobs currently being processed')
    finished_jobs: int | None = Field(None, description='Completed jobs')
    failed_jobs: int | None = Field(None, description='Failed jobs')
    deferred_jobs: int | None = Field(None, description='Deferred jobs')
    scheduled_jobs: int | None = Field(None, description='Scheduled jobs')
    workers: int | None = Field(None, description='Number of workers for this queue')



class QueueDetail(BaseModel):
    """
    Detailed queue information serializer. Provides comprehensive queue
    statistics and metadata.

    Response model (includes read-only fields).
    """

    model_config = ConfigDict(
        validate_assignment=True,
        extra="allow",
        frozen=False,
    )

    name: str = Field(description='Queue name')
    count: int = Field(description='Total jobs in queue')
    queued_jobs: int | None = Field(None, description='Jobs waiting to be processed')
    started_jobs: int | None = Field(None, description='Jobs currently being processed')
    finished_jobs: int | None = Field(None, description='Completed jobs')
    failed_jobs: int | None = Field(None, description='Failed jobs')
    deferred_jobs: int | None = Field(None, description='Deferred jobs')
    scheduled_jobs: int | None = Field(None, description='Scheduled jobs')
    workers: int | None = Field(None, description='Number of workers for this queue')
    oldest_job_timestamp: datetime.datetime | None = Field(
    None,
    description='Timestamp of oldest job in queue',
)
    connection_kwargs: dict[str, Any] | None = Field(
    None,
    description='Redis connection parameters',
)
    is_async: bool | None = Field(None, description='Queue is in async mode')



