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 RiskEvent {
/// At is when it happened, RFC 3339. Empty means now. It must sit inside the thirty-day window the aggregates keep and no more than two minutes ahead of this plane's clock; anything outside that is REFUSED rather than quietly accepted, because a future timestamp moves the aggregates' leading edge and leaves every later event for that subject reading as though it never happened. History older than the window is folded in from your own event surface, not through this endpoint.
#[serde(rename = "at", skip_serializing_if = "Option::is_none")]
pub at: Option<String>,
/// Device is the device fingerprint, if any. It is the axis that surfaces several nominally unrelated subjects acting as one.
#[serde(rename = "device", skip_serializing_if = "Option::is_none")]
pub device: Option<String>,
/// ID is the caller's own stable identifier for the event. It selects the below-the-line review sample by hash, so a counter would make the sample steerable — use the id the event already has.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Kind is whose behaviour this is: person, session or account. It namespaces the subject, so a person and an account that share an identifier stay two subjects.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Nano is the value moved, in nano-USD. Omit it for an event that moves no money: the value features then read BLIND rather than being told the amount was zero, and the difference is reported on the model state.
#[serde(rename = "nano", skip_serializing_if = "Option::is_none")]
pub nano: Option<i32>,
/// Peer is the counterparty, if any. It is an aggregation axis of its own — \"unfamiliar\" is a fact about a relationship and not about either party.
#[serde(rename = "peer", skip_serializing_if = "Option::is_none")]
pub peer: Option<String>,
/// Subject is the identifier on that kind.
#[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
}
impl RiskEvent {
pub fn new() -> RiskEvent {
RiskEvent {
at: None,
device: None,
id: None,
kind: None,
nano: None,
peer: None,
subject: None,
}
}
}