Skip to main content

aws_lambda_events/event/documentdb/events/
delete_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::{AnyDocument, DatabaseCollection, DocumentId, DocumentKeyId, 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 ChangeDeleteEvent {
14    #[serde(rename = "_id")]
15    id: DocumentId,
16    #[serde(default)]
17    cluster_time: Option<Timestamp>,
18    document_key: DocumentKeyId,
19    #[serde(default)]
20    #[serde(rename = "lsid")]
21    ls_id: Option<AnyDocument>,
22    ns: DatabaseCollection,
23    // operation_type: String,
24    #[serde(default)]
25    txn_number: Option<String>,
26    /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
27    /// Enabled with Cargo feature `catch-all-fields`.
28    /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
29    #[cfg(feature = "catch-all-fields")]
30    #[cfg_attr(docsrs, doc(cfg(feature = "catch-all-fields")))]
31    #[serde(flatten)]
32    #[cfg_attr(feature = "builders", builder(default))]
33    pub other: serde_json::Map<String, Value>,
34}