# generated by datamodel-codegen:
#   filename:  processes.json

from __future__ import annotations

from pydantic import BaseModel, Extra, Field


class Process(BaseModel):
    """
    Process
    """

    class Config:
        extra = Extra.allow

    id: float = Field(..., description="ID")
    name: str = Field(..., description="Name")
    cpu_usage: float | None = Field(None, description="CPU usage percentage")
    created: float | None = Field(None, description="Created time (epoch)")
    memory_usage: float | None = Field(None, description="Memory usage percentage")
    path: str | None = Field(None, description="Path")
    status: str | None = Field(None, description="Status")
    username: str | None = Field(None, description="Username")
    working_directory: str | None = Field(None, description="Working directory")


class LastUpdated(BaseModel):
    """
    Last updated
    """

    count: float
    processes: float


class Processes(BaseModel):
    """
    Processes
    """

    id: str | None = Field(None, description="Event ID")
    count: float
    processes: list[Process] = Field(..., description="Processes")
    last_updated: LastUpdated | None = Field(None, description="Last updated")
