redfish_codegen/models/log_entry/v1_15_0/
log_entry.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The LogEntry schema defines the record format for a log.  It is designed for Redfish event logs, OEM-specific log formats, and the IPMI System Event Log (SEL).  The EntryType field indicates the type of log and the resource includes several additional properties dependent on the EntryType.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct LogEntry {
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(\"#LogEntry.v1_15_0.LogEntry\".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::log_entry::v1_15_0::Actions>,
28    /// The size of the additional data for this log entry.
29    #[serde(rename = "AdditionalDataSizeBytes")]
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub additional_data_size_bytes: Option<i64>,
32    /// The URI at which to access the additional data for this log entry, such as diagnostic data, image captures, or other files.
33    #[serde(rename = "AdditionalDataURI")]
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub additional_data_uri: Option<String>,
36    #[serde(rename = "CPER")]
37    #[serde(default, skip_serializing_if = "Option::is_none")]
38    pub cper: Option<models::log_entry::v1_15_0::CPER>,
39    #[serde(rename = "CXLEntryType")]
40    #[serde(default, skip_serializing_if = "Option::is_none")]
41    pub cxl_entry_type: Option<models::log_entry::v1_15_0::CXLEntryType>,
42    /// The date and time when the log entry was created.
43    #[serde(rename = "Created")]
44    #[serde(default, skip_serializing_if = "Option::is_none")]
45    pub created: Option<String>,
46    #[serde(rename = "Description")]
47    #[serde(default, skip_serializing_if = "Option::is_none")]
48    pub description: Option<models::resource::Description>,
49    /// A Base64-encoded set of diagnostic data associated with this log entry.
50    #[serde(rename = "DiagnosticData")]
51    #[serde(default, skip_serializing_if = "Option::is_none")]
52    pub diagnostic_data: Option<String>,
53    #[serde(rename = "DiagnosticDataType")]
54    #[serde(default, skip_serializing_if = "Option::is_none")]
55    pub diagnostic_data_type: Option<models::log_entry::v1_15_0::LogDiagnosticDataTypes>,
56    #[serde(rename = "EntryCode")]
57    #[serde(default, skip_serializing_if = "Option::is_none")]
58    pub entry_code: Option<models::log_entry::v1_15_0::LogEntryCode>,
59    #[serde(rename = "EntryType")]
60    pub entry_type: models::log_entry::v1_15_0::LogEntryType,
61    /// An identifier that correlates events with the same cause.
62    #[serde(rename = "EventGroupId")]
63    #[serde(default, skip_serializing_if = "Option::is_none")]
64    pub event_group_id: Option<i64>,
65    /// The unique instance identifier for an event.
66    #[serde(rename = "EventId")]
67    #[serde(default, skip_serializing_if = "Option::is_none")]
68    pub event_id: Option<String>,
69    /// The date and time when the event occurred.
70    #[serde(rename = "EventTimestamp")]
71    #[serde(default, skip_serializing_if = "Option::is_none")]
72    pub event_timestamp: Option<String>,
73    #[serde(rename = "EventType")]
74    #[serde(default, skip_serializing_if = "Option::is_none")]
75    pub event_type: Option<models::event::EventType>,
76    /// The timestamp of the first overflow captured after this log entry.
77    #[serde(rename = "FirstOverflowTimestamp")]
78    #[serde(default, skip_serializing_if = "Option::is_none")]
79    pub first_overflow_timestamp: Option<String>,
80    /// An identifier of the device that has generated the IPMI SEL Event Record.
81    #[serde(rename = "GeneratorId")]
82    #[serde(default, skip_serializing_if = "Option::is_none")]
83    pub generator_id: Option<String>,
84    #[serde(rename = "Id")]
85    #[serde(skip_deserializing)]
86    pub id: models::resource::Id,
87    /// The timestamp of the last overflow captured after this log entry.
88    #[serde(rename = "LastOverflowTimestamp")]
89    #[serde(default, skip_serializing_if = "Option::is_none")]
90    pub last_overflow_timestamp: Option<String>,
91    #[serde(rename = "Links")]
92    #[serde(default, skip_serializing_if = "Option::is_none")]
93    pub links: Option<models::log_entry::v1_15_0::Links>,
94    /// The message of the log entry.  This property decodes from the entry type.  If the entry type is `Event`, this property contains a message.  If the entry type is `SEL`, this property contains an SEL-specific message.  If the entry type is `CXL`, this property contains a CXL event record.  Otherwise, this property contains an OEM-specific log entry.  In most cases, this property contains the actual log entry.
95    #[serde(rename = "Message")]
96    #[serde(default, skip_serializing_if = "Option::is_none")]
97    pub message: Option<String>,
98    /// The arguments for the message.
99    #[serde(rename = "MessageArgs")]
100    #[serde(default, skip_serializing_if = "Option::is_none")]
101    pub message_args: Option<Vec<String>>,
102    /// The MessageId, event data, or OEM-specific information.  This property decodes from the entry type.  If the entry type is `Event`, this property contains a Redfish Specification-defined MessageId.  If the entry type is `SEL`, this property contains the Event Data.  Otherwise, this property contains OEM-specific information.
103    #[serde(rename = "MessageId")]
104    #[serde(default, skip_serializing_if = "Option::is_none")]
105    pub message_id: Option<String>,
106    /// The date and time when the log entry was last modified.
107    #[serde(rename = "Modified")]
108    #[serde(default, skip_serializing_if = "Option::is_none")]
109    pub modified: Option<String>,
110    #[serde(rename = "Name")]
111    #[serde(skip_deserializing)]
112    pub name: models::resource::Name,
113    /// The OEM-defined type of data available in the DiagnosticData property or retrieved from the URI specified by the AdditionalDataURI property.
114    #[serde(rename = "OEMDiagnosticDataType")]
115    #[serde(default, skip_serializing_if = "Option::is_none")]
116    pub oem_diagnostic_data_type: Option<String>,
117    #[serde(rename = "Oem")]
118    #[serde(default, skip_serializing_if = "Option::is_none")]
119    pub oem: Option<models::resource::Oem>,
120    /// The OEM-specific entry code, if the LogEntryCode type is `OEM`.
121    #[serde(rename = "OemLogEntryCode")]
122    #[serde(default, skip_serializing_if = "Option::is_none")]
123    pub oem_log_entry_code: Option<String>,
124    /// The OEM-specific format of the entry.  If the entry type is `Oem`, this property contains more information about the record format from the OEM.
125    #[serde(rename = "OemRecordFormat")]
126    #[serde(default, skip_serializing_if = "Option::is_none")]
127    pub oem_record_format: Option<String>,
128    /// The OEM-specific sensor type if the sensor type is `OEM`.
129    #[serde(rename = "OemSensorType")]
130    #[serde(default, skip_serializing_if = "Option::is_none")]
131    pub oem_sensor_type: Option<String>,
132    /// The source of the log entry.
133    #[serde(rename = "Originator")]
134    #[serde(default, skip_serializing_if = "Option::is_none")]
135    pub originator: Option<String>,
136    #[serde(rename = "OriginatorType")]
137    #[serde(default, skip_serializing_if = "Option::is_none")]
138    pub originator_type: Option<models::log_entry::v1_15_0::OriginatorTypes>,
139    /// The count of overflow errors that occurred after this log entry.
140    #[serde(rename = "OverflowErrorCount")]
141    #[serde(default, skip_serializing_if = "Option::is_none")]
142    pub overflow_error_count: Option<i64>,
143    /// Indicates whether the log entry is persistent across a cold reset of the device.
144    #[serde(rename = "Persistency")]
145    #[serde(default, skip_serializing_if = "Option::is_none")]
146    pub persistency: Option<bool>,
147    /// Used to provide suggestions on how to resolve the situation that caused the log entry.
148    #[serde(rename = "Resolution")]
149    #[serde(default, skip_serializing_if = "Option::is_none")]
150    pub resolution: Option<String>,
151    /// Indicates if the cause of the log entry has been resolved or repaired.
152    #[serde(rename = "Resolved")]
153    #[serde(default, skip_serializing_if = "Option::is_none")]
154    pub resolved: Option<bool>,
155    /// The IPMI-defined sensor number.
156    #[serde(rename = "SensorNumber")]
157    #[serde(default, skip_serializing_if = "Option::is_none")]
158    pub sensor_number: Option<i64>,
159    #[serde(rename = "SensorType")]
160    #[serde(default, skip_serializing_if = "Option::is_none")]
161    pub sensor_type: Option<models::log_entry::v1_15_0::SensorType>,
162    /// Indicates if the log entry has been sent to the service provider.
163    #[serde(rename = "ServiceProviderNotified")]
164    #[serde(default, skip_serializing_if = "Option::is_none")]
165    pub service_provider_notified: Option<bool>,
166    #[serde(rename = "Severity")]
167    #[serde(default, skip_serializing_if = "Option::is_none")]
168    pub severity: Option<models::log_entry::v1_15_0::EventSeverity>,
169    /// Indicates this log entry is equivalent to a more specific log entry within the same EventGroupId.
170    #[serde(rename = "SpecificEventExistsInGroup")]
171    #[serde(default, skip_serializing_if = "Option::is_none")]
172    pub specific_event_exists_in_group: Option<bool>,
173}
174
175impl crate::Metadata<'static> for LogEntry {
176    const JSON_SCHEMA: &'static str = "LogEntry.v1_15_0.json";
177}