# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ShellSessionStats(UniversalBaseModel):
    """
    Shell session statistics model
    """

    total_sessions: int = pydantic.Field()
    """
    Total number of sessions
    """

    active_sessions: int = pydantic.Field()
    """
    Number of active sessions (used within last 5 minutes)
    """

    idle_sessions: int = pydantic.Field()
    """
    Number of idle sessions
    """

    max_sessions: int = pydantic.Field()
    """
    Maximum allowed sessions
    """

    session_timeout: int = pydantic.Field()
    """
    Session timeout in seconds
    """

    usage_ratio: float = pydantic.Field()
    """
    Session usage ratio (0.0 to 1.0)
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
