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 O11yPeriodHttpClientConfig {
    /// The HTTP authorization credentials for the targets.
    #[serde(rename = "authorization", skip_serializing_if = "Option::is_none")]
    pub authorization: Option<Box<models::O11yPeriodAuthorization>>,
    /// The HTTP basic authentication credentials for the targets.
    #[serde(rename = "basic_auth", skip_serializing_if = "Option::is_none")]
    pub basic_auth: Option<Box<models::O11yPeriodBasicAuth>>,
    #[serde(rename = "bearer_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub bearer_token: Option<Option<serde_json::Value>>,
    /// The bearer token file for the targets. Deprecated in favour of Authorization.CredentialsFile.
    #[serde(rename = "bearer_token_file", skip_serializing_if = "Option::is_none")]
    pub bearer_token_file: Option<String>,
    /// EnableHTTP2 specifies whether the client should configure HTTP2. The omitempty flag is not set, because it would be hidden from the marshalled configuration when set to false.
    #[serde(rename = "enable_http2", skip_serializing_if = "Option::is_none")]
    pub enable_http2: Option<bool>,
    /// FollowRedirects specifies whether the client should follow HTTP 3xx redirects. The omitempty flag is not set, because it would be hidden from the marshalled configuration when set to false.
    #[serde(rename = "follow_redirects", skip_serializing_if = "Option::is_none")]
    pub follow_redirects: Option<bool>,
    #[serde(rename = "http_headers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub http_headers: Option<Option<serde_json::Value>>,
    #[serde(rename = "no_proxy", skip_serializing_if = "Option::is_none")]
    pub no_proxy: Option<String>,
    /// The OAuth2 client credentials used to fetch a token for the targets.
    #[serde(rename = "oauth2", skip_serializing_if = "Option::is_none")]
    pub oauth2: Option<Box<models::O11yPeriodOAuth2>>,
    #[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>>,
    /// TLSConfig to use to connect to the targets.
    #[serde(rename = "tls_config", skip_serializing_if = "Option::is_none")]
    pub tls_config: Option<Box<models::O11yPeriodTlsConfig>>,
}

impl O11yPeriodHttpClientConfig {
    pub fn new() -> O11yPeriodHttpClientConfig {
        O11yPeriodHttpClientConfig {
            authorization: None,
            basic_auth: None,
            bearer_token: None,
            bearer_token_file: None,
            enable_http2: None,
            follow_redirects: None,
            http_headers: None,
            no_proxy: None,
            oauth2: None,
            proxy_connect_header: None,
            proxy_from_environment: None,
            proxy_url: None,
            tls_config: None,
        }
    }
}