Skip to main content

aws_lambda_events/event/cloudwatch_events/
signin.rs

1#[cfg(feature = "builders")]
2use bon::Builder;
3use serde::{Deserialize, Serialize};
4use serde_json::Value;
5
6#[non_exhaustive]
7#[cfg_attr(feature = "builders", derive(Builder))]
8#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
9#[serde(rename_all = "camelCase")]
10pub struct SignIn {
11    pub event_version: String,
12    pub user_identity: UserIdentity,
13    pub event_time: String,
14    pub event_source: String,
15    pub event_name: String,
16    pub aws_region: String,
17    #[serde(rename = "sourceIPAddress")]
18    pub source_ipaddress: String,
19    pub user_agent: String,
20    pub request_parameters: Value,
21    pub response_elements: ResponseElements,
22    pub additional_event_data: AdditionalEventData,
23    #[serde(rename = "eventID")]
24    pub event_id: String,
25    pub event_type: 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}
35
36#[non_exhaustive]
37#[cfg_attr(feature = "builders", derive(Builder))]
38#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
39#[serde(rename_all = "camelCase")]
40pub struct UserIdentity {
41    pub r#type: String,
42    pub principal_id: String,
43    pub arn: String,
44    pub account_id: String,
45    /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
46    /// Enabled with Cargo feature `catch-all-fields`.
47    /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
48    #[cfg(feature = "catch-all-fields")]
49    #[cfg_attr(docsrs, doc(cfg(feature = "catch-all-fields")))]
50    #[serde(flatten)]
51    #[cfg_attr(feature = "builders", builder(default))]
52    pub other: serde_json::Map<String, Value>,
53}
54
55#[non_exhaustive]
56#[cfg_attr(feature = "builders", derive(Builder))]
57#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
58#[serde(rename_all = "camelCase")]
59pub struct ResponseElements {
60    #[serde(rename = "ConsoleLogin")]
61    pub console_login: String,
62    /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
63    /// Enabled with Cargo feature `catch-all-fields`.
64    /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
65    #[cfg(feature = "catch-all-fields")]
66    #[cfg_attr(docsrs, doc(cfg(feature = "catch-all-fields")))]
67    #[serde(flatten)]
68    #[cfg_attr(feature = "builders", builder(default))]
69    pub other: serde_json::Map<String, Value>,
70}
71
72#[non_exhaustive]
73#[cfg_attr(feature = "builders", derive(Builder))]
74#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
75#[serde(rename_all = "camelCase")]
76pub struct AdditionalEventData {
77    #[serde(rename = "LoginTo")]
78    pub login_to: String,
79    #[serde(rename = "MobileVersion")]
80    pub mobile_version: String,
81    #[serde(rename = "MFAUsed")]
82    pub mfaused: String,
83    /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
84    /// Enabled with Cargo feature `catch-all-fields`.
85    /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
86    #[cfg(feature = "catch-all-fields")]
87    #[cfg_attr(docsrs, doc(cfg(feature = "catch-all-fields")))]
88    #[serde(flatten)]
89    #[cfg_attr(feature = "builders", builder(default))]
90    pub other: serde_json::Map<String, Value>,
91}