aws_sdk_worklink/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 current state of the device.</p>
7    pub status: ::std::option::Option<crate::types::DeviceStatus>,
8    /// <p>The model of the device.</p>
9    pub model: ::std::option::Option<::std::string::String>,
10    /// <p>The manufacturer of the device.</p>
11    pub manufacturer: ::std::option::Option<::std::string::String>,
12    /// <p>The operating system of the device.</p>
13    pub operating_system: ::std::option::Option<::std::string::String>,
14    /// <p>The operating system version of the device.</p>
15    pub operating_system_version: ::std::option::Option<::std::string::String>,
16    /// <p>The operating system patch level of the device.</p>
17    pub patch_level: ::std::option::Option<::std::string::String>,
18    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
19    pub first_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The date that the device last accessed Amazon WorkLink.</p>
21    pub last_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>The user name associated with the device.</p>
23    pub username: ::std::option::Option<::std::string::String>,
24    _request_id: Option<String>,
25}
26impl DescribeDeviceOutput {
27    /// <p>The current state of the device.</p>
28    pub fn status(&self) -> ::std::option::Option<&crate::types::DeviceStatus> {
29        self.status.as_ref()
30    }
31    /// <p>The model of the device.</p>
32    pub fn model(&self) -> ::std::option::Option<&str> {
33        self.model.as_deref()
34    }
35    /// <p>The manufacturer of the device.</p>
36    pub fn manufacturer(&self) -> ::std::option::Option<&str> {
37        self.manufacturer.as_deref()
38    }
39    /// <p>The operating system of the device.</p>
40    pub fn operating_system(&self) -> ::std::option::Option<&str> {
41        self.operating_system.as_deref()
42    }
43    /// <p>The operating system version of the device.</p>
44    pub fn operating_system_version(&self) -> ::std::option::Option<&str> {
45        self.operating_system_version.as_deref()
46    }
47    /// <p>The operating system patch level of the device.</p>
48    pub fn patch_level(&self) -> ::std::option::Option<&str> {
49        self.patch_level.as_deref()
50    }
51    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
52    pub fn first_accessed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
53        self.first_accessed_time.as_ref()
54    }
55    /// <p>The date that the device last accessed Amazon WorkLink.</p>
56    pub fn last_accessed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57        self.last_accessed_time.as_ref()
58    }
59    /// <p>The user name associated with the device.</p>
60    pub fn username(&self) -> ::std::option::Option<&str> {
61        self.username.as_deref()
62    }
63}
64impl ::aws_types::request_id::RequestId for DescribeDeviceOutput {
65    fn request_id(&self) -> Option<&str> {
66        self._request_id.as_deref()
67    }
68}
69impl DescribeDeviceOutput {
70    /// Creates a new builder-style object to manufacture [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
71    pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
72        crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
73    }
74}
75
76/// A builder for [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct DescribeDeviceOutputBuilder {
80    pub(crate) status: ::std::option::Option<crate::types::DeviceStatus>,
81    pub(crate) model: ::std::option::Option<::std::string::String>,
82    pub(crate) manufacturer: ::std::option::Option<::std::string::String>,
83    pub(crate) operating_system: ::std::option::Option<::std::string::String>,
84    pub(crate) operating_system_version: ::std::option::Option<::std::string::String>,
85    pub(crate) patch_level: ::std::option::Option<::std::string::String>,
86    pub(crate) first_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
87    pub(crate) last_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
88    pub(crate) username: ::std::option::Option<::std::string::String>,
89    _request_id: Option<String>,
90}
91impl DescribeDeviceOutputBuilder {
92    /// <p>The current state of the device.</p>
93    pub fn status(mut self, input: crate::types::DeviceStatus) -> Self {
94        self.status = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>The current state of the device.</p>
98    pub fn set_status(mut self, input: ::std::option::Option<crate::types::DeviceStatus>) -> Self {
99        self.status = input;
100        self
101    }
102    /// <p>The current state of the device.</p>
103    pub fn get_status(&self) -> &::std::option::Option<crate::types::DeviceStatus> {
104        &self.status
105    }
106    /// <p>The model of the device.</p>
107    pub fn model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.model = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The model of the device.</p>
112    pub fn set_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.model = input;
114        self
115    }
116    /// <p>The model of the device.</p>
117    pub fn get_model(&self) -> &::std::option::Option<::std::string::String> {
118        &self.model
119    }
120    /// <p>The manufacturer of the device.</p>
121    pub fn manufacturer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.manufacturer = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The manufacturer of the device.</p>
126    pub fn set_manufacturer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.manufacturer = input;
128        self
129    }
130    /// <p>The manufacturer of the device.</p>
131    pub fn get_manufacturer(&self) -> &::std::option::Option<::std::string::String> {
132        &self.manufacturer
133    }
134    /// <p>The operating system of the device.</p>
135    pub fn operating_system(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.operating_system = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The operating system of the device.</p>
140    pub fn set_operating_system(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.operating_system = input;
142        self
143    }
144    /// <p>The operating system of the device.</p>
145    pub fn get_operating_system(&self) -> &::std::option::Option<::std::string::String> {
146        &self.operating_system
147    }
148    /// <p>The operating system version of the device.</p>
149    pub fn operating_system_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.operating_system_version = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The operating system version of the device.</p>
154    pub fn set_operating_system_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.operating_system_version = input;
156        self
157    }
158    /// <p>The operating system version of the device.</p>
159    pub fn get_operating_system_version(&self) -> &::std::option::Option<::std::string::String> {
160        &self.operating_system_version
161    }
162    /// <p>The operating system patch level of the device.</p>
163    pub fn patch_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.patch_level = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>The operating system patch level of the device.</p>
168    pub fn set_patch_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.patch_level = input;
170        self
171    }
172    /// <p>The operating system patch level of the device.</p>
173    pub fn get_patch_level(&self) -> &::std::option::Option<::std::string::String> {
174        &self.patch_level
175    }
176    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
177    pub fn first_accessed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
178        self.first_accessed_time = ::std::option::Option::Some(input);
179        self
180    }
181    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
182    pub fn set_first_accessed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
183        self.first_accessed_time = input;
184        self
185    }
186    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
187    pub fn get_first_accessed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
188        &self.first_accessed_time
189    }
190    /// <p>The date that the device last accessed Amazon WorkLink.</p>
191    pub fn last_accessed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
192        self.last_accessed_time = ::std::option::Option::Some(input);
193        self
194    }
195    /// <p>The date that the device last accessed Amazon WorkLink.</p>
196    pub fn set_last_accessed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
197        self.last_accessed_time = input;
198        self
199    }
200    /// <p>The date that the device last accessed Amazon WorkLink.</p>
201    pub fn get_last_accessed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
202        &self.last_accessed_time
203    }
204    /// <p>The user name associated with the device.</p>
205    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.username = ::std::option::Option::Some(input.into());
207        self
208    }
209    /// <p>The user name associated with the device.</p>
210    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.username = input;
212        self
213    }
214    /// <p>The user name associated with the device.</p>
215    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
216        &self.username
217    }
218    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
219        self._request_id = Some(request_id.into());
220        self
221    }
222
223    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
224        self._request_id = request_id;
225        self
226    }
227    /// Consumes the builder and constructs a [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
228    pub fn build(self) -> crate::operation::describe_device::DescribeDeviceOutput {
229        crate::operation::describe_device::DescribeDeviceOutput {
230            status: self.status,
231            model: self.model,
232            manufacturer: self.manufacturer,
233            operating_system: self.operating_system,
234            operating_system_version: self.operating_system_version,
235            patch_level: self.patch_level,
236            first_accessed_time: self.first_accessed_time,
237            last_accessed_time: self.last_accessed_time,
238            username: self.username,
239            _request_id: self._request_id,
240        }
241    }
242}