Skip to main content

hanzo_client/models/
connection_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 ConnectionView {
16    /// Account is the human label of the connected third-party account (the Slack team name, the GitHub org login). Provider-supplied and sanitized on ingest.
17    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
18    pub account: Option<String>,
19    /// ConnectedAt is when the connection was last (re)established, RFC 3339 UTC.
20    #[serde(rename = "connectedAt", skip_serializing_if = "Option::is_none")]
21    pub connected_at: Option<String>,
22    /// ExternalID is the provider's own id for the account (Slack team.id, GitHub installation_id) — the value inbound webhooks are mapped back to this org by.
23    #[serde(rename = "externalId", skip_serializing_if = "Option::is_none")]
24    pub external_id: Option<String>,
25    /// Scopes are the permissions the provider granted. Never null; [] when none.
26    #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
27    pub scopes: Option<Vec<String>>,
28}
29
30impl ConnectionView {
31    pub fn new() -> ConnectionView {
32        ConnectionView {
33            account: None,
34            connected_at: None,
35            external_id: None,
36            scopes: None,
37        }
38    }
39}
40