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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the target resources of a specific type in your import template (for example, all <code>AWS::S3::Bucket</code> resources) and the properties you can provide during the import to identify resources of that type.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ResourceIdentifierSummary {
    /// <p>The template resource type of the target resources, such as <code>AWS::S3::Bucket</code>.</p>
    pub resource_type: ::std::option::Option<::std::string::String>,
    /// <p>The logical IDs of the target resources of the specified <code>ResourceType</code>, as defined in the import template.</p>
    pub logical_resource_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The resource properties you can provide during the import to identify your target resources. For example, <code>BucketName</code> is a possible identifier property for <code>AWS::S3::Bucket</code> resources.</p>
    pub resource_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ResourceIdentifierSummary {
    /// <p>The template resource type of the target resources, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
        self.resource_type.as_deref()
    }
    /// <p>The logical IDs of the target resources of the specified <code>ResourceType</code>, as defined in the import template.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.logical_resource_ids.is_none()`.
    pub fn logical_resource_ids(&self) -> &[::std::string::String] {
        self.logical_resource_ids.as_deref().unwrap_or_default()
    }
    /// <p>The resource properties you can provide during the import to identify your target resources. For example, <code>BucketName</code> is a possible identifier property for <code>AWS::S3::Bucket</code> resources.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_identifiers.is_none()`.
    pub fn resource_identifiers(&self) -> &[::std::string::String] {
        self.resource_identifiers.as_deref().unwrap_or_default()
    }
}
impl ResourceIdentifierSummary {
    /// Creates a new builder-style object to manufacture [`ResourceIdentifierSummary`](crate::types::ResourceIdentifierSummary).
    pub fn builder() -> crate::types::builders::ResourceIdentifierSummaryBuilder {
        crate::types::builders::ResourceIdentifierSummaryBuilder::default()
    }
}

/// A builder for [`ResourceIdentifierSummary`](crate::types::ResourceIdentifierSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ResourceIdentifierSummaryBuilder {
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
    pub(crate) logical_resource_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) resource_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ResourceIdentifierSummaryBuilder {
    /// <p>The template resource type of the target resources, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The template resource type of the target resources, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_type = input;
        self
    }
    /// <p>The template resource type of the target resources, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_type
    }
    /// Appends an item to `logical_resource_ids`.
    ///
    /// To override the contents of this collection use [`set_logical_resource_ids`](Self::set_logical_resource_ids).
    ///
    /// <p>The logical IDs of the target resources of the specified <code>ResourceType</code>, as defined in the import template.</p>
    pub fn logical_resource_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.logical_resource_ids.unwrap_or_default();
        v.push(input.into());
        self.logical_resource_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The logical IDs of the target resources of the specified <code>ResourceType</code>, as defined in the import template.</p>
    pub fn set_logical_resource_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.logical_resource_ids = input;
        self
    }
    /// <p>The logical IDs of the target resources of the specified <code>ResourceType</code>, as defined in the import template.</p>
    pub fn get_logical_resource_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.logical_resource_ids
    }
    /// Appends an item to `resource_identifiers`.
    ///
    /// To override the contents of this collection use [`set_resource_identifiers`](Self::set_resource_identifiers).
    ///
    /// <p>The resource properties you can provide during the import to identify your target resources. For example, <code>BucketName</code> is a possible identifier property for <code>AWS::S3::Bucket</code> resources.</p>
    pub fn resource_identifiers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.resource_identifiers.unwrap_or_default();
        v.push(input.into());
        self.resource_identifiers = ::std::option::Option::Some(v);
        self
    }
    /// <p>The resource properties you can provide during the import to identify your target resources. For example, <code>BucketName</code> is a possible identifier property for <code>AWS::S3::Bucket</code> resources.</p>
    pub fn set_resource_identifiers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.resource_identifiers = input;
        self
    }
    /// <p>The resource properties you can provide during the import to identify your target resources. For example, <code>BucketName</code> is a possible identifier property for <code>AWS::S3::Bucket</code> resources.</p>
    pub fn get_resource_identifiers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.resource_identifiers
    }
    /// Consumes the builder and constructs a [`ResourceIdentifierSummary`](crate::types::ResourceIdentifierSummary).
    pub fn build(self) -> crate::types::ResourceIdentifierSummary {
        crate::types::ResourceIdentifierSummary {
            resource_type: self.resource_type,
            logical_resource_ids: self.logical_resource_ids,
            resource_identifiers: self.resource_identifiers,
        }
    }
}