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

/// <p>The maintenance options of your instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct LaunchTemplateInstanceMaintenanceOptionsRequest {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    pub auto_recovery: ::std::option::Option<crate::types::LaunchTemplateAutoRecoveryState>,
}
impl LaunchTemplateInstanceMaintenanceOptionsRequest {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    pub fn auto_recovery(&self) -> ::std::option::Option<&crate::types::LaunchTemplateAutoRecoveryState> {
        self.auto_recovery.as_ref()
    }
}
impl LaunchTemplateInstanceMaintenanceOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceMaintenanceOptionsRequest`](crate::types::LaunchTemplateInstanceMaintenanceOptionsRequest).
    pub fn builder() -> crate::types::builders::LaunchTemplateInstanceMaintenanceOptionsRequestBuilder {
        crate::types::builders::LaunchTemplateInstanceMaintenanceOptionsRequestBuilder::default()
    }
}

/// A builder for [`LaunchTemplateInstanceMaintenanceOptionsRequest`](crate::types::LaunchTemplateInstanceMaintenanceOptionsRequest).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct LaunchTemplateInstanceMaintenanceOptionsRequestBuilder {
    pub(crate) auto_recovery: ::std::option::Option<crate::types::LaunchTemplateAutoRecoveryState>,
}
impl LaunchTemplateInstanceMaintenanceOptionsRequestBuilder {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    pub fn auto_recovery(mut self, input: crate::types::LaunchTemplateAutoRecoveryState) -> Self {
        self.auto_recovery = ::std::option::Option::Some(input);
        self
    }
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    pub fn set_auto_recovery(mut self, input: ::std::option::Option<crate::types::LaunchTemplateAutoRecoveryState>) -> Self {
        self.auto_recovery = input;
        self
    }
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    pub fn get_auto_recovery(&self) -> &::std::option::Option<crate::types::LaunchTemplateAutoRecoveryState> {
        &self.auto_recovery
    }
    /// Consumes the builder and constructs a [`LaunchTemplateInstanceMaintenanceOptionsRequest`](crate::types::LaunchTemplateInstanceMaintenanceOptionsRequest).
    pub fn build(self) -> crate::types::LaunchTemplateInstanceMaintenanceOptionsRequest {
        crate::types::LaunchTemplateInstanceMaintenanceOptionsRequest {
            auto_recovery: self.auto_recovery,
        }
    }
}