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

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Extra, Field


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

    class Config:
        extra = Extra.allow

    swap_total: float
    swap_used: float
    swap_free: float
    swap_percent: float
    swap_sin: float
    swap_sout: float
    virtual_total: float
    virtual_available: float
    virtual_percent: float
    virtual_used: float
    virtual_free: float


class Memory(BaseModel):
    """
    Memory
    """

    class Config:
        extra = Extra.allow

    id: Optional[str] = Field(None, description="Event ID")
    swap_total: int
    swap_used: int
    swap_free: float
    swap_percent: float
    swap_sin: int
    swap_sout: int
    virtual_total: int
    virtual_available: int
    virtual_percent: float
    virtual_used: int
    virtual_free: int
    last_updated: LastUpdated = Field(..., description="Last updated")
