clerk_fapi_rs/models/
client_session_activity.rs

1/*
2 * Clerk Frontend API
3 *
4 * The Clerk REST Frontend API, meant to be accessed from a browser or native environment.  This is a Form Based API and all the data must be sent and formatted according to the `application/x-www-form-urlencoded` content type.  ### Versions  When the API changes in a way that isn't compatible with older versions, a new version is released. Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview).  ### Using the Try It Console  The `Try It` feature of the docs only works for **Development Instances** when using the `DevBrowser` security scheme. To use it, first generate a dev instance token from the `/v1/dev_browser` endpoint.  Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClientSessionActivity {
16    #[serde(rename = "object")]
17    pub object: String,
18    #[serde(rename = "id")]
19    pub id: String,
20    #[serde(rename = "device_type", skip_serializing_if = "Option::is_none")]
21    pub device_type: Option<String>,
22    #[serde(rename = "is_mobile")]
23    pub is_mobile: bool,
24    #[serde(rename = "browser_name", skip_serializing_if = "Option::is_none")]
25    pub browser_name: Option<String>,
26    #[serde(rename = "browser_version", skip_serializing_if = "Option::is_none")]
27    pub browser_version: Option<String>,
28    #[serde(rename = "ip_address", skip_serializing_if = "Option::is_none")]
29    pub ip_address: Option<String>,
30    #[serde(rename = "city", skip_serializing_if = "Option::is_none")]
31    pub city: Option<String>,
32    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
33    pub country: Option<String>,
34}
35
36impl ClientSessionActivity {
37    pub fn new(object: String, id: String, is_mobile: bool) -> ClientSessionActivity {
38        ClientSessionActivity {
39            object,
40            id,
41            device_type: None,
42            is_mobile,
43            browser_name: None,
44            browser_version: None,
45            ip_address: None,
46            city: None,
47            country: None,
48        }
49    }
50}