authentik_rust/models/
version.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// Version : Get running and latest version.
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Version {
16    /// Get current version
17    #[serde(rename = "version_current")]
18    pub version_current: String,
19    /// Get latest version from cache
20    #[serde(rename = "version_latest")]
21    pub version_latest: String,
22    /// Get build hash, if version is not latest or released
23    #[serde(rename = "build_hash")]
24    pub build_hash: String,
25    /// Check if we're running the latest version
26    #[serde(rename = "outdated")]
27    pub outdated: bool,
28}
29
30impl Version {
31    /// Get running and latest version.
32    pub fn new(version_current: String, version_latest: String, build_hash: String, outdated: bool) -> Version {
33        Version {
34            version_current,
35            version_latest,
36            build_hash,
37            outdated,
38        }
39    }
40}
41