windmill-api 1.544.2

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.544.2
 * 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 HttpTrigger {
    #[serde(rename = "route_path")]
    pub route_path: String,
    #[serde(rename = "static_asset_config", skip_serializing_if = "Option::is_none")]
    pub static_asset_config: Option<Box<serde_json::Value>>,
    #[serde(rename = "http_method")]
    pub http_method: models::HttpMethod,
    #[serde(rename = "authentication_resource_path", skip_serializing_if = "Option::is_none")]
    pub authentication_resource_path: Option<String>,
    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
    pub summary: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "is_async")]
    pub is_async: bool,
    #[serde(rename = "authentication_method")]
    pub authentication_method: models::AuthenticationMethod,
    #[serde(rename = "is_static_website")]
    pub is_static_website: bool,
    #[serde(rename = "workspaced_route")]
    pub workspaced_route: bool,
    #[serde(rename = "wrap_body")]
    pub wrap_body: bool,
    #[serde(rename = "raw_string")]
    pub raw_string: bool,
    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
    pub error_handler_path: Option<String>,
    /// The arguments to pass to the script or flow
    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
    pub retry: Option<Box<models::Retry>>,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "script_path")]
    pub script_path: String,
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "extra_perms")]
    pub extra_perms: std::collections::HashMap<String, bool>,
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    #[serde(rename = "edited_by")]
    pub edited_by: String,
    #[serde(rename = "edited_at")]
    pub edited_at: String,
    #[serde(rename = "is_flow")]
    pub is_flow: bool,
}

impl HttpTrigger {
    pub fn new(route_path: String, http_method: models::HttpMethod, is_async: bool, authentication_method: models::AuthenticationMethod, is_static_website: bool, workspaced_route: bool, wrap_body: bool, raw_string: bool, path: String, script_path: String, email: String, extra_perms: std::collections::HashMap<String, bool>, workspace_id: String, edited_by: String, edited_at: String, is_flow: bool) -> HttpTrigger {
        HttpTrigger {
            route_path,
            static_asset_config: None,
            http_method,
            authentication_resource_path: None,
            summary: None,
            description: None,
            is_async,
            authentication_method,
            is_static_website,
            workspaced_route,
            wrap_body,
            raw_string,
            error_handler_path: None,
            error_handler_args: None,
            retry: None,
            path,
            script_path,
            email,
            extra_perms,
            workspace_id,
            edited_by,
            edited_at,
            is_flow,
        }
    }
}