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};

/// NewBpmnDelegateBinding : Create/update payload. On update `delegate_key` must equal the stored value — the key is not editable, because deployed models reference it by name and repointing it in place would rebind every one of them.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NewBpmnDelegateBinding {
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "key_kind")]
    pub key_kind: models::DelegateKeyKind,
    #[serde(rename = "delegate_key")]
    pub delegate_key: String,
    #[serde(rename = "kind")]
    pub kind: models::DelegateBindingKind,
    #[serde(rename = "script_path", skip_serializing_if = "Option::is_none")]
    pub script_path: Option<String>,
    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
    #[serde(rename = "outputs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub outputs: Option<Option<serde_json::Value>>,
    #[serde(rename = "exception_map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub exception_map: Option<Option<serde_json::Value>>,
    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
    pub summary: Option<String>,
}

impl NewBpmnDelegateBinding {
    /// Create/update payload. On update `delegate_key` must equal the stored value — the key is not editable, because deployed models reference it by name and repointing it in place would rebind every one of them.
    pub fn new(path: String, key_kind: models::DelegateKeyKind, delegate_key: String, kind: models::DelegateBindingKind) -> NewBpmnDelegateBinding {
        NewBpmnDelegateBinding {
            path,
            key_kind,
            delegate_key,
            kind,
            script_path: None,
            reason: None,
            outputs: None,
            exception_map: None,
            summary: None,
        }
    }
}