1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Orvanta API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 3.2.0
* Contact: contact@orvanta.cloud
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// BpmnMappingRefusal : The 400 body when the *mapped* contract refuses a request (#925). Same envelope as BpmnMigrationRefusal on purpose, so one client-side renderer handles both: `error` is a readable sentence for a client that reads one field, `blockers` carries the rule number, the rendered sentence and the rule's own fields, which is what a UI needs to mark the offending shapes without knowing the discriminant names.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BpmnMappingRefusal {
#[serde(rename = "error")]
pub error: String,
#[serde(rename = "from_version", skip_serializing_if = "Option::is_none")]
pub from_version: Option<i64>,
#[serde(rename = "to_version", skip_serializing_if = "Option::is_none")]
pub to_version: Option<i64>,
#[serde(rename = "blockers", skip_serializing_if = "Option::is_none")]
pub blockers: Option<Vec<models::BpmnMappingBlocker>>,
}
impl BpmnMappingRefusal {
/// The 400 body when the *mapped* contract refuses a request (#925). Same envelope as BpmnMigrationRefusal on purpose, so one client-side renderer handles both: `error` is a readable sentence for a client that reads one field, `blockers` carries the rule number, the rendered sentence and the rule's own fields, which is what a UI needs to mark the offending shapes without knowing the discriminant names.
pub fn new(error: String) -> BpmnMappingRefusal {
BpmnMappingRefusal {
error,
from_version: None,
to_version: None,
blockers: None,
}
}
}