fusionauth_rust_client/models/
event_info.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.60.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// EventInfo : Information about a user event (login, register, etc) that helps identify the source of the event (location, device type, OS, etc).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EventInfo {
17    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
18    pub data: Option<std::collections::HashMap<String, serde_json::Value>>,
19    #[serde(rename = "deviceDescription", skip_serializing_if = "Option::is_none")]
20    pub device_description: Option<String>,
21    #[serde(rename = "deviceName", skip_serializing_if = "Option::is_none")]
22    pub device_name: Option<String>,
23    #[serde(rename = "deviceType", skip_serializing_if = "Option::is_none")]
24    pub device_type: Option<String>,
25    #[serde(rename = "ipAddress", skip_serializing_if = "Option::is_none")]
26    pub ip_address: Option<String>,
27    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
28    pub location: Option<Box<models::Location>>,
29    #[serde(rename = "os", skip_serializing_if = "Option::is_none")]
30    pub os: Option<String>,
31    #[serde(rename = "userAgent", skip_serializing_if = "Option::is_none")]
32    pub user_agent: Option<String>,
33}
34
35impl EventInfo {
36    /// Information about a user event (login, register, etc) that helps identify the source of the event (location, device type, OS, etc).
37    pub fn new() -> EventInfo {
38        EventInfo {
39            data: None,
40            device_description: None,
41            device_name: None,
42            device_type: None,
43            ip_address: None,
44            location: None,
45            os: None,
46            user_agent: None,
47        }
48    }
49}
50