late 0.0.1344

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.526.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AutomationBacktestTotals {
    /// Actions it would have taken. Skipped ones are not counted.
    #[serde(rename = "actions")]
    pub actions: i32,
    #[serde(rename = "pauses")]
    pub pauses: i32,
    #[serde(rename = "activations")]
    pub activations: i32,
    /// Budget changes that raised a budget.
    #[serde(rename = "budgetRaised")]
    pub budget_raised: i32,
    /// Budget changes that lowered a budget.
    #[serde(rename = "budgetLowered")]
    pub budget_lowered: i32,
    /// The net budget change across every budget action, in `currency`.
    #[serde(rename = "budgetChange")]
    pub budget_change: f64,
    #[serde(rename = "notifications")]
    pub notifications: i32,
    /// Actions planned but skipped.
    #[serde(rename = "skipped")]
    pub skipped: i32,
    /// Distinct objects it would have acted on.
    #[serde(rename = "subjects")]
    pub subjects: i32,
    /// Matches left alone by the cooldown or a cap, summed over the days.
    #[serde(rename = "heldBack")]
    pub held_back: i32,
    #[serde(rename = "daysWithActions")]
    pub days_with_actions: i32,
}

impl AutomationBacktestTotals {
    pub fn new(
        actions: i32,
        pauses: i32,
        activations: i32,
        budget_raised: i32,
        budget_lowered: i32,
        budget_change: f64,
        notifications: i32,
        skipped: i32,
        subjects: i32,
        held_back: i32,
        days_with_actions: i32,
    ) -> AutomationBacktestTotals {
        AutomationBacktestTotals {
            actions,
            pauses,
            activations,
            budget_raised,
            budget_lowered,
            budget_change,
            notifications,
            skipped,
            subjects,
            held_back,
            days_with_actions,
        }
    }
}