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 RouteCandidate {
    /// Account is the provider-side account identifier.
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<String>,
    /// Available reports whether the candidate is routable right now.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    /// Billing is the cost consequence of dialing this candidate: plan (the user's own subscription) or commerce (the metered gateway path).
    #[serde(rename = "billing", skip_serializing_if = "Option::is_none")]
    pub billing: Option<String>,
    /// HeadroomPct is the remaining rate-limit capacity, 0..100. A link with no snapshot counts as full headroom.
    #[serde(rename = "headroomPct", skip_serializing_if = "Option::is_none")]
    pub headroom_pct: Option<f64>,
    /// Host is that machine's hostname label.
    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
    pub host: Option<String>,
    /// Kind is how the account authenticates: subscription or apikey.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// LinkID is the underlying link's opaque handle.
    #[serde(rename = "linkId", skip_serializing_if = "Option::is_none")]
    pub link_id: Option<String>,
    /// Machine is the machine the account is signed in on.
    #[serde(rename = "machine", skip_serializing_if = "Option::is_none")]
    pub machine: Option<String>,
    /// Plan is the provider plan label the account is on.
    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
    pub plan: Option<String>,
    /// Provider is the AI provider the candidate account belongs to.
    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    /// Reason says why the candidate is not routable, when Available is false.
    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
}

impl RouteCandidate {
    pub fn new() -> RouteCandidate {
        RouteCandidate {
            account: None,
            available: None,
            billing: None,
            headroom_pct: None,
            host: None,
            kind: None,
            link_id: None,
            machine: None,
            plan: None,
            provider: None,
            reason: None,
        }
    }
}