/*
* 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 ConnectIn {
/// AccountID is the provider account the credential should be scoped to, for the providers whose Verify needs one (Cloudflare). Ignored by the OAuth path.
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
/// Provider is the connector's registry id, from the :provider path segment.
#[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
pub provider: Option<String>,
/// Token is the customer's provider credential. Its PRESENCE — not its value — is what selects the apikey seal over the OAuth flow for a provider that offers both: {\"token\":\"…\"}, even empty, is an apikey attempt (→ verify, which answers the \"token required\" 400 on an empty value), while a body with no token key (the console Connect button, `hanzo connector add` with no --token) starts OAuth. Read on STDIN by the CLI, never argv; never logged or echoed.
#[serde(rename = "token", skip_serializing_if = "Option::is_none")]
pub token: Option<String>,
}
impl ConnectIn {
pub fn new() -> ConnectIn {
ConnectIn {
account_id: None,
provider: None,
token: None,
}
}
}