Skip to main content

hanzo_client/models/
conn_view.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ConnView {
16    /// Account is the provider's label for the connected account.
17    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
18    pub account: Option<String>,
19    /// ConnectedAt is when the connector was last (re)established, RFC 3339 UTC.
20    #[serde(rename = "connectedAt", skip_serializing_if = "Option::is_none")]
21    pub connected_at: Option<String>,
22    /// ExpiresAt is when the access token expires, RFC 3339 UTC; empty for a non-expiring credential. Reading the token auto-rotates inside the window.
23    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
24    pub expires_at: Option<String>,
25    /// ExternalID is the provider's own id for that account.
26    #[serde(rename = "externalId", skip_serializing_if = "Option::is_none")]
27    pub external_id: Option<String>,
28    /// ID is provider + \":\" + label — what every other connector route addresses.
29    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
30    pub id: Option<String>,
31    /// Label is the caller's name for this connection (\"default\", \"work\").
32    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
33    pub label: Option<String>,
34    /// Provider is the user-scoped provider's registry id.
35    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
36    pub provider: Option<String>,
37    /// Scopes are the permissions the credential carries. Never null; [] when none.
38    #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
39    pub scopes: Option<Vec<String>>,
40}
41
42impl ConnView {
43    pub fn new() -> ConnView {
44        ConnView {
45            account: None,
46            connected_at: None,
47            expires_at: None,
48            external_id: None,
49            id: None,
50            label: None,
51            provider: None,
52            scopes: None,
53        }
54    }
55}
56