Skip to main content

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: 6.3.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 : `fields` is the only kind: it deliberately keeps the declared-fields fallback, 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. Before 6.0.0 a binding could also carry `app`, naming an Orvanta app to render in place of the declared fields; apps were removed (#1720) and the kind with them (#1759).
15/// `fields` is the only kind: it deliberately keeps the declared-fields fallback, 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. Before 6.0.0 a binding could also carry `app`, naming an Orvanta app to render in place of the declared fields; apps were removed (#1720) and the kind with them (#1759).
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum FormBindingKind {
18    #[serde(rename = "fields")]
19    Fields,
20
21}
22
23impl std::fmt::Display for FormBindingKind {
24    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
25        match self {
26            Self::Fields => write!(f, "fields"),
27        }
28    }
29}
30
31impl Default for FormBindingKind {
32    fn default() -> FormBindingKind {
33        Self::Fields
34    }
35}
36