windmill_api/models/
main_arg_signature.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.555.2
7 * Contact: contact@windmill.dev
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 MainArgSignature {
16    #[serde(rename = "type")]
17    pub r#type: Type,
18    #[serde(rename = "error")]
19    pub error: String,
20    #[serde(rename = "star_args")]
21    pub star_args: bool,
22    #[serde(rename = "star_kwargs", skip_serializing_if = "Option::is_none")]
23    pub star_kwargs: Option<bool>,
24    #[serde(rename = "args")]
25    pub args: Vec<models::MainArgSignatureArgsInner>,
26    #[serde(rename = "no_main_func", deserialize_with = "Option::deserialize")]
27    pub no_main_func: Option<bool>,
28    #[serde(rename = "has_preprocessor", deserialize_with = "Option::deserialize")]
29    pub has_preprocessor: Option<bool>,
30}
31
32impl MainArgSignature {
33    pub fn new(r#type: Type, error: String, star_args: bool, args: Vec<models::MainArgSignatureArgsInner>, no_main_func: Option<bool>, has_preprocessor: Option<bool>) -> MainArgSignature {
34        MainArgSignature {
35            r#type,
36            error,
37            star_args,
38            star_kwargs: None,
39            args,
40            no_main_func,
41            has_preprocessor,
42        }
43    }
44}
45/// 
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum Type {
48    #[serde(rename = "Valid")]
49    Valid,
50    #[serde(rename = "Invalid")]
51    Invalid,
52}
53
54impl Default for Type {
55    fn default() -> Type {
56        Self::Valid
57    }
58}
59