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 O11yPeriodOAuth2 {
    #[serde(rename = "TLSConfig", skip_serializing_if = "Option::is_none")]
    pub tls_config: Option<Box<models::O11yPeriodTlsConfig>>,
    /// Audience optionally specifies the intended audience of the request.  If empty, the value of TokenURL is used as the intended audience. Only used if GrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".
    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
    pub audience: Option<String>,
    /// Claims is a map of claims to be added to the JWT token. Only used if GrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".
    #[serde(rename = "claims", skip_serializing_if = "Option::is_none")]
    pub claims: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "client_certificate_key", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub client_certificate_key: Option<Option<serde_json::Value>>,
    #[serde(rename = "client_certificate_key_file", skip_serializing_if = "Option::is_none")]
    pub client_certificate_key_file: Option<String>,
    #[serde(rename = "client_certificate_key_id", skip_serializing_if = "Option::is_none")]
    pub client_certificate_key_id: Option<String>,
    /// ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client secret.
    #[serde(rename = "client_certificate_key_ref", skip_serializing_if = "Option::is_none")]
    pub client_certificate_key_ref: Option<String>,
    #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")]
    pub client_id: Option<String>,
    #[serde(rename = "client_secret", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub client_secret: Option<Option<serde_json::Value>>,
    #[serde(rename = "client_secret_file", skip_serializing_if = "Option::is_none")]
    pub client_secret_file: Option<String>,
    /// ClientSecretRef is the name of the secret within the secret manager to use as the client secret.
    #[serde(rename = "client_secret_ref", skip_serializing_if = "Option::is_none")]
    pub client_secret_ref: Option<String>,
    #[serde(rename = "endpoint_params", skip_serializing_if = "Option::is_none")]
    pub endpoint_params: Option<std::collections::HashMap<String, String>>,
    /// GrantType is the OAuth2 grant type to use. It can be one of \"client_credentials\" or \"urn:ietf:params:oauth:grant-type:jwt-bearer\" (RFC 7523). Default value is \"client_credentials\"
    #[serde(rename = "grant_type", skip_serializing_if = "Option::is_none")]
    pub grant_type: Option<String>,
    /// Iss is the OAuth client identifier used when communicating with the configured OAuth provider. Default value is client_id. Only used if GrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".
    #[serde(rename = "iss", skip_serializing_if = "Option::is_none")]
    pub iss: Option<String>,
    #[serde(rename = "no_proxy", skip_serializing_if = "Option::is_none")]
    pub no_proxy: Option<String>,
    #[serde(rename = "proxy_connect_header", skip_serializing_if = "Option::is_none")]
    pub proxy_connect_header: Option<std::collections::HashMap<String, Vec<serde_json::Value>>>,
    #[serde(rename = "proxy_from_environment", skip_serializing_if = "Option::is_none")]
    pub proxy_from_environment: Option<bool>,
    #[serde(rename = "proxy_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub proxy_url: Option<Option<serde_json::Value>>,
    #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
    pub scopes: Option<Vec<String>>,
    /// SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if GrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\". Default value is RS256 and valid values RS256, RS384, RS512
    #[serde(rename = "signature_algorithm", skip_serializing_if = "Option::is_none")]
    pub signature_algorithm: Option<String>,
    #[serde(rename = "token_url", skip_serializing_if = "Option::is_none")]
    pub token_url: Option<String>,
}

impl O11yPeriodOAuth2 {
    pub fn new() -> O11yPeriodOAuth2 {
        O11yPeriodOAuth2 {
            tls_config: None,
            audience: None,
            claims: None,
            client_certificate_key: None,
            client_certificate_key_file: None,
            client_certificate_key_id: None,
            client_certificate_key_ref: None,
            client_id: None,
            client_secret: None,
            client_secret_file: None,
            client_secret_ref: None,
            endpoint_params: None,
            grant_type: None,
            iss: None,
            no_proxy: None,
            proxy_connect_header: None,
            proxy_from_environment: None,
            proxy_url: None,
            scopes: None,
            signature_algorithm: None,
            token_url: None,
        }
    }
}