Skip to main content

windmill_api/models/
workspace_comparison.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.745.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 WorkspaceComparison {
16    /// All items with changes ahead are visible by the user of the request.
17    #[serde(rename = "all_ahead_items_visible")]
18    pub all_ahead_items_visible: bool,
19    /// All items with changes behind are visible by the user of the request.
20    #[serde(rename = "all_behind_items_visible")]
21    pub all_behind_items_visible: bool,
22    /// Whether the comparison was skipped. This happens with old forks that where not being kept track of
23    #[serde(rename = "skipped_comparison")]
24    pub skipped_comparison: bool,
25    /// List of differences found between workspaces
26    #[serde(rename = "diffs")]
27    pub diffs: Vec<models::WorkspaceItemDiff>,
28    #[serde(rename = "summary")]
29    pub summary: Box<models::CompareSummary>,
30    #[serde(rename = "hidden_ahead")]
31    pub hidden_ahead: Box<models::HiddenItemsSummary>,
32    #[serde(rename = "hidden_behind")]
33    pub hidden_behind: Box<models::HiddenItemsSummary>,
34}
35
36impl WorkspaceComparison {
37    pub fn new(all_ahead_items_visible: bool, all_behind_items_visible: bool, skipped_comparison: bool, diffs: Vec<models::WorkspaceItemDiff>, summary: models::CompareSummary, hidden_ahead: models::HiddenItemsSummary, hidden_behind: models::HiddenItemsSummary) -> WorkspaceComparison {
38        WorkspaceComparison {
39            all_ahead_items_visible,
40            all_behind_items_visible,
41            skipped_comparison,
42            diffs,
43            summary: Box::new(summary),
44            hidden_ahead: Box::new(hidden_ahead),
45            hidden_behind: Box::new(hidden_behind),
46        }
47    }
48}
49