Skip to main content

authentik_client/models/
authenticated_session_geo_ip.rs

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