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 O11yPeriodO11yReductionRule {
    /// Active says whether the rule is in force.
    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
    pub active: Option<bool>,
    /// CreatedAt is when the rule was created.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// CreatedBy is who created it.
    #[serde(rename = "createdBy", skip_serializing_if = "Option::is_none")]
    pub created_by: Option<String>,
    /// EffectiveFrom is when the rule took effect.
    #[serde(rename = "effectiveFrom", skip_serializing_if = "Option::is_none")]
    pub effective_from: Option<String>,
    /// ID is the rule's id.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// IngestedSamples is how many samples arrived while the rule was active.
    #[serde(rename = "ingestedSamples", skip_serializing_if = "Option::is_none")]
    pub ingested_samples: Option<i32>,
    /// IngestedSeries is how many series arrived while the rule was active.
    #[serde(rename = "ingestedSeries", skip_serializing_if = "Option::is_none")]
    pub ingested_series: Option<i32>,
    /// Labels are the label names the rule matches.
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
    /// MatchType is drop or keep.
    #[serde(rename = "matchType", skip_serializing_if = "Option::is_none")]
    pub match_type: Option<String>,
    /// MetricName is the metric the rule governs.
    #[serde(rename = "metricName", skip_serializing_if = "Option::is_none")]
    pub metric_name: Option<String>,
    /// RetainedSamples is how many of them were kept.
    #[serde(rename = "retainedSamples", skip_serializing_if = "Option::is_none")]
    pub retained_samples: Option<i32>,
    /// RetainedSeries is how many of them were kept.
    #[serde(rename = "retainedSeries", skip_serializing_if = "Option::is_none")]
    pub retained_series: Option<i32>,
    /// UpdatedAt is when the rule last changed.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    /// UpdatedBy is who last changed it.
    #[serde(rename = "updatedBy", skip_serializing_if = "Option::is_none")]
    pub updated_by: Option<String>,
}

impl O11yPeriodO11yReductionRule {
    pub fn new() -> O11yPeriodO11yReductionRule {
        O11yPeriodO11yReductionRule {
            active: None,
            created_at: None,
            created_by: None,
            effective_from: None,
            id: None,
            ingested_samples: None,
            ingested_series: None,
            labels: None,
            match_type: None,
            metric_name: None,
            retained_samples: None,
            retained_series: None,
            updated_at: None,
            updated_by: None,
        }
    }
}