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

from __future__ import annotations
import dataclasses
from ..shared import columnfiltersettings as shared_columnfiltersettings
from ..shared import columnformatsettings as shared_columnformatsettings
from ..shared import columnordersettings as shared_columnordersettings
from ..shared import columnsortsettings as shared_columnsortsettings
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from enum import Enum
from typing import Optional

class TableViewSettingsViewMode(str, Enum):
    EVENT = 'event'
    TABLE = 'table'


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class TableViewSettings:
    show_column_totals: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('showColumnTotals') }})
    show_column_totals_pinned: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('showColumnTotalsPinned') }})
    show_row_numbers: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('showRowNumbers') }})
    show_row_totals: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('showRowTotals') }})
    show_row_totals_pinned: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('showRowTotalsPinned') }})
    view_mode: TableViewSettingsViewMode = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewMode') }})
    column_filter_settings: Optional[shared_columnfiltersettings.ColumnFilterSettings] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('columnFilterSettings'), 'exclude': lambda f: f is None }})
    column_format_settings: Optional[shared_columnformatsettings.ColumnFormatSettings] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('columnFormatSettings'), 'exclude': lambda f: f is None }})
    column_order_settings: Optional[shared_columnordersettings.ColumnOrderSettings] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('columnOrderSettings'), 'exclude': lambda f: f is None }})
    column_sort_settings: Optional[shared_columnsortsettings.ColumnSortSettings] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('columnSortSettings'), 'exclude': lambda f: f is None }})
    row_number_column_width: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rowNumberColumnWidth'), 'exclude': lambda f: f is None }})
    

