Skip to main content

asana/model/
audit_log_event_context.rs

1use serde::{Serialize, Deserialize};
2///The context from which this event originated.
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct AuditLogEventContext {
5    /**The authentication method used in the context of an API request.
6Only present if the `context_type` is `api`. Can be one of `cookie`, `oauth`, `personal_access_token`, or `service_account`.*/
7    pub api_authentication_method: String,
8    ///The IP address of the client that initiated the event, if applicable.
9    pub client_ip_address: String,
10    /**The type of context.
11Can be one of `web`, `desktop`, `mobile`, `asana_support`, `asana`, `email`, or `api`.*/
12    pub context_type: String,
13    /**The name of the OAuth App that initiated the event.
14Only present if the `api_authentication_method` is `oauth`.*/
15    pub oauth_app_name: String,
16    ///The user agent of the client that initiated the event, if applicable.
17    pub user_agent: String,
18}
19impl std::fmt::Display for AuditLogEventContext {
20    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
21        write!(f, "{}", serde_json::to_string(self).unwrap())
22    }
23}