hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct O11yPeriodO11yService {
    /// AvgDuration is their average latency, nanoseconds.
    #[serde(rename = "avgDuration", skip_serializing_if = "Option::is_none")]
    pub avg_duration: Option<f64>,
    /// CallRate is calls per second over the window.
    #[serde(rename = "callRate", skip_serializing_if = "Option::is_none")]
    pub call_rate: Option<f64>,
    /// DataWarning carries the entry-point operations the numbers were computed over.
    #[serde(rename = "dataWarning", skip_serializing_if = "Option::is_none")]
    pub data_warning: Option<Box<models::O11yPeriodO11yServiceWarning>>,
    /// ErrorRate is the percentage of calls that errored.
    #[serde(rename = "errorRate", skip_serializing_if = "Option::is_none")]
    pub error_rate: Option<f64>,
    /// FourXXRate is the percentage of calls that answered 4xx.
    #[serde(rename = "fourXXRate", skip_serializing_if = "Option::is_none")]
    pub four_xx_rate: Option<f64>,
    /// Num4XX is how many of the calls answered 4xx.
    #[serde(rename = "num4XX", skip_serializing_if = "Option::is_none")]
    pub num4_xx: Option<i32>,
    /// NumCalls is how many entry-point spans landed in the window.
    #[serde(rename = "numCalls", skip_serializing_if = "Option::is_none")]
    pub num_calls: Option<i32>,
    /// NumErrors is how many of the calls errored.
    #[serde(rename = "numErrors", skip_serializing_if = "Option::is_none")]
    pub num_errors: Option<i32>,
    /// Percentile99 is the p99 latency of its entry-point spans, nanoseconds.
    #[serde(rename = "p99", skip_serializing_if = "Option::is_none")]
    pub p99: Option<f64>,
    /// ServiceName is the service.
    #[serde(rename = "serviceName", skip_serializing_if = "Option::is_none")]
    pub service_name: Option<String>,
}

impl O11yPeriodO11yService {
    pub fn new() -> O11yPeriodO11yService {
        O11yPeriodO11yService {
            avg_duration: None,
            call_rate: None,
            data_warning: None,
            error_rate: None,
            four_xx_rate: None,
            num4_xx: None,
            num_calls: None,
            num_errors: None,
            p99: None,
            service_name: None,
        }
    }
}