orvanta_api/models/process_history_entry.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: 3.2.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProcessHistoryEntry : one per-element transition record. Not currently populated by the engine -- always an empty array today (see ProcessInstanceStatus).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProcessHistoryEntry {
17 #[serde(rename = "element_id")]
18 pub element_id: String,
19 #[serde(rename = "transition")]
20 pub transition: String,
21 /// why this transition is not what it looks like. Set only by a `noop` delegate binding today (#923): the activity reports `completed` without having run anything, and this carries the binding's mandatory reason.
22 #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
23 pub note: Option<String>,
24 #[serde(rename = "at")]
25 pub at: String,
26}
27
28impl ProcessHistoryEntry {
29 /// one per-element transition record. Not currently populated by the engine -- always an empty array today (see ProcessInstanceStatus).
30 pub fn new(element_id: String, transition: String, at: String) -> ProcessHistoryEntry {
31 ProcessHistoryEntry {
32 element_id,
33 transition,
34 note: None,
35 at,
36 }
37 }
38}
39