from attr import attrib
from attrs import field, define
from attrs.validators import instance_of, deep_iterable
from src.data_classes.parameters_general import GeneralParameters


@define
class DescriptiveAggregatedParameters(GeneralParameters):
    variables: list[str] = field(
        validator=deep_iterable(
            member_validator=instance_of(str), iterable_validator=instance_of(list)
        )
    )
    aggregation_function: str = field(validator=instance_of(str))
    group_by: str = attrib(validator=instance_of(str))
