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 CodeView {
    /// Clicks is how many pings this code has taken. The one STORED counter here and pure vanity: no accrual or payout reads it, pings are coalesced in memory and flushed in batches, and a dropped tally is accepted rather than contending with the money write path. Do not reconcile it against anything.
    #[serde(rename = "clicks", skip_serializing_if = "Option::is_none")]
    pub clicks: Option<i32>,
    /// Code is the link's slug — 3–32 chars of a–z, 0–9 and hyphen — unique across the WHOLE directory, so any affiliate's code resolves an attribution.
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    /// Conversions is how many of those signups have actually produced positive commission for the caller. Also derived, from the accrual rows, so it is ≤ signups and lags a referral until the first sweep after it spends.
    #[serde(rename = "conversions", skip_serializing_if = "Option::is_none")]
    pub conversions: Option<i32>,
    /// CreatedAt is when the link was minted, Unix seconds UTC.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<i32>,
    /// Label is the caller's own note for the link (\"twitter\", \"newsletter\"). Cosmetic: trimmed, stripped of control characters, capped at 48 bytes, and never part of the code. \"primary\" on the link mirrored at approval.
    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    /// Signups is how many orgs were attributed with this code — DERIVED by counting attribution edges, never stored, so it cannot drift from the ledger.
    #[serde(rename = "signups", skip_serializing_if = "Option::is_none")]
    pub signups: Option<i32>,
    /// URL is the full shareable link, the brand host plus ?aff=<code>. The host is the deployment's own brand, so a Lux or Zoo install never mints a hanzo.ai link.
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

impl CodeView {
    pub fn new() -> CodeView {
        CodeView {
            clicks: None,
            code: None,
            conversions: None,
            created_at: None,
            label: None,
            signups: None,
            url: None,
        }
    }
}