windmill-api 1.684.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.684.1
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListableApp {
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "summary")]
    pub summary: String,
    #[serde(rename = "version")]
    pub version: i32,
    #[serde(rename = "extra_perms")]
    pub extra_perms: std::collections::HashMap<String, bool>,
    #[serde(rename = "starred", skip_serializing_if = "Option::is_none")]
    pub starred: Option<bool>,
    #[serde(rename = "edited_at")]
    pub edited_at: String,
    #[serde(rename = "execution_mode")]
    pub execution_mode: ExecutionMode,
    #[serde(rename = "raw_app", skip_serializing_if = "Option::is_none")]
    pub raw_app: Option<bool>,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
}

impl ListableApp {
    pub fn new(id: i32, workspace_id: String, path: String, summary: String, version: i32, extra_perms: std::collections::HashMap<String, bool>, edited_at: String, execution_mode: ExecutionMode) -> ListableApp {
        ListableApp {
            id,
            workspace_id,
            path,
            summary,
            version,
            extra_perms,
            starred: None,
            edited_at,
            execution_mode,
            raw_app: None,
            labels: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ExecutionMode {
    #[serde(rename = "viewer")]
    Viewer,
    #[serde(rename = "publisher")]
    Publisher,
    #[serde(rename = "anonymous")]
    Anonymous,
}

impl Default for ExecutionMode {
    fn default() -> ExecutionMode {
        Self::Viewer
    }
}