authentik-client 2026.2.2-rc2

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

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeviceConnection {
    #[serde(rename = "device")]
    pub device: uuid::Uuid,
    #[serde(rename = "connector")]
    pub connector: uuid::Uuid,
    #[serde(rename = "connector_obj")]
    pub connector_obj: models::Connector,
    #[serde(rename = "latest_snapshot", deserialize_with = "Option::deserialize")]
    pub latest_snapshot: Option<models::DeviceFactSnapshot>,
}

impl DeviceConnection {
    pub fn new(
        device: uuid::Uuid,
        connector: uuid::Uuid,
        connector_obj: models::Connector,
        latest_snapshot: Option<models::DeviceFactSnapshot>,
    ) -> DeviceConnection {
        DeviceConnection {
            device,
            connector,
            connector_obj,
            latest_snapshot,
        }
    }
}