use serde::{Deserialize, Serialize}; /*
                                      * BigQuery API
                                      *
                                      * A data platform for customers to create, manage, share and query data.
                                      *
                                      * The version of the OpenAPI document: v2
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct QueryTimelineSample {
    /// Total number of units currently being processed by workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample.
    #[serde(rename = "activeUnits", skip_serializing_if = "Option::is_none")]
    pub active_units: Option<String>,
    /// Total parallel units of work completed by this query.
    #[serde(rename = "completedUnits", skip_serializing_if = "Option::is_none")]
    pub completed_units: Option<String>,
    /// Milliseconds elapsed since the start of query execution.
    #[serde(rename = "elapsedMs", skip_serializing_if = "Option::is_none")]
    pub elapsed_ms: Option<String>,
    /// Units of work that can be scheduled immediately. Providing additional slots for these units of work will speed up the query, provided no other query in the reservation needs additional slots.
    #[serde(
        rename = "estimatedRunnableUnits",
        skip_serializing_if = "Option::is_none"
    )]
    pub estimated_runnable_units: Option<String>,
    /// Total units of work remaining for the query. This number can be revised (increased or decreased) while the query is running.
    #[serde(rename = "pendingUnits", skip_serializing_if = "Option::is_none")]
    pub pending_units: Option<String>,
    /// Cumulative slot-ms consumed by the query.
    #[serde(rename = "totalSlotMs", skip_serializing_if = "Option::is_none")]
    pub total_slot_ms: Option<String>,
}

impl QueryTimelineSample {
    pub fn new() -> QueryTimelineSample {
        QueryTimelineSample {
            active_units: None,
            completed_units: None,
            elapsed_ms: None,
            estimated_runnable_units: None,
            pending_units: None,
            total_slot_ms: None,
        }
    }
}
