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 UpdateService schema describes the update service and the properties for the service itself with links to collections of firmware and software inventory.  The update service also provides methods for updating software and firmware of the resources in a Redfish service.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct UpdateService {
    #[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(\"#UpdateService.v1_11_2.UpdateService\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::update_service::v1_11_2::Actions>,
    #[serde(rename = "ClientCertificates")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub client_certificates: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    #[serde(rename = "FirmwareInventory")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub firmware_inventory: Option<models::odata_v4::IdRef>,
    /// The URI used to perform an HTTP or HTTPS push update to the update service.  The format of the message is vendor-specific.
    #[serde(rename = "HttpPushUri")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub http_push_uri: Option<String>,
    #[serde(rename = "HttpPushUriOptions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub http_push_uri_options: Option<models::update_service::v1_11_2::HttpPushUriOptions>,
    /// An indication of whether a client has reserved the HttpPushUriOptions properties for software updates.
    #[serde(rename = "HttpPushUriOptionsBusy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub http_push_uri_options_busy: Option<bool>,
    /// An array of URIs that indicate where to apply the update image.
    #[serde(rename = "HttpPushUriTargets")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub http_push_uri_targets: Option<Vec<String>>,
    /// An indication of whether any client has reserved the HttpPushUriTargets property.
    #[serde(rename = "HttpPushUriTargetsBusy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub http_push_uri_targets_busy: Option<bool>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    /// The maximum size in bytes of the software update image that this service supports.
    #[serde(rename = "MaxImageSizeBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_image_size_bytes: Option<i64>,
    /// The URI used to perform a Redfish Specification-defined Multipart HTTP or HTTPS push update to the update service.
    #[serde(rename = "MultipartHttpPushUri")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub multipart_http_push_uri: Option<String>,
    #[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 = "RemoteServerCertificates")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub remote_server_certificates: Option<models::odata_v4::IdRef>,
    /// An indication of whether this service is enabled.
    #[serde(rename = "ServiceEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub service_enabled: Option<bool>,
    #[serde(rename = "SoftwareInventory")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub software_inventory: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    /// An indication of whether the service will verify the certificate of the server referenced by the ImageURI property in SimpleUpdate prior to sending the transfer request.
    #[serde(rename = "VerifyRemoteServerCertificate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub verify_remote_server_certificate: Option<bool>,
}

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