windmill-api 1.776.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.776.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkspaceComparison {
    /// All items with changes ahead are visible by the user of the request.
    #[serde(rename = "all_ahead_items_visible")]
    pub all_ahead_items_visible: bool,
    /// All items with changes behind are visible by the user of the request.
    #[serde(rename = "all_behind_items_visible")]
    pub all_behind_items_visible: bool,
    /// Whether the comparison was skipped. This happens with old forks that where not being kept track of
    #[serde(rename = "skipped_comparison")]
    pub skipped_comparison: bool,
    /// List of differences found between workspaces
    #[serde(rename = "diffs")]
    pub diffs: Vec<models::WorkspaceItemDiff>,
    #[serde(rename = "summary")]
    pub summary: Box<models::CompareSummary>,
    #[serde(rename = "hidden_ahead")]
    pub hidden_ahead: Box<models::HiddenItemsSummary>,
    #[serde(rename = "hidden_behind")]
    pub hidden_behind: Box<models::HiddenItemsSummary>,
    /// For a pair outside the fork lineage, when its candidate set was last seeded by an explicit full scan. Absent when the pair has never been scanned (an empty `diffs` then says nothing about whether the workspaces agree) or when the pair is a lineage pair, which the tally keeps current.
    #[serde(rename = "full_scan_at", skip_serializing_if = "Option::is_none")]
    pub full_scan_at: Option<String>,
}

impl WorkspaceComparison {
    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 {
        WorkspaceComparison {
            all_ahead_items_visible,
            all_behind_items_visible,
            skipped_comparison,
            diffs,
            summary: Box::new(summary),
            hidden_ahead: Box::new(hidden_ahead),
            hidden_behind: Box::new(hidden_behind),
            full_scan_at: None,
        }
    }
}