Skip to main content

orvanta_api/models/
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/// BpmnDelegateBinding : A delegate key mapped to an Orvanta script. `delegate_key` is opaque and compared byte-for-byte; it is never interpreted as a class name, a path or a URL. `path` — not the key — is the ACL anchor that RLS and ownership checks are evaluated against.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BpmnDelegateBinding {
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    /// Present iff `kind` is `script`.
26    #[serde(rename = "script_path", skip_serializing_if = "Option::is_none")]
27    pub script_path: Option<String>,
28    /// Present iff `kind` is `noop` or `fail`; required there.
29    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
30    pub reason: Option<String>,
31    /// #635 `ParamMapping` — how the result lands in process variables.
32    #[serde(rename = "outputs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub outputs: Option<Option<serde_json::Value>>,
34    /// `mapException` as a catch-all.
35    #[serde(rename = "exception_map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub exception_map: Option<Option<serde_json::Value>>,
37    #[serde(rename = "summary")]
38    pub summary: String,
39    #[serde(rename = "extra_perms")]
40    pub extra_perms: std::collections::HashMap<String, bool>,
41    #[serde(rename = "edited_by")]
42    pub edited_by: String,
43    #[serde(rename = "edited_at")]
44    pub edited_at: String,
45}
46
47impl BpmnDelegateBinding {
48    /// A delegate key mapped to an Orvanta script. `delegate_key` is opaque and compared byte-for-byte; it is never interpreted as a class name, a path or a URL. `path` — not the key — is the ACL anchor that RLS and ownership checks are evaluated against.
49    pub fn new(path: String, key_kind: models::DelegateKeyKind, delegate_key: String, kind: models::DelegateBindingKind, summary: String, extra_perms: std::collections::HashMap<String, bool>, edited_by: String, edited_at: String) -> BpmnDelegateBinding {
50        BpmnDelegateBinding {
51            path,
52            key_kind,
53            delegate_key,
54            kind,
55            script_path: None,
56            reason: None,
57            outputs: None,
58            exception_map: None,
59            summary,
60            extra_perms,
61            edited_by,
62            edited_at,
63        }
64    }
65}
66