authentik_rust/models/
authenticated_session_geo_ip.rs1use crate::models;
12
13#[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 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