redfish_codegen/models/license/v1_1_1/
license.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The License schema describes a license for a feature.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct License {
10    #[serde(rename = "@odata.context")]
11    #[serde(skip_deserializing)]
12    #[serde(default, skip_serializing_if = "Option::is_none")]
13    pub odata_context: Option<models::odata_v4::Context>,
14    #[serde(rename = "@odata.etag")]
15    #[serde(skip_deserializing)]
16    #[serde(default, skip_serializing_if = "Option::is_none")]
17    pub odata_etag: Option<models::odata_v4::Etag>,
18    #[serde(rename = "@odata.id")]
19    #[serde(skip_deserializing)]
20    pub odata_id: models::odata_v4::Id,
21    #[serde(rename = "@odata.type")]
22    #[serde(skip_deserializing)]
23    #[derivative(Default(value = "models::odata_v4::Type(\"#License.v1_1_1.License\".to_string())"))]
24    pub odata_type: models::odata_v4::Type,
25    #[serde(rename = "Actions")]
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub actions: Option<models::license::v1_1_1::Actions>,
28    #[serde(rename = "AuthorizationScope")]
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub authorization_scope: Option<models::license::v1_1_1::AuthorizationScope>,
31    #[serde(rename = "Contact")]
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub contact: Option<models::license::v1_1_1::ContactInfo>,
34    #[serde(rename = "Description")]
35    #[serde(default, skip_serializing_if = "Option::is_none")]
36    pub description: Option<models::resource::Description>,
37    /// The URI at which to download the license file.
38    #[serde(rename = "DownloadURI")]
39    #[serde(default, skip_serializing_if = "Option::is_none")]
40    pub download_uri: Option<String>,
41    /// The entitlement identifier for this license.
42    #[serde(rename = "EntitlementId")]
43    #[serde(default, skip_serializing_if = "Option::is_none")]
44    pub entitlement_id: Option<String>,
45    /// The date and time when the license expires.
46    #[serde(rename = "ExpirationDate")]
47    #[serde(default, skip_serializing_if = "Option::is_none")]
48    pub expiration_date: Option<String>,
49    /// The grace days of this license.
50    #[serde(rename = "GracePeriodDays")]
51    #[serde(default, skip_serializing_if = "Option::is_none")]
52    pub grace_period_days: Option<i64>,
53    #[serde(rename = "Id")]
54    #[serde(skip_deserializing)]
55    pub id: models::resource::Id,
56    /// The date and time when the license was installed.
57    #[serde(rename = "InstallDate")]
58    #[serde(default, skip_serializing_if = "Option::is_none")]
59    pub install_date: Option<String>,
60    /// The URI at which more information about this license can be obtained.
61    #[serde(rename = "LicenseInfoURI")]
62    #[serde(default, skip_serializing_if = "Option::is_none")]
63    pub license_info_uri: Option<String>,
64    #[serde(rename = "LicenseOrigin")]
65    #[serde(default, skip_serializing_if = "Option::is_none")]
66    pub license_origin: Option<models::license::v1_1_1::LicenseOrigin>,
67    /// The Base64-encoded string of the license.
68    #[serde(rename = "LicenseString")]
69    #[serde(default, skip_serializing_if = "Option::is_none")]
70    pub license_string: Option<String>,
71    #[serde(rename = "LicenseType")]
72    #[serde(default, skip_serializing_if = "Option::is_none")]
73    pub license_type: Option<models::license::v1_1_1::LicenseType>,
74    #[serde(rename = "Links")]
75    #[serde(default, skip_serializing_if = "Option::is_none")]
76    pub links: Option<models::license::v1_1_1::Links>,
77    /// The manufacturer or producer of this license.
78    #[serde(rename = "Manufacturer")]
79    #[serde(default, skip_serializing_if = "Option::is_none")]
80    pub manufacturer: Option<String>,
81    /// The maximum number of devices authorized by the license.
82    #[serde(rename = "MaxAuthorizedDevices")]
83    #[serde(default, skip_serializing_if = "Option::is_none")]
84    pub max_authorized_devices: Option<i64>,
85    #[serde(rename = "Name")]
86    #[serde(skip_deserializing)]
87    pub name: models::resource::Name,
88    #[serde(rename = "Oem")]
89    #[serde(default, skip_serializing_if = "Option::is_none")]
90    pub oem: Option<models::resource::Oem>,
91    /// The part number for this license.
92    #[serde(rename = "PartNumber")]
93    #[serde(default, skip_serializing_if = "Option::is_none")]
94    pub part_number: Option<String>,
95    /// The remaining usage duration before the license expires.
96    #[serde(rename = "RemainingDuration")]
97    #[serde(default, skip_serializing_if = "Option::is_none")]
98    pub remaining_duration: Option<String>,
99    /// The remaining usage count before the license expires.
100    #[serde(rename = "RemainingUseCount")]
101    #[serde(default, skip_serializing_if = "Option::is_none")]
102    pub remaining_use_count: Option<i64>,
103    /// An indication of whether the license is removable.
104    #[serde(rename = "Removable")]
105    #[serde(default, skip_serializing_if = "Option::is_none")]
106    pub removable: Option<bool>,
107    /// The SKU for this license.
108    #[serde(rename = "SKU")]
109    #[serde(default, skip_serializing_if = "Option::is_none")]
110    pub sku: Option<String>,
111    /// The serial number for this license.
112    #[serde(rename = "SerialNumber")]
113    #[serde(default, skip_serializing_if = "Option::is_none")]
114    pub serial_number: Option<String>,
115    #[serde(rename = "Status")]
116    #[serde(default, skip_serializing_if = "Option::is_none")]
117    pub status: Option<models::resource::Status>,
118}
119
120impl crate::Metadata<'static> for License {
121    const JSON_SCHEMA: &'static str = "License.v1_1_1.json";
122}