"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from ..shared import appmode as shared_appmode
from ..shared import bulletinmessage as shared_bulletinmessage
from ..shared import licenseinfo as shared_licenseinfo
from ..shared import systemconf as shared_systemconf
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from typing import Any, Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfoConf:
    inputs: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('inputs') }})
    outputs: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('outputs') }})
    pipelines: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pipelines') }})
    routes: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('routes') }})
    rules: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rules') }})
    conf_version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('confVersion'), 'exclude': lambda f: f is None }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfoCpus:
    model: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('model') }})
    speed: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('speed') }})
    times: dict[str, Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('times') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfoDiskUsage:
    bytes_available: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bytesAvailable') }})
    bytes_used: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bytesUsed') }})
    disk_path: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('diskPath') }})
    total_disk_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiskSize') }})
    




@dataclasses.dataclass
class SystemInfoEnv:
    pass


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfoLimitsSamples:
    max_size: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maxSize') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfoLimits:
    samples: SystemInfoLimitsSamples = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('samples') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfoMemory:
    free: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('free') }})
    total: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('total') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfoOs:
    arch: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('arch') }})
    endianness: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('endianness') }})
    platform: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform') }})
    release: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('release') }})
    type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemInfo:
    api_port: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('apiPort') }})
    build: dict[str, Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('BUILD') }})
    conf: SystemInfoConf = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('conf') }})
    config_path: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('configPath') }})
    cpus: list[SystemInfoCpus] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('cpus') }})
    disk_usage: SystemInfoDiskUsage = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('diskUsage') }})
    dist_mode: shared_appmode.AppMode = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('distMode') }})
    env: SystemInfoEnv = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('env') }})
    guid: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid') }})
    hostname: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hostname') }})
    install_path: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('installPath') }})
    license: shared_licenseinfo.LicenseInfo = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('license') }})
    limits: SystemInfoLimits = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('limits') }})
    loadavg: list[int] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('loadavg') }})
    memory: SystemInfoMemory = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('memory') }})
    messages: list[shared_bulletinmessage.BulletinMessage] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('messages') }})
    net: dict[str, Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('net') }})
    os: SystemInfoOs = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('os') }})
    system_conf: shared_systemconf.SystemConf = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('systemConf') }})
    uptime: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('uptime') }})
    version: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version') }})
    worker_processes: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('workerProcesses') }})
    

