orvanta_api/models/bpmn_validation_problem.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/// BpmnValidationProblem : A rejected BPMN deploy. `issues` carries every problem found, not just the first, so one round trip is enough to fix them all; warnings found alongside the errors are included with `severity: warning`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BpmnValidationProblem {
17 /// A readable summary, for a client that reads one field.
18 #[serde(rename = "error")]
19 pub error: String,
20 /// Empty for a parse failure — the document never became a model, so there is no element to anchor to.
21 #[serde(rename = "issues")]
22 pub issues: Vec<models::BpmnValidationIssue>,
23}
24
25impl BpmnValidationProblem {
26 /// A rejected BPMN deploy. `issues` carries every problem found, not just the first, so one round trip is enough to fix them all; warnings found alongside the errors are included with `severity: warning`.
27 pub fn new(error: String, issues: Vec<models::BpmnValidationIssue>) -> BpmnValidationProblem {
28 BpmnValidationProblem {
29 error,
30 issues,
31 }
32 }
33}
34