Skip to main content

orvanta_api/models/
bpmn_unresolved_assignment.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: 6.5.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BpmnUnresolvedAssignment : One assignment expression the engine could not turn into an identity at park time (#1123), and why. The engine resolves only expressions that are a plain variable read (`${approver}`, `${order.approver}`); interpolation, arithmetic, calls and engine-API roots are refused rather than guessed at, because reading JUEL as Javascript would change their meaning. An unset variable is refused the same way. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BpmnUnresolvedAssignment {
17    /// which assignment slot the expression sat in
18    #[serde(rename = "slot")]
19    pub slot: Slot,
20    /// the expression as authored, delimiters included
21    #[serde(rename = "source")]
22    pub source: String,
23    /// a sentence naming what stopped it, addressed to whoever wrote the model
24    #[serde(rename = "reason")]
25    pub reason: String,
26}
27
28impl BpmnUnresolvedAssignment {
29    /// One assignment expression the engine could not turn into an identity at park time (#1123), and why. The engine resolves only expressions that are a plain variable read (`${approver}`, `${order.approver}`); interpolation, arithmetic, calls and engine-API roots are refused rather than guessed at, because reading JUEL as Javascript would change their meaning. An unset variable is refused the same way. 
30    pub fn new(slot: Slot, source: String, reason: String) -> BpmnUnresolvedAssignment {
31        BpmnUnresolvedAssignment {
32            slot,
33            source,
34            reason,
35        }
36    }
37}
38/// which assignment slot the expression sat in
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Slot {
41    #[serde(rename = "assignee")]
42    Assignee,
43    #[serde(rename = "owner")]
44    Owner,
45    #[serde(rename = "candidate_users")]
46    CandidateUsers,
47    #[serde(rename = "candidate_groups")]
48    CandidateGroups,
49}
50
51impl Default for Slot {
52    fn default() -> Slot {
53        Self::Assignee
54    }
55}
56