/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.6
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CompareSummary {
    /// Total number of items with differences
    #[serde(rename = "total_diffs")]
    pub total_diffs: i32,
    /// Total number of ahead changes
    #[serde(rename = "total_ahead")]
    pub total_ahead: i32,
    /// Total number of behind changes
    #[serde(rename = "total_behind")]
    pub total_behind: i32,
    /// Number of scripts with differences
    #[serde(rename = "scripts_changed")]
    pub scripts_changed: i32,
    /// Number of flows with differences
    #[serde(rename = "flows_changed")]
    pub flows_changed: i32,
    /// Number of apps with differences
    #[serde(rename = "apps_changed")]
    pub apps_changed: i32,
    /// Number of resources with differences
    #[serde(rename = "resources_changed")]
    pub resources_changed: i32,
    /// Number of variables with differences
    #[serde(rename = "variables_changed")]
    pub variables_changed: i32,
    /// Number of resource types with differences
    #[serde(rename = "resource_types_changed")]
    pub resource_types_changed: i32,
    /// Number of folders with differences
    #[serde(rename = "folders_changed")]
    pub folders_changed: i32,
    /// Number of schedules with differences
    #[serde(rename = "schedules_changed")]
    pub schedules_changed: i32,
    /// Number of triggers with differences (sum across all trigger kinds)
    #[serde(rename = "triggers_changed")]
    pub triggers_changed: i32,
    /// Number of items that are both ahead and behind (conflicts)
    #[serde(rename = "conflicts")]
    pub conflicts: i32,
}

impl CompareSummary {
    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, schedules_changed: i32, triggers_changed: i32, conflicts: i32) -> CompareSummary {
        CompareSummary {
            total_diffs,
            total_ahead,
            total_behind,
            scripts_changed,
            flows_changed,
            apps_changed,
            resources_changed,
            variables_changed,
            resource_types_changed,
            folders_changed,
            schedules_changed,
            triggers_changed,
            conflicts,
        }
    }
}

