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.764.0
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_error", skip_serializing_if = "Option::is_none")]
29    pub webhook_error: Option<String>,
30    #[serde(rename = "last_synced_sha", skip_serializing_if = "Option::is_none")]
31    pub last_synced_sha: Option<std::collections::HashMap<String, String>>,
32    #[serde(rename = "last_pull_status", skip_serializing_if = "Option::is_none")]
33    pub last_pull_status: Option<Box<models::AutoPullStatus>>,
34}
35
36impl AutoPullSettings {
37    pub fn new(enabled: bool) -> AutoPullSettings {
38        AutoPullSettings {
39            enabled,
40            mode: None,
41            poll_interval_s: None,
42            sync_forks: None,
43            webhook_id: None,
44            webhook_secret: None,
45            webhook_error: None,
46            last_synced_sha: None,
47            last_pull_status: None,
48        }
49    }
50}
51