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

from __future__ import annotations
import dataclasses
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from enum import Enum
from typing import Optional

class AuthConfigType(str, Enum):
    SPLUNK = 'splunk'
    LOCAL = 'local'
    LDAP = 'ldap'
    OPENID = 'openid'
    SAML = 'saml'


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class AuthConfig:
    fallback: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fallback') }})
    fallback_bad_login: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fallbackBadLogin') }})
    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: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ssl') }})
    type: AuthConfigType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
    can_change_password: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canChangePassword'), 'exclude': lambda f: f is None }})
    filter_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter_type'), 'exclude': lambda f: f is None }})
    

