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};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct Metrics {
19    #[serde(rename = "orgId")]
20    pub org_id: String,
21    #[serde(rename = "rangeStart")]
22    pub range_start: String,
23    #[serde(rename = "rangeEnd")]
24    pub range_end: String,
25    #[serde(rename = "bill")]
26    pub bill: f64,
27    #[serde(rename = "billWithinBillingLimit")]
28    pub bill_within_billing_limit: bool,
29    #[serde(rename = "billDailyBreakdown")]
30    pub bill_daily_breakdown: serde_json::Value,
31    #[serde(rename = "callActive")]
32    pub call_active: f64,
33    #[serde(rename = "callActiveWithinConcurrencyLimit")]
34    pub call_active_within_concurrency_limit: bool,
35    #[serde(rename = "callMinutes")]
36    pub call_minutes: f64,
37    #[serde(rename = "callMinutesDailyBreakdown")]
38    pub call_minutes_daily_breakdown: serde_json::Value,
39    #[serde(rename = "callMinutesAverage")]
40    pub call_minutes_average: f64,
41    #[serde(rename = "callMinutesAverageDailyBreakdown")]
42    pub call_minutes_average_daily_breakdown: serde_json::Value,
43    #[serde(rename = "callCount")]
44    pub call_count: f64,
45    #[serde(rename = "callCountDailyBreakdown")]
46    pub call_count_daily_breakdown: serde_json::Value,
47}
48
49impl Metrics {
50    pub fn new(
51        org_id: String,
52        range_start: String,
53        range_end: String,
54        bill: f64,
55        bill_within_billing_limit: bool,
56        bill_daily_breakdown: serde_json::Value,
57        call_active: f64,
58        call_active_within_concurrency_limit: bool,
59        call_minutes: f64,
60        call_minutes_daily_breakdown: serde_json::Value,
61        call_minutes_average: f64,
62        call_minutes_average_daily_breakdown: serde_json::Value,
63        call_count: f64,
64        call_count_daily_breakdown: serde_json::Value,
65    ) -> Metrics {
66        Metrics {
67            org_id,
68            range_start,
69            range_end,
70            bill,
71            bill_within_billing_limit,
72            bill_daily_breakdown,
73            call_active,
74            call_active_within_concurrency_limit,
75            call_minutes,
76            call_minutes_daily_breakdown,
77            call_minutes_average,
78            call_minutes_average_daily_breakdown,
79            call_count,
80            call_count_daily_breakdown,
81        }
82    }
83}