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, Default, Serialize, Deserialize)]
12pub struct SystemInfo {
13    #[serde(rename = "softwareVersion")]
14    pub software_version: String,
15    #[serde(rename = "softwareBuild")]
16    pub software_build: String,
17    #[serde(rename = "firmwareVersion")]
18    pub firmware_version: String,
19    #[serde(rename = "hardwareVersion")]
20    pub hardware_version: String,
21    #[serde(rename = "deviceId")]
22    pub device_id: String,
23    #[serde(rename = "akPub")]
24    pub ak_pub: Box<crate::models::AkPub>,
25    #[serde(rename = "pcr")]
26    pub pcr: Box<crate::models::Pcr>,
27}
28
29impl SystemInfo {
30    pub fn new(
31        software_version: String,
32        software_build: String,
33        firmware_version: String,
34        hardware_version: String,
35        device_id: String,
36        ak_pub: crate::models::AkPub,
37        pcr: crate::models::Pcr,
38    ) -> SystemInfo {
39        SystemInfo {
40            software_version,
41            software_build,
42            firmware_version,
43            hardware_version,
44            device_id,
45            ak_pub: Box::new(ak_pub),
46            pcr: Box::new(pcr),
47        }
48    }
49}