orvanta_api/models/delegate_binding_kind.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/// DelegateBindingKind : `script` runs the bound script as an ordinary child job. `noop` completes the element immediately, writes `results.<element_id> = null` and records the skip in the job trace — it grants nothing, which makes it the safest row kind, and its `reason` is mandatory. `fail` is a deploy error naming the element: \"we looked and decided not yet\", a different state from unbound (\"nobody looked\"), and the difference is carried entirely by `reason`.
15/// `script` runs the bound script as an ordinary child job. `noop` completes the element immediately, writes `results.<element_id> = null` and records the skip in the job trace — it grants nothing, which makes it the safest row kind, and its `reason` is mandatory. `fail` is a deploy error naming the element: \"we looked and decided not yet\", a different state from unbound (\"nobody looked\"), and the difference is carried entirely by `reason`.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum DelegateBindingKind {
18 #[serde(rename = "script")]
19 Script,
20 #[serde(rename = "noop")]
21 Noop,
22 #[serde(rename = "fail")]
23 Fail,
24
25}
26
27impl std::fmt::Display for DelegateBindingKind {
28 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29 match self {
30 Self::Script => write!(f, "script"),
31 Self::Noop => write!(f, "noop"),
32 Self::Fail => write!(f, "fail"),
33 }
34 }
35}
36
37impl Default for DelegateBindingKind {
38 fn default() -> DelegateBindingKind {
39 Self::Script
40 }
41}
42