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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* 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,
}
}
}