Skip to main content

windmill_api/models/
native_trigger_connection.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.848.2
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// NativeTriggerConnection : An account connected for native triggers, stored as an OAuth resource
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct NativeTriggerConnection {
17    /// Path of the resource and variable holding the connection
18    #[serde(rename = "path")]
19    pub path: String,
20    /// Username of whoever connected the account, when the caller can read its resource
21    #[serde(rename = "owner", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub owner: Option<Option<String>>,
23    /// Whether this is the workspace connection, which every member may use
24    #[serde(rename = "workspace")]
25    pub workspace: bool,
26}
27
28impl NativeTriggerConnection {
29    /// An account connected for native triggers, stored as an OAuth resource
30    pub fn new(path: String, workspace: bool) -> NativeTriggerConnection {
31        NativeTriggerConnection {
32            path,
33            owner: None,
34            workspace,
35        }
36    }
37}
38