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 LinkView {
    /// Account is the provider-side account identifier, when the collector knows it.
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<String>,
    /// Billing is how this account's inference bills — plan (the user's own subscription, metered here for visibility only) or commerce (the gateway path). Derived from Kind, never stored.
    #[serde(rename = "billing", skip_serializing_if = "Option::is_none")]
    pub billing: Option<String>,
    /// CreatedAt is when the link was first registered, RFC 3339 UTC.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Host is the machine's human hostname label, from its most recent report.
    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
    pub host: Option<String>,
    /// ID is the link's opaque handle (\"link_\" + 32 hex chars).
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Kind is how the account authenticates: subscription or apikey.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// LastSeen is when the account last reported, RFC 3339 UTC.
    #[serde(rename = "lastSeen", skip_serializing_if = "Option::is_none")]
    pub last_seen: Option<String>,
    /// Machine is the stable machine identifier the collector reports.
    #[serde(rename = "machine", skip_serializing_if = "Option::is_none")]
    pub machine: Option<String>,
    /// OS is the machine's operating system label.
    #[serde(rename = "os", skip_serializing_if = "Option::is_none")]
    pub os: Option<String>,
    /// Plan is the provider plan label (e.g. \"Claude Max\").
    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
    pub plan: Option<String>,
    /// Provider is the AI provider this account belongs to (claude, openai, hanzo…).
    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    /// Status is linked or revoked. Revoked rows are retained for history.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// UpdatedAt is when the link was last refreshed, RFC 3339 UTC.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    #[serde(rename = "usage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub usage: Option<Option<serde_json::Value>>,
    /// User is the owning subject — the validated caller who registered the link.
    #[serde(rename = "user", skip_serializing_if = "Option::is_none")]
    pub user: Option<String>,
}

impl LinkView {
    pub fn new() -> LinkView {
        LinkView {
            account: None,
            billing: None,
            created_at: None,
            host: None,
            id: None,
            kind: None,
            last_seen: None,
            machine: None,
            os: None,
            plan: None,
            provider: None,
            status: None,
            updated_at: None,
            usage: None,
            user: None,
        }
    }
}