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

from __future__ import annotations
from censys_platform.types import BaseModel
from datetime import datetime
from enum import Enum
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class NewStatus(str, Enum):
    ACTIVE = "active"
    POPULATING = "populating"
    PAUSED = "paused"
    ARCHIVED = "archived"


class OldStatus(str, Enum):
    ACTIVE = "active"
    POPULATING = "populating"
    PAUSED = "paused"
    ARCHIVED = "archived"


class EventStatusChangeTypedDict(TypedDict):
    event_time: datetime
    new_status: NewStatus
    old_status: NotRequired[OldStatus]
    reason: NotRequired[str]


class EventStatusChange(BaseModel):
    event_time: datetime

    new_status: NewStatus

    old_status: Optional[OldStatus] = None

    reason: Optional[str] = None
