vapi_client/models/
metrics.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Metrics {
17    #[serde(rename = "orgId")]
18    pub org_id: String,
19    #[serde(rename = "rangeStart")]
20    pub range_start: String,
21    #[serde(rename = "rangeEnd")]
22    pub range_end: String,
23    #[serde(rename = "bill")]
24    pub bill: f64,
25    #[serde(rename = "billWithinBillingLimit")]
26    pub bill_within_billing_limit: bool,
27    #[serde(rename = "billDailyBreakdown")]
28    pub bill_daily_breakdown: serde_json::Value,
29    #[serde(rename = "callActive")]
30    pub call_active: f64,
31    #[serde(rename = "callActiveWithinConcurrencyLimit")]
32    pub call_active_within_concurrency_limit: bool,
33    #[serde(rename = "callMinutes")]
34    pub call_minutes: f64,
35    #[serde(rename = "callMinutesDailyBreakdown")]
36    pub call_minutes_daily_breakdown: serde_json::Value,
37    #[serde(rename = "callMinutesAverage")]
38    pub call_minutes_average: f64,
39    #[serde(rename = "callMinutesAverageDailyBreakdown")]
40    pub call_minutes_average_daily_breakdown: serde_json::Value,
41    #[serde(rename = "callCount")]
42    pub call_count: f64,
43    #[serde(rename = "callCountDailyBreakdown")]
44    pub call_count_daily_breakdown: serde_json::Value,
45}
46
47impl Metrics {
48    pub fn new(
49        org_id: String,
50        range_start: String,
51        range_end: String,
52        bill: f64,
53        bill_within_billing_limit: bool,
54        bill_daily_breakdown: serde_json::Value,
55        call_active: f64,
56        call_active_within_concurrency_limit: bool,
57        call_minutes: f64,
58        call_minutes_daily_breakdown: serde_json::Value,
59        call_minutes_average: f64,
60        call_minutes_average_daily_breakdown: serde_json::Value,
61        call_count: f64,
62        call_count_daily_breakdown: serde_json::Value,
63    ) -> Metrics {
64        Metrics {
65            org_id,
66            range_start,
67            range_end,
68            bill,
69            bill_within_billing_limit,
70            bill_daily_breakdown,
71            call_active,
72            call_active_within_concurrency_limit,
73            call_minutes,
74            call_minutes_daily_breakdown,
75            call_minutes_average,
76            call_minutes_average_daily_breakdown,
77            call_count,
78            call_count_daily_breakdown,
79        }
80    }
81}