Skip to main content

orvanta_api/models/
cmmn_control.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: 4.1.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CmmnControl : The **whole** write surface a non-worker component has on a running case. Each entry names an intent; the engine decides legality when the worker applies it. Keyed by a per-delivery UUID, not by the transition name --- two operators acting a second apart are two deliveries, and the second must not silently overwrite the first's audit-bearing intent. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CmmnControl {
17    /// Per-plan-item transition requests, keyed by delivery id.
18    #[serde(rename = "triggers", skip_serializing_if = "Option::is_none")]
19    pub triggers: Option<std::collections::HashMap<String, models::CmmnTriggerIntent>>,
20    /// Case-level transition requests, keyed by delivery id.
21    #[serde(rename = "case_transitions", skip_serializing_if = "Option::is_none")]
22    pub case_transitions: Option<std::collections::HashMap<String, models::CmmnCaseTransitionIntent>>,
23}
24
25impl CmmnControl {
26    /// The **whole** write surface a non-worker component has on a running case. Each entry names an intent; the engine decides legality when the worker applies it. Keyed by a per-delivery UUID, not by the transition name --- two operators acting a second apart are two deliveries, and the second must not silently overwrite the first's audit-bearing intent. 
27    pub fn new() -> CmmnControl {
28        CmmnControl {
29            triggers: None,
30            case_transitions: None,
31        }
32    }
33}
34