redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.

use crate::models;

/// The License schema describes a license for a feature.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct License {
    #[serde(rename = "@odata.context")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_context: Option<models::odata_v4::Context>,
    #[serde(rename = "@odata.etag")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_etag: Option<models::odata_v4::Etag>,
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "@odata.type")]
    #[serde(skip_deserializing)]
    #[derivative(Default(value = "models::odata_v4::Type(\"#License.v1_1_0.License\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::license::v1_1_0::Actions>,
    #[serde(rename = "AuthorizationScope")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub authorization_scope: Option<models::license::v1_1_0::AuthorizationScope>,
    #[serde(rename = "Contact")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub contact: Option<models::license::v1_1_0::ContactInfo>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    /// The URI at which to download the license file.
    #[serde(rename = "DownloadURI")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub download_uri: Option<String>,
    /// The entitlement identifier for this license.
    #[serde(rename = "EntitlementId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub entitlement_id: Option<String>,
    /// The date and time when the license expires.
    #[serde(rename = "ExpirationDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub expiration_date: Option<String>,
    /// The grace days of this license.
    #[serde(rename = "GracePeriodDays")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub grace_period_days: Option<i64>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    /// The date and time when the license was installed.
    #[serde(rename = "InstallDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub install_date: Option<String>,
    /// The URI at which more information about this license can be obtained.
    #[serde(rename = "LicenseInfoURI")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub license_info_uri: Option<String>,
    #[serde(rename = "LicenseOrigin")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub license_origin: Option<models::license::v1_1_0::LicenseOrigin>,
    /// The Base64-encoded string of the license.
    #[serde(rename = "LicenseString")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub license_string: Option<String>,
    #[serde(rename = "LicenseType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub license_type: Option<models::license::v1_1_0::LicenseType>,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::license::v1_1_0::Links>,
    /// The manufacturer or producer of this license.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// The maximum number of devices authorized by the license.
    #[serde(rename = "MaxAuthorizedDevices")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_authorized_devices: Option<i64>,
    #[serde(rename = "Name")]
    #[serde(skip_deserializing)]
    pub name: models::resource::Name,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The part number for this license.
    #[serde(rename = "PartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_number: Option<String>,
    /// The remaining usage duration before the license expires.
    #[serde(rename = "RemainingDuration")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub remaining_duration: Option<String>,
    /// The remaining usage count before the license expires.
    #[serde(rename = "RemainingUseCount")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub remaining_use_count: Option<i64>,
    /// An indication of whether the license is removable.
    #[serde(rename = "Removable")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub removable: Option<bool>,
    /// The SKU for this license.
    #[serde(rename = "SKU")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sku: Option<String>,
    /// The serial number for this license.
    #[serde(rename = "SerialNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
}

impl crate::Metadata<'static> for License {
    const JSON_SCHEMA: &'static str = "License.v1_1_0.json";
}