authentik-client 2026.2.3

Making authentication simple.
Documentation
/*
 * authentik
 *
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.3
 * Contact: hello@goauthentik.io
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// AuthenticatedSessionGeoIp : Get GeoIP Data
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthenticatedSessionGeoIp {
    #[serde(rename = "continent", deserialize_with = "Option::deserialize")]
    pub continent: Option<String>,
    #[serde(rename = "country", deserialize_with = "Option::deserialize")]
    pub country: Option<String>,
    #[serde(rename = "lat", deserialize_with = "Option::deserialize")]
    pub lat: Option<f64>,
    #[serde(rename = "long", deserialize_with = "Option::deserialize")]
    pub long: Option<f64>,
    #[serde(rename = "city")]
    pub city: String,
}

impl AuthenticatedSessionGeoIp {
    /// Get GeoIP Data
    pub fn new(
        continent: Option<String>,
        country: Option<String>,
        lat: Option<f64>,
        long: Option<f64>,
        city: String,
    ) -> AuthenticatedSessionGeoIp {
        AuthenticatedSessionGeoIp {
            continent,
            country,
            lat,
            long,
            city,
        }
    }
}