Skip to main content

aws_lambda_events/event/documentdb/events/
invalidate_event.rs

1#[cfg(feature = "builders")]
2use bon::Builder;
3use serde::{Deserialize, Serialize};
4#[cfg(feature = "catch-all-fields")]
5use serde_json::Value;
6
7use super::commom_types::{DocumentId, Timestamp};
8
9#[non_exhaustive]
10#[cfg_attr(feature = "builders", derive(Builder))]
11#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
12#[serde(rename_all = "camelCase")]
13pub struct ChangeInvalidateEvent {
14    #[serde(rename = "_id")]
15    id: DocumentId,
16    #[serde(default)]
17    cluster_time: Option<Timestamp>,
18    // operation_type: String,
19    /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
20    /// Enabled with Cargo feature `catch-all-fields`.
21    /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
22    #[cfg(feature = "catch-all-fields")]
23    #[cfg_attr(docsrs, doc(cfg(feature = "catch-all-fields")))]
24    #[serde(flatten)]
25    #[cfg_attr(feature = "builders", builder(default))]
26    pub other: serde_json::Map<String, Value>,
27}