Skip to main content

orvanta_api/models/
create_draft_request.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateDraftRequest {
16    #[serde(rename = "path")]
17    pub path: String,
18    #[serde(rename = "typ")]
19    pub typ: Typ,
20    #[serde(rename = "value", deserialize_with = "Option::deserialize")]
21    pub value: Option<serde_json::Value>,
22}
23
24impl CreateDraftRequest {
25    pub fn new(path: String, typ: Typ, value: Option<serde_json::Value>) -> CreateDraftRequest {
26        CreateDraftRequest {
27            path,
28            typ,
29            value,
30        }
31    }
32}
33/// 
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Typ {
36    #[serde(rename = "flow")]
37    Flow,
38    #[serde(rename = "script")]
39    Script,
40    #[serde(rename = "bpmn")]
41    Bpmn,
42    #[serde(rename = "dmn_decision")]
43    DmnDecision,
44    #[serde(rename = "cmmn")]
45    Cmmn,
46}
47
48impl Default for Typ {
49    fn default() -> Typ {
50        Self::Flow
51    }
52}
53