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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDeviceOutput {
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub device_arn: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the device.</p>
    pub device_name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the device.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The name of the fleet the device belongs to.</p>
    pub device_fleet_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services Internet of Things (IoT) object thing name associated with the device.</p>
    pub iot_thing_name: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp of the last registration or de-reregistration.</p>
    pub registration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last heartbeat received from the device.</p>
    pub latest_heartbeat: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Models on the device.</p>
    pub models: ::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>>,
    /// <p>The maximum number of models.</p>
    pub max_models: i32,
    /// <p>The response from the last list when returning a list large enough to need tokening.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>Edge Manager agent version.</p>
    pub agent_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeDeviceOutput {
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn device_arn(&self) -> ::std::option::Option<&str> {
        self.device_arn.as_deref()
    }
    /// <p>The unique identifier of the device.</p>
    pub fn device_name(&self) -> ::std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>A description of the device.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The name of the fleet the device belongs to.</p>
    pub fn device_fleet_name(&self) -> ::std::option::Option<&str> {
        self.device_fleet_name.as_deref()
    }
    /// <p>The Amazon Web Services Internet of Things (IoT) object thing name associated with the device.</p>
    pub fn iot_thing_name(&self) -> ::std::option::Option<&str> {
        self.iot_thing_name.as_deref()
    }
    /// <p>The timestamp of the last registration or de-reregistration.</p>
    pub fn registration_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.registration_time.as_ref()
    }
    /// <p>The last heartbeat received from the device.</p>
    pub fn latest_heartbeat(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.latest_heartbeat.as_ref()
    }
    /// <p>Models on the device.</p>
    pub fn models(&self) -> ::std::option::Option<&[crate::types::EdgeModel]> {
        self.models.as_deref()
    }
    /// <p>The maximum number of models.</p>
    pub fn max_models(&self) -> i32 {
        self.max_models
    }
    /// <p>The response from the last list when returning a list large enough to need tokening.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>Edge Manager agent version.</p>
    pub fn agent_version(&self) -> ::std::option::Option<&str> {
        self.agent_version.as_deref()
    }
}
impl ::aws_http::request_id::RequestId for DescribeDeviceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeDeviceOutput {
    /// Creates a new builder-style object to manufacture [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
    pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
        crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
    }
}

/// A builder for [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeDeviceOutputBuilder {
    pub(crate) device_arn: ::std::option::Option<::std::string::String>,
    pub(crate) device_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) device_fleet_name: ::std::option::Option<::std::string::String>,
    pub(crate) iot_thing_name: ::std::option::Option<::std::string::String>,
    pub(crate) registration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) latest_heartbeat: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) models: ::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>>,
    pub(crate) max_models: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) agent_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeDeviceOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn device_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn set_device_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn get_device_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_arn
    }
    /// <p>The unique identifier of the device.</p>
    pub fn device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the device.</p>
    pub fn set_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_name = input;
        self
    }
    /// <p>The unique identifier of the device.</p>
    pub fn get_device_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_name
    }
    /// <p>A description of the device.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the device.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the device.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The name of the fleet the device belongs to.</p>
    pub fn device_fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_fleet_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the fleet the device belongs to.</p>
    pub fn set_device_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_fleet_name = input;
        self
    }
    /// <p>The name of the fleet the device belongs to.</p>
    pub fn get_device_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_fleet_name
    }
    /// <p>The Amazon Web Services Internet of Things (IoT) object thing name associated with the device.</p>
    pub fn iot_thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iot_thing_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Internet of Things (IoT) object thing name associated with the device.</p>
    pub fn set_iot_thing_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.iot_thing_name = input;
        self
    }
    /// <p>The Amazon Web Services Internet of Things (IoT) object thing name associated with the device.</p>
    pub fn get_iot_thing_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.iot_thing_name
    }
    /// <p>The timestamp of the last registration or de-reregistration.</p>
    pub fn registration_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.registration_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of the last registration or de-reregistration.</p>
    pub fn set_registration_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.registration_time = input;
        self
    }
    /// <p>The timestamp of the last registration or de-reregistration.</p>
    pub fn get_registration_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.registration_time
    }
    /// <p>The last heartbeat received from the device.</p>
    pub fn latest_heartbeat(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.latest_heartbeat = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last heartbeat received from the device.</p>
    pub fn set_latest_heartbeat(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.latest_heartbeat = input;
        self
    }
    /// <p>The last heartbeat received from the device.</p>
    pub fn get_latest_heartbeat(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.latest_heartbeat
    }
    /// Appends an item to `models`.
    ///
    /// To override the contents of this collection use [`set_models`](Self::set_models).
    ///
    /// <p>Models on the device.</p>
    pub fn models(mut self, input: crate::types::EdgeModel) -> Self {
        let mut v = self.models.unwrap_or_default();
        v.push(input);
        self.models = ::std::option::Option::Some(v);
        self
    }
    /// <p>Models on the device.</p>
    pub fn set_models(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>>) -> Self {
        self.models = input;
        self
    }
    /// <p>Models on the device.</p>
    pub fn get_models(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>> {
        &self.models
    }
    /// <p>The maximum number of models.</p>
    pub fn max_models(mut self, input: i32) -> Self {
        self.max_models = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of models.</p>
    pub fn set_max_models(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_models = input;
        self
    }
    /// <p>The maximum number of models.</p>
    pub fn get_max_models(&self) -> &::std::option::Option<i32> {
        &self.max_models
    }
    /// <p>The response from the last list when returning a list large enough to need tokening.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The response from the last list when returning a list large enough to need tokening.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The response from the last list when returning a list large enough to need tokening.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>Edge Manager agent version.</p>
    pub fn agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Edge Manager agent version.</p>
    pub fn set_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_version = input;
        self
    }
    /// <p>Edge Manager agent version.</p>
    pub fn get_agent_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_version
    }
    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 [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
    pub fn build(self) -> crate::operation::describe_device::DescribeDeviceOutput {
        crate::operation::describe_device::DescribeDeviceOutput {
            device_arn: self.device_arn,
            device_name: self.device_name,
            description: self.description,
            device_fleet_name: self.device_fleet_name,
            iot_thing_name: self.iot_thing_name,
            registration_time: self.registration_time,
            latest_heartbeat: self.latest_heartbeat,
            models: self.models,
            max_models: self.max_models.unwrap_or_default(),
            next_token: self.next_token,
            agent_version: self.agent_version,
            _request_id: self._request_id,
        }
    }
}