aws_lambda_events/event/documentdb/events/
delete_event.rs

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