/*
* Santati
*
* Santati's HTTP API. Operations under `/api/v0/` take a team API key in `Authorization: Api-Key <key>`; a missing, invalid or under-scoped key is answered with `403`, never `401`. Errors on `/api/v0/` use one of three bodies: `ErrorDetail` (`{\"detail\": ...}`), `FieldErrors` (messages keyed by request field) or `ErrorEnvelope` (`{\"error\": {\"code\", \"message\", \"field\"}}`, returned by event ingestion and log stream quota checks). Lists on `/api/v0/` are cursor-paginated: follow `next` until it is `null`.
*
* The version of the OpenAPI document: 0.3.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// EventBatchRequest : Documentation-only shape of a batch ingest request: ``{\"events\": [...]}``. One request may carry at most `MAX_EVENTS_PER_BATCH` envelopes; the whole body is capped at 1 MiB.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EventBatchRequest {
/// One to 500 envelopes, indexed in order.
#[serde(rename = "events")]
pub events: Vec<models::EventEnvelopeRequest>,
}
impl EventBatchRequest {
/// Documentation-only shape of a batch ingest request: ``{\"events\": [...]}``. One request may carry at most `MAX_EVENTS_PER_BATCH` envelopes; the whole body is capped at 1 MiB.
pub fn new(events: Vec<models::EventEnvelopeRequest>) -> EventBatchRequest {
EventBatchRequest {
events,
}
}
}