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 TrafficCaller {
    /// Action is the verdict currently held against it, if any.
    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
    pub action: Option<String>,
    /// Cred is the caller's key: a credential fingerprint (a per-process one-way digest, not a key) for a validated caller, and \"ip:<addr>\" for one that presented no credential we could validate.
    #[serde(rename = "cred", skip_serializing_if = "Option::is_none")]
    pub cred: Option<String>,
    /// Failures is how many ended 401 or 403.
    #[serde(rename = "failures", skip_serializing_if = "Option::is_none")]
    pub failures: Option<i32>,
    /// HeldUntil is when the held verdict lapses, unix seconds.
    #[serde(rename = "held_until", skip_serializing_if = "Option::is_none")]
    pub held_until: Option<i32>,
    /// Paths is the approximate number of distinct paths it touched (max 64).
    #[serde(rename = "paths", skip_serializing_if = "Option::is_none")]
    pub paths: Option<i32>,
    /// Reason is why that verdict was reached.
    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
    /// Requests is its request count in the window.
    #[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
    pub requests: Option<i32>,
}

impl TrafficCaller {
    pub fn new() -> TrafficCaller {
        TrafficCaller {
            action: None,
            cred: None,
            failures: None,
            held_until: None,
            paths: None,
            reason: None,
            requests: None,
        }
    }
}