babelforce-manager-sdk 0.44.0

Rust SDK for the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations.
Documentation
/*
 * Manager API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.0-dev
 * Contact: support@babelforce.com
 * Generated by: https://openapi-generator.tech
 */

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

/// MetricResponseRequestTimeRange : Requested Time-Range for the Evaluation
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MetricResponseRequestTimeRange {
    #[serde(rename = "from")]
    pub from: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "to")]
    pub to: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "value")]
    pub value: models::MetricTimeRange,
    /// Total duration of the requested range.
    #[serde(rename = "duration")]
    pub duration: i32,
}

impl MetricResponseRequestTimeRange {
    /// Requested Time-Range for the Evaluation
    pub fn new(
        from: chrono::DateTime<chrono::FixedOffset>,
        to: chrono::DateTime<chrono::FixedOffset>,
        value: models::MetricTimeRange,
        duration: i32,
    ) -> MetricResponseRequestTimeRange {
        MetricResponseRequestTimeRange {
            from,
            to,
            value,
            duration,
        }
    }
}