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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the source of a CloudFormation stack record (i.e., the export snapshot record).</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CloudFormationStackRecordSourceInfo {
    /// <p>The Lightsail resource type (<code>ExportSnapshotRecord</code>).</p>
    pub resource_type: ::std::option::Option<crate::types::CloudFormationStackRecordSourceType>,
    /// <p>The name of the record.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the export snapshot record.</p>
    pub arn: ::std::option::Option<::std::string::String>,
}
impl CloudFormationStackRecordSourceInfo {
    /// <p>The Lightsail resource type (<code>ExportSnapshotRecord</code>).</p>
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::CloudFormationStackRecordSourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The name of the record.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the export snapshot record.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
}
impl CloudFormationStackRecordSourceInfo {
    /// Creates a new builder-style object to manufacture [`CloudFormationStackRecordSourceInfo`](crate::types::CloudFormationStackRecordSourceInfo).
    pub fn builder() -> crate::types::builders::CloudFormationStackRecordSourceInfoBuilder {
        crate::types::builders::CloudFormationStackRecordSourceInfoBuilder::default()
    }
}

/// A builder for [`CloudFormationStackRecordSourceInfo`](crate::types::CloudFormationStackRecordSourceInfo).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CloudFormationStackRecordSourceInfoBuilder {
    pub(crate) resource_type: ::std::option::Option<crate::types::CloudFormationStackRecordSourceType>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
}
impl CloudFormationStackRecordSourceInfoBuilder {
    /// <p>The Lightsail resource type (<code>ExportSnapshotRecord</code>).</p>
    pub fn resource_type(mut self, input: crate::types::CloudFormationStackRecordSourceType) -> Self {
        self.resource_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Lightsail resource type (<code>ExportSnapshotRecord</code>).</p>
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::CloudFormationStackRecordSourceType>) -> Self {
        self.resource_type = input;
        self
    }
    /// <p>The Lightsail resource type (<code>ExportSnapshotRecord</code>).</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::CloudFormationStackRecordSourceType> {
        &self.resource_type
    }
    /// <p>The name of the record.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the record.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the record.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The Amazon Resource Name (ARN) of the export snapshot record.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the export snapshot record.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the export snapshot record.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// Consumes the builder and constructs a [`CloudFormationStackRecordSourceInfo`](crate::types::CloudFormationStackRecordSourceInfo).
    pub fn build(self) -> crate::types::CloudFormationStackRecordSourceInfo {
        crate::types::CloudFormationStackRecordSourceInfo {
            resource_type: self.resource_type,
            name: self.name,
            arn: self.arn,
        }
    }
}