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 ServiceRoot schema describes the root of the Redfish service, located at the '/redfish/v1' URI.  All other resources accessible through the Redfish interface on this device are linked directly or indirectly from the service root.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct ServiceRoot {
    #[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(\"#ServiceRoot.v1_15_0.ServiceRoot\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "AccountService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub account_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "AggregationService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub aggregation_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Cables")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cables: Option<models::odata_v4::IdRef>,
    #[serde(rename = "CertificateService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub certificate_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Chassis")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub chassis: Option<models::odata_v4::IdRef>,
    #[serde(rename = "ComponentIntegrity")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub component_integrity: Option<models::odata_v4::IdRef>,
    #[serde(rename = "CompositionService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub composition_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    #[serde(rename = "EventService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub event_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Fabrics")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub fabrics: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Facilities")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub facilities: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    #[serde(rename = "JobService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub job_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "JsonSchemas")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub json_schemas: Option<models::odata_v4::IdRef>,
    #[serde(rename = "KeyService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub key_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "LicenseService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub license_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Links")]
    pub links: models::service_root::v1_15_0::Links,
    #[serde(rename = "Managers")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub managers: Option<models::odata_v4::IdRef>,
    #[serde(rename = "NVMeDomains")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub nvme_domains: 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>,
    #[serde(rename = "PowerEquipment")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_equipment: Option<models::odata_v4::IdRef>,
    /// The product associated with this Redfish service.
    #[serde(rename = "Product")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub product: Option<String>,
    #[serde(rename = "ProtocolFeaturesSupported")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub protocol_features_supported: Option<models::service_root::v1_15_0::ProtocolFeaturesSupported>,
    /// The version of the Redfish service.
    #[serde(rename = "RedfishVersion")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redfish_version: Option<String>,
    #[serde(rename = "RegisteredClients")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub registered_clients: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Registries")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub registries: Option<models::odata_v4::IdRef>,
    #[serde(rename = "ResourceBlocks")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resource_blocks: Option<models::odata_v4::IdRef>,
    #[serde(rename = "ServiceConditions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub service_conditions: Option<models::odata_v4::IdRef>,
    /// The vendor or user-provided product and service identifier.
    #[serde(rename = "ServiceIdentification")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub service_identification: Option<String>,
    #[serde(rename = "SessionService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub session_service: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Storage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage: Option<models::odata_v4::IdRef>,
    #[serde(rename = "StorageServices")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage_services: Option<models::odata_v4::IdRef>,
    #[serde(rename = "StorageSystems")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage_systems: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Systems")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub systems: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Tasks")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tasks: Option<models::odata_v4::IdRef>,
    #[serde(rename = "TelemetryService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub telemetry_service: Option<models::odata_v4::IdRef>,
    /// Unique identifier for a service instance.  When SSDP is used, this value contains the same UUID returned in an HTTP `200 OK` response from an SSDP `M-SEARCH` request during discovery.
    #[serde(rename = "UUID")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub uuid: Option<String>,
    #[serde(rename = "UpdateService")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub update_service: Option<models::odata_v4::IdRef>,
    /// The vendor or manufacturer associated with this Redfish service.
    #[serde(rename = "Vendor")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub vendor: Option<String>,
}

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