aws_sdk_panorama/operation/describe_device/
_describe_device_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeDeviceOutput {
6    /// <p>The device's ID.</p>
7    pub device_id: ::std::option::Option<::std::string::String>,
8    /// <p>The device's name.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The device's ARN.</p>
11    pub arn: ::std::option::Option<::std::string::String>,
12    /// <p>The device's description.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The device's type.</p>
15    pub r#type: ::std::option::Option<crate::types::DeviceType>,
16    /// <p>The device's connection status.</p>
17    pub device_connection_status: ::std::option::Option<crate::types::DeviceConnectionStatus>,
18    /// <p>When the device was created.</p>
19    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The device's provisioning status.</p>
21    pub provisioning_status: ::std::option::Option<crate::types::DeviceStatus>,
22    /// <p>The latest software version available for the device.</p>
23    pub latest_software: ::std::option::Option<::std::string::String>,
24    /// <p>The device's current software version.</p>
25    pub current_software: ::std::option::Option<::std::string::String>,
26    /// <p>The device's serial number.</p>
27    pub serial_number: ::std::option::Option<::std::string::String>,
28    /// <p>The device's tags.</p>
29    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
30    /// <p>The device's networking configuration.</p>
31    pub networking_configuration: ::std::option::Option<crate::types::NetworkPayload>,
32    /// <p>The device's networking status.</p>
33    pub current_networking_status: ::std::option::Option<crate::types::NetworkStatus>,
34    /// <p>The device's lease expiration time.</p>
35    pub lease_expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
36    /// <p>Beta software releases available for the device.</p>
37    pub alternate_softwares: ::std::option::Option<::std::vec::Vec<crate::types::AlternateSoftwareMetadata>>,
38    /// <p>The most recent beta software release.</p>
39    pub latest_alternate_software: ::std::option::Option<::std::string::String>,
40    /// <p>The device's maker.</p>
41    pub brand: ::std::option::Option<crate::types::DeviceBrand>,
42    /// <p>A device's latest job. Includes the target image version, and the job status.</p>
43    pub latest_device_job: ::std::option::Option<crate::types::LatestDeviceJob>,
44    /// <p>A device's aggregated status. Including the device's connection status, provisioning status, and lease status.</p>
45    pub device_aggregated_status: ::std::option::Option<crate::types::DeviceAggregatedStatus>,
46    _request_id: Option<String>,
47}
48impl DescribeDeviceOutput {
49    /// <p>The device's ID.</p>
50    pub fn device_id(&self) -> ::std::option::Option<&str> {
51        self.device_id.as_deref()
52    }
53    /// <p>The device's name.</p>
54    pub fn name(&self) -> ::std::option::Option<&str> {
55        self.name.as_deref()
56    }
57    /// <p>The device's ARN.</p>
58    pub fn arn(&self) -> ::std::option::Option<&str> {
59        self.arn.as_deref()
60    }
61    /// <p>The device's description.</p>
62    pub fn description(&self) -> ::std::option::Option<&str> {
63        self.description.as_deref()
64    }
65    /// <p>The device's type.</p>
66    pub fn r#type(&self) -> ::std::option::Option<&crate::types::DeviceType> {
67        self.r#type.as_ref()
68    }
69    /// <p>The device's connection status.</p>
70    pub fn device_connection_status(&self) -> ::std::option::Option<&crate::types::DeviceConnectionStatus> {
71        self.device_connection_status.as_ref()
72    }
73    /// <p>When the device was created.</p>
74    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
75        self.created_time.as_ref()
76    }
77    /// <p>The device's provisioning status.</p>
78    pub fn provisioning_status(&self) -> ::std::option::Option<&crate::types::DeviceStatus> {
79        self.provisioning_status.as_ref()
80    }
81    /// <p>The latest software version available for the device.</p>
82    pub fn latest_software(&self) -> ::std::option::Option<&str> {
83        self.latest_software.as_deref()
84    }
85    /// <p>The device's current software version.</p>
86    pub fn current_software(&self) -> ::std::option::Option<&str> {
87        self.current_software.as_deref()
88    }
89    /// <p>The device's serial number.</p>
90    pub fn serial_number(&self) -> ::std::option::Option<&str> {
91        self.serial_number.as_deref()
92    }
93    /// <p>The device's tags.</p>
94    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
95        self.tags.as_ref()
96    }
97    /// <p>The device's networking configuration.</p>
98    pub fn networking_configuration(&self) -> ::std::option::Option<&crate::types::NetworkPayload> {
99        self.networking_configuration.as_ref()
100    }
101    /// <p>The device's networking status.</p>
102    pub fn current_networking_status(&self) -> ::std::option::Option<&crate::types::NetworkStatus> {
103        self.current_networking_status.as_ref()
104    }
105    /// <p>The device's lease expiration time.</p>
106    pub fn lease_expiration_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
107        self.lease_expiration_time.as_ref()
108    }
109    /// <p>Beta software releases available for the device.</p>
110    ///
111    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.alternate_softwares.is_none()`.
112    pub fn alternate_softwares(&self) -> &[crate::types::AlternateSoftwareMetadata] {
113        self.alternate_softwares.as_deref().unwrap_or_default()
114    }
115    /// <p>The most recent beta software release.</p>
116    pub fn latest_alternate_software(&self) -> ::std::option::Option<&str> {
117        self.latest_alternate_software.as_deref()
118    }
119    /// <p>The device's maker.</p>
120    pub fn brand(&self) -> ::std::option::Option<&crate::types::DeviceBrand> {
121        self.brand.as_ref()
122    }
123    /// <p>A device's latest job. Includes the target image version, and the job status.</p>
124    pub fn latest_device_job(&self) -> ::std::option::Option<&crate::types::LatestDeviceJob> {
125        self.latest_device_job.as_ref()
126    }
127    /// <p>A device's aggregated status. Including the device's connection status, provisioning status, and lease status.</p>
128    pub fn device_aggregated_status(&self) -> ::std::option::Option<&crate::types::DeviceAggregatedStatus> {
129        self.device_aggregated_status.as_ref()
130    }
131}
132impl ::aws_types::request_id::RequestId for DescribeDeviceOutput {
133    fn request_id(&self) -> Option<&str> {
134        self._request_id.as_deref()
135    }
136}
137impl DescribeDeviceOutput {
138    /// Creates a new builder-style object to manufacture [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
139    pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
140        crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
141    }
142}
143
144/// A builder for [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
145#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
146#[non_exhaustive]
147pub struct DescribeDeviceOutputBuilder {
148    pub(crate) device_id: ::std::option::Option<::std::string::String>,
149    pub(crate) name: ::std::option::Option<::std::string::String>,
150    pub(crate) arn: ::std::option::Option<::std::string::String>,
151    pub(crate) description: ::std::option::Option<::std::string::String>,
152    pub(crate) r#type: ::std::option::Option<crate::types::DeviceType>,
153    pub(crate) device_connection_status: ::std::option::Option<crate::types::DeviceConnectionStatus>,
154    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
155    pub(crate) provisioning_status: ::std::option::Option<crate::types::DeviceStatus>,
156    pub(crate) latest_software: ::std::option::Option<::std::string::String>,
157    pub(crate) current_software: ::std::option::Option<::std::string::String>,
158    pub(crate) serial_number: ::std::option::Option<::std::string::String>,
159    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
160    pub(crate) networking_configuration: ::std::option::Option<crate::types::NetworkPayload>,
161    pub(crate) current_networking_status: ::std::option::Option<crate::types::NetworkStatus>,
162    pub(crate) lease_expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
163    pub(crate) alternate_softwares: ::std::option::Option<::std::vec::Vec<crate::types::AlternateSoftwareMetadata>>,
164    pub(crate) latest_alternate_software: ::std::option::Option<::std::string::String>,
165    pub(crate) brand: ::std::option::Option<crate::types::DeviceBrand>,
166    pub(crate) latest_device_job: ::std::option::Option<crate::types::LatestDeviceJob>,
167    pub(crate) device_aggregated_status: ::std::option::Option<crate::types::DeviceAggregatedStatus>,
168    _request_id: Option<String>,
169}
170impl DescribeDeviceOutputBuilder {
171    /// <p>The device's ID.</p>
172    pub fn device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.device_id = ::std::option::Option::Some(input.into());
174        self
175    }
176    /// <p>The device's ID.</p>
177    pub fn set_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.device_id = input;
179        self
180    }
181    /// <p>The device's ID.</p>
182    pub fn get_device_id(&self) -> &::std::option::Option<::std::string::String> {
183        &self.device_id
184    }
185    /// <p>The device's name.</p>
186    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.name = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The device's name.</p>
191    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.name = input;
193        self
194    }
195    /// <p>The device's name.</p>
196    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
197        &self.name
198    }
199    /// <p>The device's ARN.</p>
200    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201        self.arn = ::std::option::Option::Some(input.into());
202        self
203    }
204    /// <p>The device's ARN.</p>
205    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.arn = input;
207        self
208    }
209    /// <p>The device's ARN.</p>
210    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
211        &self.arn
212    }
213    /// <p>The device's description.</p>
214    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215        self.description = ::std::option::Option::Some(input.into());
216        self
217    }
218    /// <p>The device's description.</p>
219    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.description = input;
221        self
222    }
223    /// <p>The device's description.</p>
224    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
225        &self.description
226    }
227    /// <p>The device's type.</p>
228    pub fn r#type(mut self, input: crate::types::DeviceType) -> Self {
229        self.r#type = ::std::option::Option::Some(input);
230        self
231    }
232    /// <p>The device's type.</p>
233    pub fn set_type(mut self, input: ::std::option::Option<crate::types::DeviceType>) -> Self {
234        self.r#type = input;
235        self
236    }
237    /// <p>The device's type.</p>
238    pub fn get_type(&self) -> &::std::option::Option<crate::types::DeviceType> {
239        &self.r#type
240    }
241    /// <p>The device's connection status.</p>
242    pub fn device_connection_status(mut self, input: crate::types::DeviceConnectionStatus) -> Self {
243        self.device_connection_status = ::std::option::Option::Some(input);
244        self
245    }
246    /// <p>The device's connection status.</p>
247    pub fn set_device_connection_status(mut self, input: ::std::option::Option<crate::types::DeviceConnectionStatus>) -> Self {
248        self.device_connection_status = input;
249        self
250    }
251    /// <p>The device's connection status.</p>
252    pub fn get_device_connection_status(&self) -> &::std::option::Option<crate::types::DeviceConnectionStatus> {
253        &self.device_connection_status
254    }
255    /// <p>When the device was created.</p>
256    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
257        self.created_time = ::std::option::Option::Some(input);
258        self
259    }
260    /// <p>When the device was created.</p>
261    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
262        self.created_time = input;
263        self
264    }
265    /// <p>When the device was created.</p>
266    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
267        &self.created_time
268    }
269    /// <p>The device's provisioning status.</p>
270    pub fn provisioning_status(mut self, input: crate::types::DeviceStatus) -> Self {
271        self.provisioning_status = ::std::option::Option::Some(input);
272        self
273    }
274    /// <p>The device's provisioning status.</p>
275    pub fn set_provisioning_status(mut self, input: ::std::option::Option<crate::types::DeviceStatus>) -> Self {
276        self.provisioning_status = input;
277        self
278    }
279    /// <p>The device's provisioning status.</p>
280    pub fn get_provisioning_status(&self) -> &::std::option::Option<crate::types::DeviceStatus> {
281        &self.provisioning_status
282    }
283    /// <p>The latest software version available for the device.</p>
284    pub fn latest_software(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
285        self.latest_software = ::std::option::Option::Some(input.into());
286        self
287    }
288    /// <p>The latest software version available for the device.</p>
289    pub fn set_latest_software(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
290        self.latest_software = input;
291        self
292    }
293    /// <p>The latest software version available for the device.</p>
294    pub fn get_latest_software(&self) -> &::std::option::Option<::std::string::String> {
295        &self.latest_software
296    }
297    /// <p>The device's current software version.</p>
298    pub fn current_software(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
299        self.current_software = ::std::option::Option::Some(input.into());
300        self
301    }
302    /// <p>The device's current software version.</p>
303    pub fn set_current_software(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
304        self.current_software = input;
305        self
306    }
307    /// <p>The device's current software version.</p>
308    pub fn get_current_software(&self) -> &::std::option::Option<::std::string::String> {
309        &self.current_software
310    }
311    /// <p>The device's serial number.</p>
312    pub fn serial_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
313        self.serial_number = ::std::option::Option::Some(input.into());
314        self
315    }
316    /// <p>The device's serial number.</p>
317    pub fn set_serial_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
318        self.serial_number = input;
319        self
320    }
321    /// <p>The device's serial number.</p>
322    pub fn get_serial_number(&self) -> &::std::option::Option<::std::string::String> {
323        &self.serial_number
324    }
325    /// Adds a key-value pair to `tags`.
326    ///
327    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
328    ///
329    /// <p>The device's tags.</p>
330    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
331        let mut hash_map = self.tags.unwrap_or_default();
332        hash_map.insert(k.into(), v.into());
333        self.tags = ::std::option::Option::Some(hash_map);
334        self
335    }
336    /// <p>The device's tags.</p>
337    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
338        self.tags = input;
339        self
340    }
341    /// <p>The device's tags.</p>
342    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
343        &self.tags
344    }
345    /// <p>The device's networking configuration.</p>
346    pub fn networking_configuration(mut self, input: crate::types::NetworkPayload) -> Self {
347        self.networking_configuration = ::std::option::Option::Some(input);
348        self
349    }
350    /// <p>The device's networking configuration.</p>
351    pub fn set_networking_configuration(mut self, input: ::std::option::Option<crate::types::NetworkPayload>) -> Self {
352        self.networking_configuration = input;
353        self
354    }
355    /// <p>The device's networking configuration.</p>
356    pub fn get_networking_configuration(&self) -> &::std::option::Option<crate::types::NetworkPayload> {
357        &self.networking_configuration
358    }
359    /// <p>The device's networking status.</p>
360    pub fn current_networking_status(mut self, input: crate::types::NetworkStatus) -> Self {
361        self.current_networking_status = ::std::option::Option::Some(input);
362        self
363    }
364    /// <p>The device's networking status.</p>
365    pub fn set_current_networking_status(mut self, input: ::std::option::Option<crate::types::NetworkStatus>) -> Self {
366        self.current_networking_status = input;
367        self
368    }
369    /// <p>The device's networking status.</p>
370    pub fn get_current_networking_status(&self) -> &::std::option::Option<crate::types::NetworkStatus> {
371        &self.current_networking_status
372    }
373    /// <p>The device's lease expiration time.</p>
374    pub fn lease_expiration_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
375        self.lease_expiration_time = ::std::option::Option::Some(input);
376        self
377    }
378    /// <p>The device's lease expiration time.</p>
379    pub fn set_lease_expiration_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
380        self.lease_expiration_time = input;
381        self
382    }
383    /// <p>The device's lease expiration time.</p>
384    pub fn get_lease_expiration_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
385        &self.lease_expiration_time
386    }
387    /// Appends an item to `alternate_softwares`.
388    ///
389    /// To override the contents of this collection use [`set_alternate_softwares`](Self::set_alternate_softwares).
390    ///
391    /// <p>Beta software releases available for the device.</p>
392    pub fn alternate_softwares(mut self, input: crate::types::AlternateSoftwareMetadata) -> Self {
393        let mut v = self.alternate_softwares.unwrap_or_default();
394        v.push(input);
395        self.alternate_softwares = ::std::option::Option::Some(v);
396        self
397    }
398    /// <p>Beta software releases available for the device.</p>
399    pub fn set_alternate_softwares(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AlternateSoftwareMetadata>>) -> Self {
400        self.alternate_softwares = input;
401        self
402    }
403    /// <p>Beta software releases available for the device.</p>
404    pub fn get_alternate_softwares(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AlternateSoftwareMetadata>> {
405        &self.alternate_softwares
406    }
407    /// <p>The most recent beta software release.</p>
408    pub fn latest_alternate_software(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
409        self.latest_alternate_software = ::std::option::Option::Some(input.into());
410        self
411    }
412    /// <p>The most recent beta software release.</p>
413    pub fn set_latest_alternate_software(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
414        self.latest_alternate_software = input;
415        self
416    }
417    /// <p>The most recent beta software release.</p>
418    pub fn get_latest_alternate_software(&self) -> &::std::option::Option<::std::string::String> {
419        &self.latest_alternate_software
420    }
421    /// <p>The device's maker.</p>
422    pub fn brand(mut self, input: crate::types::DeviceBrand) -> Self {
423        self.brand = ::std::option::Option::Some(input);
424        self
425    }
426    /// <p>The device's maker.</p>
427    pub fn set_brand(mut self, input: ::std::option::Option<crate::types::DeviceBrand>) -> Self {
428        self.brand = input;
429        self
430    }
431    /// <p>The device's maker.</p>
432    pub fn get_brand(&self) -> &::std::option::Option<crate::types::DeviceBrand> {
433        &self.brand
434    }
435    /// <p>A device's latest job. Includes the target image version, and the job status.</p>
436    pub fn latest_device_job(mut self, input: crate::types::LatestDeviceJob) -> Self {
437        self.latest_device_job = ::std::option::Option::Some(input);
438        self
439    }
440    /// <p>A device's latest job. Includes the target image version, and the job status.</p>
441    pub fn set_latest_device_job(mut self, input: ::std::option::Option<crate::types::LatestDeviceJob>) -> Self {
442        self.latest_device_job = input;
443        self
444    }
445    /// <p>A device's latest job. Includes the target image version, and the job status.</p>
446    pub fn get_latest_device_job(&self) -> &::std::option::Option<crate::types::LatestDeviceJob> {
447        &self.latest_device_job
448    }
449    /// <p>A device's aggregated status. Including the device's connection status, provisioning status, and lease status.</p>
450    pub fn device_aggregated_status(mut self, input: crate::types::DeviceAggregatedStatus) -> Self {
451        self.device_aggregated_status = ::std::option::Option::Some(input);
452        self
453    }
454    /// <p>A device's aggregated status. Including the device's connection status, provisioning status, and lease status.</p>
455    pub fn set_device_aggregated_status(mut self, input: ::std::option::Option<crate::types::DeviceAggregatedStatus>) -> Self {
456        self.device_aggregated_status = input;
457        self
458    }
459    /// <p>A device's aggregated status. Including the device's connection status, provisioning status, and lease status.</p>
460    pub fn get_device_aggregated_status(&self) -> &::std::option::Option<crate::types::DeviceAggregatedStatus> {
461        &self.device_aggregated_status
462    }
463    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
464        self._request_id = Some(request_id.into());
465        self
466    }
467
468    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
469        self._request_id = request_id;
470        self
471    }
472    /// Consumes the builder and constructs a [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
473    pub fn build(self) -> crate::operation::describe_device::DescribeDeviceOutput {
474        crate::operation::describe_device::DescribeDeviceOutput {
475            device_id: self.device_id,
476            name: self.name,
477            arn: self.arn,
478            description: self.description,
479            r#type: self.r#type,
480            device_connection_status: self.device_connection_status,
481            created_time: self.created_time,
482            provisioning_status: self.provisioning_status,
483            latest_software: self.latest_software,
484            current_software: self.current_software,
485            serial_number: self.serial_number,
486            tags: self.tags,
487            networking_configuration: self.networking_configuration,
488            current_networking_status: self.current_networking_status,
489            lease_expiration_time: self.lease_expiration_time,
490            alternate_softwares: self.alternate_softwares,
491            latest_alternate_software: self.latest_alternate_software,
492            brand: self.brand,
493            latest_device_job: self.latest_device_job,
494            device_aggregated_status: self.device_aggregated_status,
495            _request_id: self._request_id,
496        }
497    }
498}