Skip to main content

windmill_api/models/
auto_pull_settings.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.881.1
7 * Contact: contact@windmill.dev
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 AutoPullSettings {
16    #[serde(rename = "enabled")]
17    pub enabled: bool,
18    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
19    pub mode: Option<models::AutoPullMode>,
20    #[serde(rename = "poll_interval_s", skip_serializing_if = "Option::is_none")]
21    pub poll_interval_s: Option<i32>,
22    #[serde(rename = "sync_forks", skip_serializing_if = "Option::is_none")]
23    pub sync_forks: Option<bool>,
24    #[serde(rename = "webhook_id", skip_serializing_if = "Option::is_none")]
25    pub webhook_id: Option<i64>,
26    #[serde(rename = "webhook_secret", skip_serializing_if = "Option::is_none")]
27    pub webhook_secret: Option<String>,
28    #[serde(rename = "webhook_url", skip_serializing_if = "Option::is_none")]
29    pub webhook_url: Option<String>,
30    #[serde(rename = "webhook_error", skip_serializing_if = "Option::is_none")]
31    pub webhook_error: Option<String>,
32    /// The webhook_id a delivery from the host last arrived for. Polling relaxes to about every 10 minutes only while it matches webhook_id. Set by the server.
33    #[serde(rename = "webhook_verified_id", skip_serializing_if = "Option::is_none")]
34    pub webhook_verified_id: Option<i64>,
35    #[serde(rename = "last_synced_sha", skip_serializing_if = "Option::is_none")]
36    pub last_synced_sha: Option<std::collections::HashMap<String, String>>,
37    #[serde(rename = "last_pull_status", skip_serializing_if = "Option::is_none")]
38    pub last_pull_status: Option<Box<models::AutoPullStatus>>,
39    /// Email of the admin automatic pulls apply changes as. Set by the server when the settings are saved.
40    #[serde(rename = "enabled_by", skip_serializing_if = "Option::is_none")]
41    pub enabled_by: Option<String>,
42}
43
44impl AutoPullSettings {
45    pub fn new(enabled: bool) -> AutoPullSettings {
46        AutoPullSettings {
47            enabled,
48            mode: None,
49            poll_interval_s: None,
50            sync_forks: None,
51            webhook_id: None,
52            webhook_secret: None,
53            webhook_url: None,
54            webhook_error: None,
55            webhook_verified_id: None,
56            last_synced_sha: None,
57            last_pull_status: None,
58            enabled_by: None,
59        }
60    }
61}
62