Skip to main content

authentik_client/models/
device_fact_snapshot.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DeviceFactSnapshot {
16    #[serde(rename = "data")]
17    pub data: models::DeviceFacts,
18    #[serde(rename = "connection")]
19    pub connection: uuid::Uuid,
20    #[serde(rename = "created")]
21    pub created: String,
22    #[serde(rename = "expires", deserialize_with = "Option::deserialize")]
23    pub expires: Option<String>,
24    #[serde(rename = "vendor")]
25    pub vendor: models::VendorEnum,
26}
27
28impl DeviceFactSnapshot {
29    pub fn new(
30        data: models::DeviceFacts,
31        connection: uuid::Uuid,
32        created: String,
33        expires: Option<String>,
34        vendor: models::VendorEnum,
35    ) -> DeviceFactSnapshot {
36        DeviceFactSnapshot {
37            data,
38            connection,
39            created,
40            expires,
41            vendor,
42        }
43    }
44}