from typing import Union

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


@define
class DescriptivePercentageOfDatasetUnderConditionParameters(GeneralParameters):
    variable: str = field(validator=instance_of(str))
    comparison: str = field(validator=instance_of(str))
    condition: Union[int, float] = field(validator=instance_of((int, float)))
