authentik_rust/models/
authenticated_session_geo_ip.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// AuthenticatedSessionGeoIp : Get GeoIP Data
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AuthenticatedSessionGeoIp {
16    #[serde(rename = "continent")]
17    pub continent: String,
18    #[serde(rename = "country")]
19    pub country: String,
20    #[serde(rename = "lat")]
21    pub lat: f64,
22    #[serde(rename = "long")]
23    pub long: f64,
24    #[serde(rename = "city")]
25    pub city: String,
26}
27
28impl AuthenticatedSessionGeoIp {
29    /// Get GeoIP Data
30    pub fn new(continent: String, country: String, lat: f64, long: f64, city: String) -> AuthenticatedSessionGeoIp {
31        AuthenticatedSessionGeoIp {
32            continent,
33            country,
34            lat,
35            long,
36            city,
37        }
38    }
39}
40