"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

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


class Operator(str, Enum):
    r"""The type of filter you are performing - \\"is\\", \\"is not\\", \\"contains\\", \\"not contains\\", \\"greater than\\" """
    IS = 'is'
    IS_NOT = 'is not'
    CONTAINS = 'contains'
    NOT_CONTAINS = 'not contains'
    GREATER_THAN = 'greater than'


class Type(str, Enum):
    r"""The data type you are using - \\"string\\", \\"number\\", \\"boolean\\", \\"id\\" (for object ids)"""
    STRING = 'string'
    NUMBER = 'number'
    BOOLEAN = 'boolean'
    ID = 'id'


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class EventFilter:
    field: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('field'), 'exclude': lambda f: f is None }})
    r"""The field name that you are filtering by like `metadata.cost`, `inputs.chat_history.0.content`"""
    value: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('value'), 'exclude': lambda f: f is None }})
    r"""The value that you are filtering the field for"""
    operator: Optional[Operator] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('operator'), 'exclude': lambda f: f is None }})
    r"""The type of filter you are performing - \\"is\\", \\"is not\\", \\"contains\\", \\"not contains\\", \\"greater than\\" """
    type: Optional[Type] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
    r"""The data type you are using - \\"string\\", \\"number\\", \\"boolean\\", \\"id\\" (for object ids)"""
    

