Skip to main content

orvanta_api/models/
new_bpmn_delegate_binding.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/// 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.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct NewBpmnDelegateBinding {
17    #[serde(rename = "path")]
18    pub path: String,
19    #[serde(rename = "key_kind")]
20    pub key_kind: models::DelegateKeyKind,
21    #[serde(rename = "delegate_key")]
22    pub delegate_key: String,
23    #[serde(rename = "kind")]
24    pub kind: models::DelegateBindingKind,
25    #[serde(rename = "script_path", skip_serializing_if = "Option::is_none")]
26    pub script_path: Option<String>,
27    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
28    pub reason: Option<String>,
29    #[serde(rename = "outputs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub outputs: Option<Option<serde_json::Value>>,
31    #[serde(rename = "exception_map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
32    pub exception_map: Option<Option<serde_json::Value>>,
33    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
34    pub summary: Option<String>,
35}
36
37impl NewBpmnDelegateBinding {
38    /// 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.
39    pub fn new(path: String, key_kind: models::DelegateKeyKind, delegate_key: String, kind: models::DelegateBindingKind) -> NewBpmnDelegateBinding {
40        NewBpmnDelegateBinding {
41            path,
42            key_kind,
43            delegate_key,
44            kind,
45            script_path: None,
46            reason: None,
47            outputs: None,
48            exception_map: None,
49            summary: None,
50        }
51    }
52}
53