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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information about the configuration of a deployment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EdgeDeploymentConfig {
    /// <p>Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.</p>
    pub failure_handling_policy: ::std::option::Option<crate::types::FailureHandlingPolicy>,
}
impl EdgeDeploymentConfig {
    /// <p>Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.</p>
    pub fn failure_handling_policy(&self) -> ::std::option::Option<&crate::types::FailureHandlingPolicy> {
        self.failure_handling_policy.as_ref()
    }
}
impl EdgeDeploymentConfig {
    /// Creates a new builder-style object to manufacture [`EdgeDeploymentConfig`](crate::types::EdgeDeploymentConfig).
    pub fn builder() -> crate::types::builders::EdgeDeploymentConfigBuilder {
        crate::types::builders::EdgeDeploymentConfigBuilder::default()
    }
}

/// A builder for [`EdgeDeploymentConfig`](crate::types::EdgeDeploymentConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EdgeDeploymentConfigBuilder {
    pub(crate) failure_handling_policy: ::std::option::Option<crate::types::FailureHandlingPolicy>,
}
impl EdgeDeploymentConfigBuilder {
    /// <p>Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.</p>
    /// This field is required.
    pub fn failure_handling_policy(mut self, input: crate::types::FailureHandlingPolicy) -> Self {
        self.failure_handling_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.</p>
    pub fn set_failure_handling_policy(mut self, input: ::std::option::Option<crate::types::FailureHandlingPolicy>) -> Self {
        self.failure_handling_policy = input;
        self
    }
    /// <p>Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself.</p>
    pub fn get_failure_handling_policy(&self) -> &::std::option::Option<crate::types::FailureHandlingPolicy> {
        &self.failure_handling_policy
    }
    /// Consumes the builder and constructs a [`EdgeDeploymentConfig`](crate::types::EdgeDeploymentConfig).
    pub fn build(self) -> crate::types::EdgeDeploymentConfig {
        crate::types::EdgeDeploymentConfig {
            failure_handling_policy: self.failure_handling_policy,
        }
    }
}