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

from __future__ import annotations
import dataclasses
from ..shared import appmode as shared_appmode
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from typing import Optional



@dataclasses.dataclass
class MasterWorkerEntryInfoCriblConfig:
    pass


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class MasterWorkerEntryInfoCriblMaster:
    host: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('host') }})
    port: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('port') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class MasterWorkerEntryInfoCribl:
    config: MasterWorkerEntryInfoCriblConfig = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('config') }})
    dist_mode: shared_appmode.AppMode = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('distMode') }})
    group: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('group') }})
    guid: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid') }})
    start_time: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startTime') }})
    tags: list[str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tags') }})
    version: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version') }})
    master: Optional[MasterWorkerEntryInfoCriblMaster] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('master'), 'exclude': lambda f: f is None }})
    pid: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pid'), 'exclude': lambda f: f is None }})
    




@dataclasses.dataclass
class MasterWorkerEntryInfoEnv:
    pass


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class MasterWorkerEntryInfo:
    conn_ip: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('conn_ip') }})
    cpus: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('cpus') }})
    cribl: MasterWorkerEntryInfoCribl = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('cribl') }})
    env: MasterWorkerEntryInfoEnv = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('env') }})
    free_disk_space: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('freeDiskSpace') }})
    hostname: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hostname') }})
    node: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('node') }})
    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') }})
    total_disk_space: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiskSpace') }})
    totalmem: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalmem') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class MasterWorkerEntry:
    first_msg_time: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('firstMsgTime') }})
    group: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('group') }})
    id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
    info: MasterWorkerEntryInfo = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('info') }})
    last_msg_time: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastMsgTime') }})
    worker_processes: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('workerProcesses') }})
    deployable: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('deployable'), 'exclude': lambda f: f is None }})
    status: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
    type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
    

