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

from __future__ import annotations
import dataclasses
from ..shared import axis as shared_axis
from ..shared import chartseries as shared_chartseries
from ..shared import legend as shared_legend
from ..shared import settings as shared_settings
from ..shared import singlevalue as shared_singlevalue
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class ChartConfigAxis:
    x_axis: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('xAxis'), 'exclude': lambda f: f is None }})
    y_axis: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('yAxis'), 'exclude': lambda f: f is None }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class ChartConfig:
    single_value: shared_singlevalue.SingleValue = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('singleValue') }})
    axis: Optional[ChartConfigAxis] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('axis'), 'exclude': lambda f: f is None }})
    legend: Optional[shared_legend.Legend] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('legend'), 'exclude': lambda f: f is None }})
    series: Optional[list[shared_chartseries.ChartSeries]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('series'), 'exclude': lambda f: f is None }})
    settings: Optional[shared_settings.Settings] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('settings'), 'exclude': lambda f: f is None }})
    x_axis: Optional[shared_axis.Axis] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('xAxis'), 'exclude': lambda f: f is None }})
    

