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 AggregationSource schema is used to represent the source of information for a subset of the resources provided by a Redfish service.  It can be thought of as a provider of information.  As such, most such interfaces have requirements to support the gathering of information like address and account used to access the information.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct AggregationSource {
    #[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(\"#AggregationSource.v1_3_1.AggregationSource\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::aggregation_source::v1_3_1::Actions>,
    #[serde(rename = "AggregationType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub aggregation_type: Option<models::aggregation_source::v1_3_1::AggregationType>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    /// The URI of the system to be accessed.
    #[serde(rename = "HostName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub host_name: Option<String>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::aggregation_source::v1_3_1::Links>,
    #[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 password for accessing the aggregation source.  The value is `null` in responses.
    #[serde(rename = "Password")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
    #[serde(rename = "SNMP")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub snmp: Option<models::aggregation_source::v1_3_1::SNMPSettings>,
    #[serde(rename = "SSHSettings")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ssh_settings: Option<models::aggregation_source::v1_3_1::SSHSettingsType>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    /// The user name for accessing the aggregation source.
    #[serde(rename = "UserName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub user_name: Option<String>,
}

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