Skip to main content

orvanta_api/models/
process_incident.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.6.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProcessIncident : one open, operator-facing incident (flattened projection)
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProcessIncident {
17    #[serde(rename = "element_id")]
18    pub element_id: String,
19    #[serde(rename = "message")]
20    pub message: String,
21    #[serde(rename = "child_job_id", skip_serializing_if = "Option::is_none")]
22    pub child_job_id: Option<uuid::Uuid>,
23}
24
25impl ProcessIncident {
26    /// one open, operator-facing incident (flattened projection)
27    pub fn new(element_id: String, message: String) -> ProcessIncident {
28        ProcessIncident {
29            element_id,
30            message,
31            child_job_id: None,
32        }
33    }
34}
35