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 EditHttpTrigger {
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "script_path")]
    pub script_path: String,
    #[serde(rename = "route_path", skip_serializing_if = "Option::is_none")]
    pub route_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 = "workspaced_route", skip_serializing_if = "Option::is_none")]
    pub workspaced_route: Option<bool>,
    #[serde(rename = "static_asset_config", skip_serializing_if = "Option::is_none")]
    pub static_asset_config: Option<Box<models::NewHttpTriggerStaticAssetConfig>>,
    #[serde(rename = "authentication_resource_path", skip_serializing_if = "Option::is_none")]
    pub authentication_resource_path: Option<String>,
    #[serde(rename = "is_flow")]
    pub is_flow: bool,
    #[serde(rename = "http_method")]
    pub http_method: models::HttpMethod,
    #[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 = "wrap_body", skip_serializing_if = "Option::is_none")]
    pub wrap_body: Option<bool>,
    #[serde(rename = "raw_string", skip_serializing_if = "Option::is_none")]
    pub raw_string: Option<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>>,
}

impl EditHttpTrigger {
    pub fn new(path: String, script_path: String, is_flow: bool, http_method: models::HttpMethod, is_async: bool, authentication_method: models::AuthenticationMethod, is_static_website: bool) -> EditHttpTrigger {
        EditHttpTrigger {
            path,
            script_path,
            route_path: None,
            summary: None,
            description: None,
            workspaced_route: None,
            static_asset_config: None,
            authentication_resource_path: None,
            is_flow,
            http_method,
            is_async,
            authentication_method,
            is_static_website,
            wrap_body: None,
            raw_string: None,
            error_handler_path: None,
            error_handler_args: None,
            retry: None,
        }
    }
}