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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * Exoscale Public API
 *
 *  Infrastructure automation API, allowing programmatic access to all Exoscale products and services.  The [OpenAPI Specification](http://spec.openapis.org/oas/v3.0.3.html) source of this documentation can be obtained here:  * [JSON format](https://bump.sh/doc/exoscale-api.json) * [YAML format](https://bump.sh/doc/exoscale-api.yaml)
 *
 * The version of the OpenAPI document: 2.0.0
 * Contact: api@exoscale.com
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateDbaasServiceRedisRequest {
    /// Service integrations to enable for the service. Some integration types affect how a service is created and they must be provided as part of the creation call instead of being defined later.
    #[serde(rename = "integrations", skip_serializing_if = "Option::is_none")]
    pub integrations: Option<Vec<crate::models::CreateDbaasServiceMysqlRequestIntegrationsInner>>,
    /// Redis.conf settings
    #[serde(rename = "redis-settings", skip_serializing_if = "Option::is_none")]
    pub redis_settings: Option<serde_json::Value>,
    /// Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'
    #[serde(rename = "ip-filter", skip_serializing_if = "Option::is_none")]
    pub ip_filter: Option<Vec<String>>,
    /// Service is protected against termination and powering off
    #[serde(
        rename = "termination-protection",
        skip_serializing_if = "Option::is_none"
    )]
    pub termination_protection: Option<bool>,
    #[serde(rename = "fork-from-service", skip_serializing_if = "Option::is_none")]
    pub fork_from_service: Option<String>,
    #[serde(rename = "maintenance", skip_serializing_if = "Option::is_none")]
    pub maintenance: Option<Box<crate::models::UpdateDbaasServiceMysqlRequestMaintenance>>,
    /// Name of a backup to recover from for services that support backup names
    #[serde(
        rename = "recovery-backup-name",
        skip_serializing_if = "Option::is_none"
    )]
    pub recovery_backup_name: Option<String>,
    /// Subscription plan
    #[serde(rename = "plan")]
    pub plan: String,
    #[serde(rename = "migration", skip_serializing_if = "Option::is_none")]
    pub migration: Option<Box<crate::models::UpdateDbaasServiceMysqlRequestMigration>>,
}

impl CreateDbaasServiceRedisRequest {
    pub fn new(plan: String) -> CreateDbaasServiceRedisRequest {
        CreateDbaasServiceRedisRequest {
            integrations: None,
            redis_settings: None,
            ip_filter: None,
            termination_protection: None,
            fork_from_service: None,
            maintenance: None,
            recovery_backup_name: None,
            plan,
            migration: None,
        }
    }
}