Skip to main content

orvanta_api/models/
bpmn_migration_refusal.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/// BpmnMigrationRefusal : The 400 body when the contract refuses a swap. Same envelope shape as deploy-time BPMN validation (#743): `error` is a readable sentence for a client that reads one field, `blockers` carries the structure a UI needs to mark the offending shapes.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BpmnMigrationRefusal {
17    #[serde(rename = "error")]
18    pub error: String,
19    #[serde(rename = "from_version", skip_serializing_if = "Option::is_none")]
20    pub from_version: Option<i64>,
21    #[serde(rename = "to_version", skip_serializing_if = "Option::is_none")]
22    pub to_version: Option<i64>,
23    #[serde(rename = "blockers", skip_serializing_if = "Option::is_none")]
24    pub blockers: Option<Vec<models::BpmnMigrationBlocker>>,
25}
26
27impl BpmnMigrationRefusal {
28    /// The 400 body when the contract refuses a swap. Same envelope shape as deploy-time BPMN validation (#743): `error` is a readable sentence for a client that reads one field, `blockers` carries the structure a UI needs to mark the offending shapes.
29    pub fn new(error: String) -> BpmnMigrationRefusal {
30        BpmnMigrationRefusal {
31            error,
32            from_version: None,
33            to_version: None,
34            blockers: None,
35        }
36    }
37}
38