1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Pulsar Admin REST API
 *
 * This provides the REST API for admin operations
 *
 * The version of the OpenAPI document: v2
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

/// NamespaceIsolationData : The data of namespace isolation configuration
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NamespaceIsolationData {
    #[serde(rename = "auto_failover_policy", skip_serializing_if = "Option::is_none")]
    pub auto_failover_policy: Option<Box<models::AutoFailoverPolicyData>>,
    /// The list of namespaces to apply this namespace isolation data
    #[serde(rename = "namespaces", skip_serializing_if = "Option::is_none")]
    pub namespaces: Option<Vec<String>>,
    /// The list of primary brokers for serving the list of namespaces in this isolation policy
    #[serde(rename = "primary", skip_serializing_if = "Option::is_none")]
    pub primary: Option<Vec<String>>,
    /// The list of secondary brokers for serving the list of namespaces in this isolation policy
    #[serde(rename = "secondary", skip_serializing_if = "Option::is_none")]
    pub secondary: Option<Vec<String>>,
}

impl NamespaceIsolationData {
    /// The data of namespace isolation configuration
    pub fn new() -> NamespaceIsolationData {
        NamespaceIsolationData {
            auto_failover_policy: None,
            namespaces: None,
            primary: None,
            secondary: None,
        }
    }
}