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

from __future__ import annotations
import dataclasses
import requests as requests_http
from ..shared import event as shared_event
from ..shared import ingestionresponse as shared_ingestionresponse
from ..shared import requestvalidationerror as shared_requestvalidationerror
from dataclasses_json import Undefined, dataclass_json
from orb import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class IngestRequestBody:
    events: Optional[list[shared_event.Event]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('events'), 'exclude': lambda f: f is None }})
    




@dataclasses.dataclass
class IngestRequest:
    request_body: IngestRequestBody = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }})
    backfill_id: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'backfill_id', 'style': 'form', 'explode': True }})
    r"""If this ingestion request is part of a backfill, this parameter ties the ingested events to the backfill"""
    debug: Optional[bool] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'debug', 'style': 'form', 'explode': True }})
    r"""Flag to enable additional debug information in the endpoint response"""
    




@dataclasses.dataclass
class IngestResponse:
    content_type: str = dataclasses.field()
    status_code: int = dataclasses.field()
    ingestion_response: Optional[shared_ingestionresponse.IngestionResponse] = dataclasses.field(default=None)
    r"""OK"""
    raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
    request_validation_error: Optional[shared_requestvalidationerror.RequestValidationError] = dataclasses.field(default=None)
    r"""Bad Request"""
    

