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

from __future__ import annotations
import dataclasses
import requests as requests_http
from ..shared import events as shared_events
from ..shared import eventsearchcriteria as shared_eventsearchcriteria
from datetime import datetime
from typing import Optional



@dataclasses.dataclass
class SearchEventsRequest:
    cursor: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'cursor', 'style': 'form', 'explode': True }})
    event_search_criteria: Optional[shared_eventsearchcriteria.EventSearchCriteria] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
    limit: Optional[int] = dataclasses.field(default=20, metadata={'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': True }})
    timestamp_gt: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timestamp[gt]', 'style': 'form', 'explode': True }})
    timestamp_gte: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timestamp[gte]', 'style': 'form', 'explode': True }})
    timestamp_lt: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timestamp[lt]', 'style': 'form', 'explode': True }})
    timestamp_lte: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timestamp[lte]', 'style': 'form', 'explode': True }})
    




@dataclasses.dataclass
class SearchEventsResponse:
    content_type: str = dataclasses.field()
    r"""HTTP response content type for this operation"""
    status_code: int = dataclasses.field()
    r"""HTTP response status code for this operation"""
    events: Optional[shared_events.Events] = dataclasses.field(default=None)
    r"""OK"""
    raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
    r"""Raw HTTP response; suitable for custom response parsing"""
    

