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.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 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}
31
32impl WorkspaceComparison {
33    pub fn new(all_ahead_items_visible: bool, all_behind_items_visible: bool, skipped_comparison: bool, diffs: Vec<models::WorkspaceItemDiff>, summary: models::CompareSummary) -> WorkspaceComparison {
34        WorkspaceComparison {
35            all_ahead_items_visible,
36            all_behind_items_visible,
37            skipped_comparison,
38            diffs,
39            summary: Box::new(summary),
40        }
41    }
42}
43