nethsm_sdk_rs/models/
system_info.rs

1/*
2 * NetHSM
3 *
4 * All endpoints expect exactly the specified JSON. Additional properties will cause a Bad Request Error (400). All HTTP errors contain a JSON structure with an explanation of type string. All [base64](https://tools.ietf.org/html/rfc4648#section-4) encoded values are Big Endian.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: Nitrokey <info@nitrokey.com>
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12#[non_exhaustive]
13pub struct SystemInfo {
14    #[serde(rename = "softwareVersion")]
15    pub software_version: String,
16    #[serde(rename = "softwareBuild")]
17    pub software_build: String,
18    #[serde(rename = "firmwareVersion")]
19    pub firmware_version: String,
20    #[serde(rename = "hardwareVersion")]
21    pub hardware_version: String,
22    #[serde(rename = "deviceId")]
23    pub device_id: String,
24    #[serde(rename = "akPub")]
25    pub ak_pub: Box<crate::models::AkPub>,
26    #[serde(rename = "pcr")]
27    pub pcr: Box<crate::models::Pcr>,
28}
29
30impl SystemInfo {
31    pub fn new(
32        software_version: String,
33        software_build: String,
34        firmware_version: String,
35        hardware_version: String,
36        device_id: String,
37        ak_pub: crate::models::AkPub,
38        pcr: crate::models::Pcr,
39    ) -> SystemInfo {
40        SystemInfo {
41            software_version,
42            software_build,
43            firmware_version,
44            hardware_version,
45            device_id,
46            ak_pub: Box::new(ak_pub),
47            pcr: Box::new(pcr),
48        }
49    }
50}