Skip to main content

orvanta_api/models/
bpmn_form_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: 4.1.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BpmnFormBinding : A foreign `formKey` mapped to an Orvanta app. `form_key` is opaque and compared byte-for-byte; it is never interpreted as 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 BpmnFormBinding {
17    #[serde(rename = "path")]
18    pub path: String,
19    #[serde(rename = "form_key")]
20    pub form_key: String,
21    #[serde(rename = "kind")]
22    pub kind: models::FormBindingKind,
23    /// Present iff `kind` is `app`.
24    #[serde(rename = "app_path", skip_serializing_if = "Option::is_none")]
25    pub app_path: Option<String>,
26    /// Present iff `kind` is `fields`; required there.
27    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
28    pub reason: Option<String>,
29    #[serde(rename = "summary")]
30    pub summary: String,
31    #[serde(rename = "extra_perms")]
32    pub extra_perms: std::collections::HashMap<String, bool>,
33    #[serde(rename = "edited_by")]
34    pub edited_by: String,
35    #[serde(rename = "edited_at")]
36    pub edited_at: String,
37}
38
39impl BpmnFormBinding {
40    /// A foreign `formKey` mapped to an Orvanta app. `form_key` is opaque and compared byte-for-byte; it is never interpreted as a path or a URL. `path` -- not the key -- is the ACL anchor that RLS and ownership checks are evaluated against.
41    pub fn new(path: String, form_key: String, kind: models::FormBindingKind, summary: String, extra_perms: std::collections::HashMap<String, bool>, edited_by: String, edited_at: String) -> BpmnFormBinding {
42        BpmnFormBinding {
43            path,
44            form_key,
45            kind,
46            app_path: None,
47            reason: None,
48            summary,
49            extra_perms,
50            edited_by,
51            edited_at,
52        }
53    }
54}
55