pulsar_admin_sdk/models/
cluster_data.rs

1/*
2 * Pulsar Admin REST API
3 *
4 * This provides the REST API for admin operations
5 *
6 * The version of the OpenAPI document: v2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// ClusterData : The configuration data for a cluster
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClusterData {
16    /// Authentication parameters when client would like to connect to cluster.
17    #[serde(rename = "authenticationParameters", skip_serializing_if = "Option::is_none")]
18    pub authentication_parameters: Option<String>,
19    /// Authentication plugin when client would like to connect to cluster.
20    #[serde(rename = "authenticationPlugin", skip_serializing_if = "Option::is_none")]
21    pub authentication_plugin: Option<String>,
22    /// TLS certificate file for internal client, used by the internal client to authenticate with Pulsar brokers
23    #[serde(rename = "brokerClientCertificateFilePath", skip_serializing_if = "Option::is_none")]
24    pub broker_client_certificate_file_path: Option<String>,
25    /// TLS private key file for internal client, used by the internal client to authenticate with Pulsar brokers
26    #[serde(rename = "brokerClientKeyFilePath", skip_serializing_if = "Option::is_none")]
27    pub broker_client_key_file_path: Option<String>,
28    /// Enable TLS when talking with other brokers in the same cluster (admin operation) or different clusters (replication)
29    #[serde(rename = "brokerClientTlsEnabled", skip_serializing_if = "Option::is_none")]
30    pub broker_client_tls_enabled: Option<bool>,
31    /// Whether internal client use KeyStore type to authenticate with other Pulsar brokers
32    #[serde(rename = "brokerClientTlsEnabledWithKeyStore", skip_serializing_if = "Option::is_none")]
33    pub broker_client_tls_enabled_with_key_store: Option<bool>,
34    /// TLS KeyStore path for internal client,  used by the internal client to authenticate with Pulsar brokers
35    #[serde(rename = "brokerClientTlsKeyStore", skip_serializing_if = "Option::is_none")]
36    pub broker_client_tls_key_store: Option<String>,
37    /// TLS KeyStore password for internal client,  used by the internal client to authenticate with Pulsar brokers
38    #[serde(rename = "brokerClientTlsKeyStorePassword", skip_serializing_if = "Option::is_none")]
39    pub broker_client_tls_key_store_password: Option<String>,
40    /// TLS KeyStore type configuration for internal client: JKS, PKCS12, used by the internal client to authenticate with Pulsar brokers
41    #[serde(rename = "brokerClientTlsKeyStoreType", skip_serializing_if = "Option::is_none")]
42    pub broker_client_tls_key_store_type: Option<String>,
43    /// TLS TrustStore path for internal client used by the internal client to authenticate with Pulsar brokers
44    #[serde(rename = "brokerClientTlsTrustStore", skip_serializing_if = "Option::is_none")]
45    pub broker_client_tls_trust_store: Option<String>,
46    /// TLS TrustStore password for internal client used by the internal client to authenticate with Pulsar brokers
47    #[serde(rename = "brokerClientTlsTrustStorePassword", skip_serializing_if = "Option::is_none")]
48    pub broker_client_tls_trust_store_password: Option<String>,
49    /// TLS TrustStore type configuration for internal client: JKS, PKCS12 used by the internal client to authenticate with Pulsar brokers
50    #[serde(rename = "brokerClientTlsTrustStoreType", skip_serializing_if = "Option::is_none")]
51    pub broker_client_tls_trust_store_type: Option<String>,
52    /// Path for the trusted TLS certificate file for outgoing connection to a server (broker)
53    #[serde(rename = "brokerClientTrustCertsFilePath", skip_serializing_if = "Option::is_none")]
54    pub broker_client_trust_certs_file_path: Option<String>,
55    /// The broker service url (for produce and consume operations)
56    #[serde(rename = "brokerServiceUrl", skip_serializing_if = "Option::is_none")]
57    pub broker_service_url: Option<String>,
58    /// The secured broker service url (for produce and consume operations)
59    #[serde(rename = "brokerServiceUrlTls", skip_serializing_if = "Option::is_none")]
60    pub broker_service_url_tls: Option<String>,
61    /// listenerName when client would like to connect to cluster
62    #[serde(rename = "listenerName", skip_serializing_if = "Option::is_none")]
63    pub listener_name: Option<String>,
64    /// A set of peer cluster names
65    #[serde(rename = "peerClusterNames", skip_serializing_if = "Option::is_none")]
66    pub peer_cluster_names: Option<Vec<String>>,
67    /// protocol to decide type of proxy routing eg: SNI-routing
68    #[serde(rename = "proxyProtocol", skip_serializing_if = "Option::is_none")]
69    pub proxy_protocol: Option<ProxyProtocol>,
70    /// Proxy-service url when client would like to connect to broker via proxy.
71    #[serde(rename = "proxyServiceUrl", skip_serializing_if = "Option::is_none")]
72    pub proxy_service_url: Option<String>,
73    /// The HTTP rest service URL (for admin operations)
74    #[serde(rename = "serviceUrl", skip_serializing_if = "Option::is_none")]
75    pub service_url: Option<String>,
76    /// The HTTPS rest service URL (for admin operations)
77    #[serde(rename = "serviceUrlTls", skip_serializing_if = "Option::is_none")]
78    pub service_url_tls: Option<String>,
79    /// Allow TLS connections to servers whose certificate cannot be be verified to have been signed by a trusted certificate authority.
80    #[serde(rename = "tlsAllowInsecureConnection", skip_serializing_if = "Option::is_none")]
81    pub tls_allow_insecure_connection: Option<bool>,
82}
83
84impl ClusterData {
85    /// The configuration data for a cluster
86    pub fn new() -> ClusterData {
87        ClusterData {
88            authentication_parameters: None,
89            authentication_plugin: None,
90            broker_client_certificate_file_path: None,
91            broker_client_key_file_path: None,
92            broker_client_tls_enabled: None,
93            broker_client_tls_enabled_with_key_store: None,
94            broker_client_tls_key_store: None,
95            broker_client_tls_key_store_password: None,
96            broker_client_tls_key_store_type: None,
97            broker_client_tls_trust_store: None,
98            broker_client_tls_trust_store_password: None,
99            broker_client_tls_trust_store_type: None,
100            broker_client_trust_certs_file_path: None,
101            broker_service_url: None,
102            broker_service_url_tls: None,
103            listener_name: None,
104            peer_cluster_names: None,
105            proxy_protocol: None,
106            proxy_service_url: None,
107            service_url: None,
108            service_url_tls: None,
109            tls_allow_insecure_connection: None,
110        }
111    }
112}
113/// protocol to decide type of proxy routing eg: SNI-routing
114#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
115pub enum ProxyProtocol {
116    #[serde(rename = "SNI")]
117    Sni,
118}
119
120impl Default for ProxyProtocol {
121    fn default() -> ProxyProtocol {
122        Self::Sni
123    }
124}
125