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

/// <p>One of the targets for the stack set. Returned by the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStackSetAutoDeploymentTargets.html">ListStackSetAutoDeploymentTargets</a> API operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StackSetAutoDeploymentTargetSummary {
    /// <p>The organization root ID or organizational unit (OU) IDs where the stack set is targeted.</p>
    pub organizational_unit_id: ::std::option::Option<::std::string::String>,
    /// <p>The list of Regions targeted for this organization or OU.</p>
    pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StackSetAutoDeploymentTargetSummary {
    /// <p>The organization root ID or organizational unit (OU) IDs where the stack set is targeted.</p>
    pub fn organizational_unit_id(&self) -> ::std::option::Option<&str> {
        self.organizational_unit_id.as_deref()
    }
    /// <p>The list of Regions targeted for this organization or OU.</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 `.regions.is_none()`.
    pub fn regions(&self) -> &[::std::string::String] {
        self.regions.as_deref().unwrap_or_default()
    }
}
impl StackSetAutoDeploymentTargetSummary {
    /// Creates a new builder-style object to manufacture [`StackSetAutoDeploymentTargetSummary`](crate::types::StackSetAutoDeploymentTargetSummary).
    pub fn builder() -> crate::types::builders::StackSetAutoDeploymentTargetSummaryBuilder {
        crate::types::builders::StackSetAutoDeploymentTargetSummaryBuilder::default()
    }
}

/// A builder for [`StackSetAutoDeploymentTargetSummary`](crate::types::StackSetAutoDeploymentTargetSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StackSetAutoDeploymentTargetSummaryBuilder {
    pub(crate) organizational_unit_id: ::std::option::Option<::std::string::String>,
    pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StackSetAutoDeploymentTargetSummaryBuilder {
    /// <p>The organization root ID or organizational unit (OU) IDs where the stack set is targeted.</p>
    pub fn organizational_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organizational_unit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The organization root ID or organizational unit (OU) IDs where the stack set is targeted.</p>
    pub fn set_organizational_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organizational_unit_id = input;
        self
    }
    /// <p>The organization root ID or organizational unit (OU) IDs where the stack set is targeted.</p>
    pub fn get_organizational_unit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organizational_unit_id
    }
    /// Appends an item to `regions`.
    ///
    /// To override the contents of this collection use [`set_regions`](Self::set_regions).
    ///
    /// <p>The list of Regions targeted for this organization or OU.</p>
    pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.regions.unwrap_or_default();
        v.push(input.into());
        self.regions = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of Regions targeted for this organization or OU.</p>
    pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.regions = input;
        self
    }
    /// <p>The list of Regions targeted for this organization or OU.</p>
    pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.regions
    }
    /// Consumes the builder and constructs a [`StackSetAutoDeploymentTargetSummary`](crate::types::StackSetAutoDeploymentTargetSummary).
    pub fn build(self) -> crate::types::StackSetAutoDeploymentTargetSummary {
        crate::types::StackSetAutoDeploymentTargetSummary {
            organizational_unit_id: self.organizational_unit_id,
            regions: self.regions,
        }
    }
}