orvanta_api/models/form_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: 4.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/// FormBindingKind : `app` renders the bound Orvanta app as the task's form, exactly as `orvanta:formRef` does. `fields` deliberately keeps the declared-fields fallback: it grants nothing and changes no behaviour, and exists only to turn \"nobody has looked at this key\" into \"somebody looked and the declared fields are right\" -- which is why its `reason` is mandatory. There is no `fail` kind, because an unresolved form key still leaves a completable task.
15/// `app` renders the bound Orvanta app as the task's form, exactly as `orvanta:formRef` does. `fields` deliberately keeps the declared-fields fallback: it grants nothing and changes no behaviour, and exists only to turn \"nobody has looked at this key\" into \"somebody looked and the declared fields are right\" -- which is why its `reason` is mandatory. There is no `fail` kind, because an unresolved form key still leaves a completable task.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum FormBindingKind {
18 #[serde(rename = "app")]
19 App,
20 #[serde(rename = "fields")]
21 Fields,
22
23}
24
25impl std::fmt::Display for FormBindingKind {
26 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27 match self {
28 Self::App => write!(f, "app"),
29 Self::Fields => write!(f, "fields"),
30 }
31 }
32}
33
34impl Default for FormBindingKind {
35 fn default() -> FormBindingKind {
36 Self::App
37 }
38}
39