/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// ConsulGatewayTLSConfig is used to configure TLS for a gateway. Both
/// ConsulIngressConfigEntry and ConsulIngressService use this struct. For more
/// details, consult the Consul documentation:
/// https://developer.hashicorp.com/consul/docs/connect/config-entries/ingress-gateway#listeners-services-tls
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct ConsulGatewayTlsConfig {
    /// Enabled indicates whether TLS is enabled for the configuration entry
    #[serde(rename = "Enabled")]
    pub enabled: bool,

    /// TLSMinVersion specifies the minimum TLS version supported for gateway
    /// listeners.
    #[serde(rename = "tls_min_version", skip_serializing_if = "Option::is_none")]
    pub tls_min_version: Option<String>,

    /// TLSMaxVersion specifies the maxmimum TLS version supported for gateway
    /// listeners.
    #[serde(rename = "tls_max_version", skip_serializing_if = "Option::is_none")]
    pub tls_max_version: Option<String>,

    /// CipherSuites specifies a list of cipher suites that gateway listeners
    /// support when negotiating connections using TLS 1.2 or older.
    #[serde(rename = "cipher_suites", skip_serializing_if = "Option::is_none")]
    pub cipher_suites: Option<Vec<String>>,

    /// SDS specifies parameters that configure the listener to load TLS
    /// certificates from an external Secrets Discovery Service (SDS).
    #[serde(rename = "sds", skip_serializing_if = "Option::is_none")]
    pub sds: Option<super::ConsulGatewayTlssdsConfig>,
}
