"""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 authconfig as shared_authconfig
from ..shared import gitsettings as shared_gitsettings
from ..shared import jobsettings as shared_jobsettings
from ..shared import limits as shared_limits
from ..shared import rediscachelimits as shared_rediscachelimits
from ..shared import searchsettings as shared_searchsettings
from ..shared import serviceslimits as shared_serviceslimits
from ..shared import upgradegroupsettings as shared_upgradegroupsettings
from ..shared import upgradesettings as shared_upgradesettings
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from typing import Optional



@dataclasses.dataclass
class SystemSettingsAPIHeaders:
    pass


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsAPISsl:
    cert_path: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('certPath') }})
    disabled: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('disabled') }})
    passphrase: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('passphrase') }})
    priv_key_path: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('privKeyPath') }})
    ca_path: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('caPath'), 'exclude': lambda f: f is None }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsAPI:
    disabled: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('disabled') }})
    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') }})
    ssl: SystemSettingsAPISsl = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ssl') }})
    worker_remote_access: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('workerRemoteAccess') }})
    base_url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('baseUrl'), 'exclude': lambda f: f is None }})
    disable_api_cache: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('disableApiCache'), 'exclude': lambda f: f is None }})
    headers: Optional[SystemSettingsAPIHeaders] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('headers'), 'exclude': lambda f: f is None }})
    idle_session_ttl: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('idleSessionTTL'), 'exclude': lambda f: f is None }})
    login_rate_limit: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('loginRateLimit'), 'exclude': lambda f: f is None }})
    sso_rate_limit: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ssoRateLimit'), 'exclude': lambda f: f is None }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsBackups:
    backup_persistence: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('backupPersistence') }})
    backups_directory: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('backupsDirectory') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsCustomLogo:
    enabled: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enabled') }})
    logo_description: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('logoDescription') }})
    logo_image: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('logoImage') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsDistributed:
    mode: shared_appmode.AppMode = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mode') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsProxy:
    use_env_vars: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('useEnvVars') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsRollback:
    rollback_enabled: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rollbackEnabled') }})
    rollback_retries: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rollbackRetries'), 'exclude': lambda f: f is None }})
    rollback_timeout: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rollbackTimeout'), 'exclude': lambda f: f is None }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsShutdown:
    drain_timeout: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('drainTimeout') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsSystem:
    intercom: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('intercom') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsTLS:
    default_cipher_list: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultCipherList') }})
    default_ecdh_curve: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultEcdhCurve') }})
    max_version: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maxVersion') }})
    min_version: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('minVersion') }})
    reject_unauthorized: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rejectUnauthorized') }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettingsWorkers:
    count: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('count') }})
    memory: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('memory') }})
    minimum: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('minimum') }})
    load_throttle_perc: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('loadThrottlePerc'), 'exclude': lambda f: f is None }})
    startup_max_conns: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startupMaxConns'), 'exclude': lambda f: f is None }})
    startup_throttle_timeout: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startupThrottleTimeout'), 'exclude': lambda f: f is None }})
    v8_single_thread: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('v8SingleThread'), 'exclude': lambda f: f is None }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SystemSettings:
    r"""a list of SystemSettings objects"""
    api: SystemSettingsAPI = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('api') }})
    auth: shared_authconfig.AuthConfig = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('auth') }})
    backups: SystemSettingsBackups = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('backups') }})
    custom_logo: SystemSettingsCustomLogo = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customLogo') }})
    distributed: SystemSettingsDistributed = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('distributed') }})
    git: shared_gitsettings.GitSettings = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('git') }})
    job_limits: shared_jobsettings.JobSettings = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('jobLimits') }})
    limits: shared_limits.Limits = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('limits') }})
    proxy: SystemSettingsProxy = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('proxy') }})
    redis_cache_limits: shared_rediscachelimits.RedisCacheLimits = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('redisCacheLimits') }})
    rollback: SystemSettingsRollback = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rollback') }})
    search_limits: shared_searchsettings.SearchSettings = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('searchLimits') }})
    services_limits: shared_serviceslimits.ServicesLimits = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('servicesLimits') }})
    shutdown: SystemSettingsShutdown = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('shutdown') }})
    system: SystemSettingsSystem = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('system') }})
    tls: SystemSettingsTLS = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tls') }})
    upgrade_group_settings: shared_upgradegroupsettings.UpgradeGroupSettings = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('upgradeGroupSettings') }})
    upgrade_settings: shared_upgradesettings.UpgradeSettings = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('upgradeSettings') }})
    workers: SystemSettingsWorkers = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('workers') }})
    

