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.593.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 items that are both ahead and behind (conflicts)
41    #[serde(rename = "conflicts")]
42    pub conflicts: i32,
43}
44
45impl CompareSummary {
46    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, conflicts: i32) -> CompareSummary {
47        CompareSummary {
48            total_diffs,
49            total_ahead,
50            total_behind,
51            scripts_changed,
52            flows_changed,
53            apps_changed,
54            resources_changed,
55            variables_changed,
56            conflicts,
57        }
58    }
59}
60