Skip to main content

hanzo_client/models/
trigger_view.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
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 TriggerView {
16    /// whether it currently fires
17    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
18    pub enabled: Option<bool>,
19    /// the function it calls
20    #[serde(rename = "functionName", skip_serializing_if = "Option::is_none")]
21    pub function_name: Option<String>,
22    /// the trigger's handle
23    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<String>,
25    /// a human label for it
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28    /// the path it calls
29    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
30    pub target: Option<String>,
31    /// what kind of trigger it is; HTTP is the only one today
32    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
33    pub r#type: Option<String>,
34}
35
36impl TriggerView {
37    pub fn new() -> TriggerView {
38        TriggerView {
39            enabled: None,
40            function_name: None,
41            id: None,
42            name: None,
43            target: None,
44            r#type: None,
45        }
46    }
47}
48