redfish_codegen/models/task/v1_7_1/
task.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The Task schema contains information about a task that the Redfish task service schedules or executes.  Tasks represent operations that take more time than a client typically wants to wait.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct Task {
10    #[serde(rename = "@odata.context")]
11    #[serde(skip_deserializing)]
12    #[serde(default, skip_serializing_if = "Option::is_none")]
13    pub odata_context: Option<models::odata_v4::Context>,
14    #[serde(rename = "@odata.etag")]
15    #[serde(skip_deserializing)]
16    #[serde(default, skip_serializing_if = "Option::is_none")]
17    pub odata_etag: Option<models::odata_v4::Etag>,
18    #[serde(rename = "@odata.id")]
19    #[serde(skip_deserializing)]
20    pub odata_id: models::odata_v4::Id,
21    #[serde(rename = "@odata.type")]
22    #[serde(skip_deserializing)]
23    #[derivative(Default(value = "models::odata_v4::Type(\"#Task.v1_7_1.Task\".to_string())"))]
24    pub odata_type: models::odata_v4::Type,
25    #[serde(rename = "Actions")]
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub actions: Option<models::task::v1_7_1::Actions>,
28    #[serde(rename = "Description")]
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub description: Option<models::resource::Description>,
31    /// The date and time when the task was completed.  This property will only appear when the task is complete.
32    #[serde(rename = "EndTime")]
33    #[serde(default, skip_serializing_if = "Option::is_none")]
34    pub end_time: Option<String>,
35    /// The estimated total time required to complete the task.
36    #[serde(rename = "EstimatedDuration")]
37    #[serde(default, skip_serializing_if = "Option::is_none")]
38    pub estimated_duration: Option<String>,
39    /// An indication of whether the contents of the payload are hidden from view after the task has been created.  If `true`, responses do not return the payload.  If `false`, responses return the payload.  If this property is not present when the task is created, the default is `false`.
40    #[serde(rename = "HidePayload")]
41    #[serde(default, skip_serializing_if = "Option::is_none")]
42    pub hide_payload: Option<bool>,
43    #[serde(rename = "Id")]
44    #[serde(skip_deserializing)]
45    pub id: models::resource::Id,
46    #[serde(rename = "Links")]
47    #[serde(default, skip_serializing_if = "Option::is_none")]
48    pub links: Option<models::task::v1_7_1::Links>,
49    /// An array of messages associated with the task.
50    #[serde(rename = "Messages")]
51    #[serde(default, skip_serializing_if = "Option::is_none")]
52    pub messages: Option<Vec<models::message::Message>>,
53    #[serde(rename = "Name")]
54    #[serde(skip_deserializing)]
55    pub name: models::resource::Name,
56    #[serde(rename = "Oem")]
57    #[serde(default, skip_serializing_if = "Option::is_none")]
58    pub oem: Option<models::resource::Oem>,
59    #[serde(rename = "Payload")]
60    #[serde(default, skip_serializing_if = "Option::is_none")]
61    pub payload: Option<models::task::v1_7_1::Payload>,
62    /// The completion percentage of this task.
63    #[serde(rename = "PercentComplete")]
64    #[serde(default, skip_serializing_if = "Option::is_none")]
65    pub percent_complete: Option<i64>,
66    /// The date and time when the task was started.
67    #[serde(rename = "StartTime")]
68    #[serde(default, skip_serializing_if = "Option::is_none")]
69    pub start_time: Option<String>,
70    #[serde(rename = "SubTasks")]
71    #[serde(default, skip_serializing_if = "Option::is_none")]
72    pub sub_tasks: Option<models::odata_v4::IdRef>,
73    /// The URI of the Task Monitor for this task.
74    #[serde(rename = "TaskMonitor")]
75    #[serde(default, skip_serializing_if = "Option::is_none")]
76    pub task_monitor: Option<String>,
77    #[serde(rename = "TaskState")]
78    #[serde(default, skip_serializing_if = "Option::is_none")]
79    pub task_state: Option<models::task::v1_7_1::TaskState>,
80    #[serde(rename = "TaskStatus")]
81    #[serde(default, skip_serializing_if = "Option::is_none")]
82    pub task_status: Option<models::resource::Health>,
83}
84
85impl crate::Metadata<'static> for Task {
86    const JSON_SCHEMA: &'static str = "Task.v1_7_1.json";
87}