use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NewHttpTrigger {
#[serde(rename = "path")]
pub path: String,
#[serde(rename = "script_path")]
pub script_path: String,
#[serde(rename = "route_path")]
pub route_path: String,
#[serde(rename = "workspaced_route", skip_serializing_if = "Option::is_none")]
pub workspaced_route: Option<bool>,
#[serde(rename = "summary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub summary: Option<Option<String>>,
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub description: Option<Option<String>>,
#[serde(rename = "static_asset_config", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub static_asset_config: Option<Option<Box<models::NewHttpTriggerStaticAssetConfig>>>,
#[serde(rename = "is_flow")]
pub is_flow: bool,
#[serde(rename = "http_method")]
pub http_method: models::HttpMethod,
#[serde(rename = "authentication_resource_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub authentication_resource_path: Option<Option<String>>,
#[serde(rename = "is_async", skip_serializing_if = "Option::is_none")]
pub is_async: Option<bool>,
#[serde(rename = "request_type", skip_serializing_if = "Option::is_none")]
pub request_type: Option<models::HttpRequestType>,
#[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 = "mode", skip_serializing_if = "Option::is_none")]
pub mode: Option<models::TriggerMode>,
#[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>,
#[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 = "permissioned_as", skip_serializing_if = "Option::is_none")]
pub permissioned_as: Option<String>,
#[serde(rename = "preserve_permissioned_as", skip_serializing_if = "Option::is_none")]
pub preserve_permissioned_as: Option<bool>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<String>>,
}
impl NewHttpTrigger {
pub fn new(path: String, script_path: String, route_path: String, is_flow: bool, http_method: models::HttpMethod, authentication_method: models::AuthenticationMethod, is_static_website: bool) -> NewHttpTrigger {
NewHttpTrigger {
path,
script_path,
route_path,
workspaced_route: None,
summary: None,
description: None,
static_asset_config: None,
is_flow,
http_method,
authentication_resource_path: None,
is_async: None,
request_type: None,
authentication_method,
is_static_website,
wrap_body: None,
mode: None,
raw_string: None,
error_handler_path: None,
error_handler_args: None,
retry: None,
permissioned_as: None,
preserve_permissioned_as: None,
labels: None,
}
}
}