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

/// 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.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BpmnDelegateBinding {
    #[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,
    /// Present iff `kind` is `script`.
    #[serde(rename = "script_path", skip_serializing_if = "Option::is_none")]
    pub script_path: Option<String>,
    /// Present iff `kind` is `noop` or `fail`; required there.
    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
    /// #635 `ParamMapping` — how the result lands in process variables.
    #[serde(rename = "outputs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub outputs: Option<Option<serde_json::Value>>,
    /// `mapException` as a catch-all.
    #[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")]
    pub summary: String,
    #[serde(rename = "extra_perms")]
    pub extra_perms: std::collections::HashMap<String, bool>,
    #[serde(rename = "edited_by")]
    pub edited_by: String,
    #[serde(rename = "edited_at")]
    pub edited_at: String,
}

impl 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.
    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 {
        BpmnDelegateBinding {
            path,
            key_kind,
            delegate_key,
            kind,
            script_path: None,
            reason: None,
            outputs: None,
            exception_map: None,
            summary,
            extra_perms,
            edited_by,
            edited_at,
        }
    }
}