1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* 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,
}
}
}