pulsar_admin_sdk/models/
namespace_isolation_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/// NamespaceIsolationData : The data of namespace isolation configuration
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NamespaceIsolationData {
16    #[serde(rename = "auto_failover_policy", skip_serializing_if = "Option::is_none")]
17    pub auto_failover_policy: Option<Box<models::AutoFailoverPolicyData>>,
18    /// The list of namespaces to apply this namespace isolation data
19    #[serde(rename = "namespaces", skip_serializing_if = "Option::is_none")]
20    pub namespaces: Option<Vec<String>>,
21    /// The list of primary brokers for serving the list of namespaces in this isolation policy
22    #[serde(rename = "primary", skip_serializing_if = "Option::is_none")]
23    pub primary: Option<Vec<String>>,
24    /// The list of secondary brokers for serving the list of namespaces in this isolation policy
25    #[serde(rename = "secondary", skip_serializing_if = "Option::is_none")]
26    pub secondary: Option<Vec<String>>,
27}
28
29impl NamespaceIsolationData {
30    /// The data of namespace isolation configuration
31    pub fn new() -> NamespaceIsolationData {
32        NamespaceIsolationData {
33            auto_failover_policy: None,
34            namespaces: None,
35            primary: None,
36            secondary: None,
37        }
38    }
39}
40