orvanta-api 3.0.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 3.0.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// 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.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BpmnMigrationRefusal {
    #[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::BpmnMigrationBlocker>>,
}

impl 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.
    pub fn new(error: String) -> BpmnMigrationRefusal {
        BpmnMigrationRefusal {
            error,
            from_version: None,
            to_version: None,
            blockers: None,
        }
    }
}