Skip to main content

windmill_api/models/
compare_summary.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.622.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 CompareSummary {
16    /// Total number of items with differences
17    #[serde(rename = "total_diffs")]
18    pub total_diffs: i32,
19    /// Total number of ahead changes
20    #[serde(rename = "total_ahead")]
21    pub total_ahead: i32,
22    /// Total number of behind changes
23    #[serde(rename = "total_behind")]
24    pub total_behind: i32,
25    /// Number of scripts with differences
26    #[serde(rename = "scripts_changed")]
27    pub scripts_changed: i32,
28    /// Number of flows with differences
29    #[serde(rename = "flows_changed")]
30    pub flows_changed: i32,
31    /// Number of apps with differences
32    #[serde(rename = "apps_changed")]
33    pub apps_changed: i32,
34    /// Number of resources with differences
35    #[serde(rename = "resources_changed")]
36    pub resources_changed: i32,
37    /// Number of variables with differences
38    #[serde(rename = "variables_changed")]
39    pub variables_changed: i32,
40    /// Number of resource types with differences
41    #[serde(rename = "resource_types_changed")]
42    pub resource_types_changed: i32,
43    /// Number of folders with differences
44    #[serde(rename = "folders_changed")]
45    pub folders_changed: i32,
46    /// Number of items that are both ahead and behind (conflicts)
47    #[serde(rename = "conflicts")]
48    pub conflicts: i32,
49}
50
51impl CompareSummary {
52    pub fn new(total_diffs: i32, total_ahead: i32, total_behind: i32, scripts_changed: i32, flows_changed: i32, apps_changed: i32, resources_changed: i32, variables_changed: i32, resource_types_changed: i32, folders_changed: i32, conflicts: i32) -> CompareSummary {
53        CompareSummary {
54            total_diffs,
55            total_ahead,
56            total_behind,
57            scripts_changed,
58            flows_changed,
59            apps_changed,
60            resources_changed,
61            variables_changed,
62            resource_types_changed,
63            folders_changed,
64            conflicts,
65        }
66    }
67}
68