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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a launch request for one or more instances, and includes owner, requester, and security group information that applies to all instances in the launch request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RunInstancesOutput {
    /// <p>Not supported.</p>
    pub groups: ::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>>,
    /// <p>The instances.</p>
    pub instances: ::std::option::Option<::std::vec::Vec<crate::types::Instance>>,
    /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
    pub requester_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the reservation.</p>
    pub reservation_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl RunInstancesOutput {
    /// <p>Not supported.</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 `.groups.is_none()`.
    pub fn groups(&self) -> &[crate::types::GroupIdentifier] {
        self.groups.as_deref().unwrap_or_default()
    }
    /// <p>The instances.</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 `.instances.is_none()`.
    pub fn instances(&self) -> &[crate::types::Instance] {
        self.instances.as_deref().unwrap_or_default()
    }
    /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
    pub fn requester_id(&self) -> ::std::option::Option<&str> {
        self.requester_id.as_deref()
    }
    /// <p>The ID of the reservation.</p>
    pub fn reservation_id(&self) -> ::std::option::Option<&str> {
        self.reservation_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for RunInstancesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl RunInstancesOutput {
    /// Creates a new builder-style object to manufacture [`RunInstancesOutput`](crate::operation::run_instances::RunInstancesOutput).
    pub fn builder() -> crate::operation::run_instances::builders::RunInstancesOutputBuilder {
        crate::operation::run_instances::builders::RunInstancesOutputBuilder::default()
    }
}

/// A builder for [`RunInstancesOutput`](crate::operation::run_instances::RunInstancesOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RunInstancesOutputBuilder {
    pub(crate) groups: ::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>>,
    pub(crate) instances: ::std::option::Option<::std::vec::Vec<crate::types::Instance>>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) requester_id: ::std::option::Option<::std::string::String>,
    pub(crate) reservation_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl RunInstancesOutputBuilder {
    /// Appends an item to `groups`.
    ///
    /// To override the contents of this collection use [`set_groups`](Self::set_groups).
    ///
    /// <p>Not supported.</p>
    pub fn groups(mut self, input: crate::types::GroupIdentifier) -> Self {
        let mut v = self.groups.unwrap_or_default();
        v.push(input);
        self.groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>Not supported.</p>
    pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>>) -> Self {
        self.groups = input;
        self
    }
    /// <p>Not supported.</p>
    pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>> {
        &self.groups
    }
    /// Appends an item to `instances`.
    ///
    /// To override the contents of this collection use [`set_instances`](Self::set_instances).
    ///
    /// <p>The instances.</p>
    pub fn instances(mut self, input: crate::types::Instance) -> Self {
        let mut v = self.instances.unwrap_or_default();
        v.push(input);
        self.instances = ::std::option::Option::Some(v);
        self
    }
    /// <p>The instances.</p>
    pub fn set_instances(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Instance>>) -> Self {
        self.instances = input;
        self
    }
    /// <p>The instances.</p>
    pub fn get_instances(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Instance>> {
        &self.instances
    }
    /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
    pub fn requester_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.requester_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
    pub fn set_requester_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.requester_id = input;
        self
    }
    /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
    pub fn get_requester_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.requester_id
    }
    /// <p>The ID of the reservation.</p>
    pub fn reservation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reservation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the reservation.</p>
    pub fn set_reservation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reservation_id = input;
        self
    }
    /// <p>The ID of the reservation.</p>
    pub fn get_reservation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.reservation_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`RunInstancesOutput`](crate::operation::run_instances::RunInstancesOutput).
    pub fn build(self) -> crate::operation::run_instances::RunInstancesOutput {
        crate::operation::run_instances::RunInstancesOutput {
            groups: self.groups,
            instances: self.instances,
            owner_id: self.owner_id,
            requester_id: self.requester_id,
            reservation_id: self.reservation_id,
            _request_id: self._request_id,
        }
    }
}