orvanta_api/models/bpmn_migration_requested.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/// BpmnMigrationRequested : A stored migration request (#925). The migration has **not** happened: the engine applies it at the top of the instance's next step, together with the pin move and the ledger row. What was written into `control.migrate` is the mapping document; `plan` is what the engine will re-derive from it, returned for the caller's information only.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BpmnMigrationRequested {
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 resolved plan rewrites nothing
24 #[serde(rename = "identity")]
25 pub identity: bool,
26 /// validated only -- no request was stored
27 #[serde(rename = "dry_run")]
28 pub dry_run: bool,
29 #[serde(rename = "plan")]
30 pub plan: Box<models::BpmnMigrationPlan>,
31}
32
33impl BpmnMigrationRequested {
34 /// A stored migration request (#925). The migration has **not** happened: the engine applies it at the top of the instance's next step, together with the pin move and the ledger row. What was written into `control.migrate` is the mapping document; `plan` is what the engine will re-derive from it, returned for the caller's information only.
35 pub fn new(from_version: i64, to_version: i64, bpmn_flow_path: String, identity: bool, dry_run: bool, plan: models::BpmnMigrationPlan) -> BpmnMigrationRequested {
36 BpmnMigrationRequested {
37 from_version,
38 to_version,
39 bpmn_flow_path,
40 identity,
41 dry_run,
42 plan: Box::new(plan),
43 }
44 }
45}
46