Skip to main content

orvanta_api/models/
bpmn_migration_plan_check.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/// BpmnMigrationPlanCheck : Whether a mapping document holds for a version pair, and the substitution it resolves to. Nothing is written by the operations that return this.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BpmnMigrationPlanCheck {
17    #[serde(rename = "from_version")]
18    pub from_version: i64,
19    #[serde(rename = "to_version")]
20    pub to_version: i64,
21    #[serde(rename = "bpmn_flow_path")]
22    pub bpmn_flow_path: String,
23    /// the mapping document holds against this pair
24    #[serde(rename = "eligible")]
25    pub eligible: bool,
26    /// the resolved plan rewrites nothing, so the pair is identity-migratable and `process_status` must not be touched
27    #[serde(rename = "identity")]
28    pub identity: bool,
29    /// this migration can be performed with what exists today: an identity plan by migrateBpmnInstance, a rewriting plan by the engine-side applier through requestBpmnInstanceMigration. Equal to `eligible` since the applier landed. It is a statement about the version pair, not about one instance -- the engine still refuses at apply time while an activity is `Started` on a renamed element.
30    #[serde(rename = "executable_today")]
31    pub executable_today: bool,
32    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
33    pub plan: Option<Box<models::BpmnMigrationPlan>>,
34    #[serde(rename = "blockers")]
35    pub blockers: Vec<models::BpmnMappingBlocker>,
36}
37
38impl BpmnMigrationPlanCheck {
39    /// Whether a mapping document holds for a version pair, and the substitution it resolves to. Nothing is written by the operations that return this.
40    pub fn new(from_version: i64, to_version: i64, bpmn_flow_path: String, eligible: bool, identity: bool, executable_today: bool, blockers: Vec<models::BpmnMappingBlocker>) -> BpmnMigrationPlanCheck {
41        BpmnMigrationPlanCheck {
42            from_version,
43            to_version,
44            bpmn_flow_path,
45            eligible,
46            identity,
47            executable_today,
48            plan: None,
49            blockers,
50        }
51    }
52}
53