babelforce-manager-sdk 0.42.3

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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MetricResponseRequest {
    #[serde(rename = "id")]
    pub id: models::MetricId,
    /// Evaluation Time of the Metric
    #[serde(rename = "runtime", deserialize_with = "Option::deserialize")]
    pub runtime: Option<serde_json::Value>,
    #[serde(rename = "timeRange")]
    pub time_range: Box<models::MetricResponseRequestTimeRange>,
}

impl MetricResponseRequest {
    pub fn new(
        id: models::MetricId,
        runtime: Option<serde_json::Value>,
        time_range: models::MetricResponseRequestTimeRange,
    ) -> MetricResponseRequest {
        MetricResponseRequest {
            id,
            runtime,
            time_range: Box::new(time_range),
        }
    }
}