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 LicenseService schema describes the license service and the properties for the service itself with a link to the collection of licenses.  The license service also provides methods for installing licenses in a Redfish service.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct LicenseService {
    #[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(\"#LicenseService.v1_1_0.LicenseService\".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_service::v1_1_0::Actions>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    /// The number of days prior to a license expiration that a warning message is sent.  A value of zero indicates no warning message is sent.
    #[serde(rename = "LicenseExpirationWarningDays")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub license_expiration_warning_days: Option<i64>,
    #[serde(rename = "Licenses")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub licenses: Option<models::odata_v4::IdRef>,
    #[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>,
    /// An indication of whether this service is enabled.
    #[serde(rename = "ServiceEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub service_enabled: Option<bool>,
}

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