/*
* 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 RiskLabelOut {
/// Duplicate is how many members this tenant already held, byte for byte. The idempotency key is the assertion's CONTENT digest — kind, subject, at, seen, disposition, source, evidence, the asserting identity and confidence, folded in length-prefixed — so a webhook redelivering one chargeback is a duplicate and costs nothing, while an assertion differing in ANY of those fields is a DIFFERENT assertion and is recorded beside the first. Nothing was written and nothing was overwritten; it is an outcome, never an error. The asserting identity is in the digest, so the same claim filed by a second credential is two assertions and not a redelivery.
#[serde(rename = "duplicate", skip_serializing_if = "Option::is_none")]
pub duplicate: Option<i32>,
/// Mirror names why the columnar copy did not take this batch, when it did not. The record is already durable in the tenant's own store by then — the warehouse copy exists to make a training join cheap, and its absence is a gap in that join, never a lost label.
#[serde(rename = "mirror", skip_serializing_if = "Option::is_none")]
pub mirror: Option<String>,
/// Pending is how many assertions the derived copy is still to take. Every write attempt carries the backlog forward as well as its own batch, so a warehouse that was unreachable closes its gap on the next write rather than leaving a hole in a training join nothing would report. It is counted under a cap and saturates there: zero means caught up, and a large number means a backlog to work through rather than an inventory to reconcile.
#[serde(rename = "pending", skip_serializing_if = "Option::is_none")]
pub pending: Option<i32>,
/// Recorded is how many members became a NEW row in the tenant's record. Recorded + Duplicate + Refused is exactly the number of labels sent, so a caller reconciling a webhook delivery can do it on the counts alone.
#[serde(rename = "recorded", skip_serializing_if = "Option::is_none")]
pub recorded: Option<i32>,
/// Refused is how many members failed admission and were NOT recorded. Refusal is per member and never discards the rest of the batch: an empty or over-512-byte subject or evidence, a kind, disposition or source outside the closed vocabulary, an `at` or `seen` that is not RFC 3339, a `seen` before the `at` it judges, either instant more than five minutes past the server clock, or a confidence outside [0,1]. Results names which member and why, so the refused ones are exactly the ones to fix and resend.
#[serde(rename = "refused", skip_serializing_if = "Option::is_none")]
pub refused: Option<i32>,
/// Results is per fact, in the order sent, so a caller can retry exactly the members that were refused and can log the content digest of the ones that landed.
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
pub results: Option<Vec<models::RiskLabelResult>>,
}
impl RiskLabelOut {
pub fn new() -> RiskLabelOut {
RiskLabelOut {
duplicate: None,
mirror: None,
pending: None,
recorded: None,
refused: None,
results: None,
}
}
}