Skip to main content

orvanta_api/models/
bpmn_version_rollup.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.0.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BpmnVersionRollup : Running BPMN instances grouped by pinned definition version (#919) -- \"we have 340 instances on 12 versions\" in one response.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BpmnVersionRollup {
17    /// most outdated instances first, then most instances, then path
18    #[serde(rename = "flows")]
19    pub flows: Vec<models::BpmnFlowVersionRollup>,
20    #[serde(rename = "running_instances")]
21    pub running_instances: i64,
22    #[serde(rename = "outdated_instances")]
23    pub outdated_instances: i64,
24    /// distinct (flow, pinned version) groups
25    #[serde(rename = "pinned_versions")]
26    pub pinned_versions: i64,
27    /// live root instances that resolve to no `bpmn_flow_version` at all. Preview runs are excluded outright, so this is normally zero; it is reported so the totals reconcile against `/instances/list`.
28    #[serde(rename = "unattributed_instances")]
29    pub unattributed_instances: i64,
30    /// true when the response's per-version check limit was reached and some versions carry no verdict for that reason alone
31    #[serde(rename = "checks_truncated")]
32    pub checks_truncated: bool,
33}
34
35impl BpmnVersionRollup {
36    /// Running BPMN instances grouped by pinned definition version (#919) -- \"we have 340 instances on 12 versions\" in one response.
37    pub fn new(flows: Vec<models::BpmnFlowVersionRollup>, running_instances: i64, outdated_instances: i64, pinned_versions: i64, unattributed_instances: i64, checks_truncated: bool) -> BpmnVersionRollup {
38        BpmnVersionRollup {
39            flows,
40            running_instances,
41            outdated_instances,
42            pinned_versions,
43            unattributed_instances,
44            checks_truncated,
45        }
46    }
47}
48