aws_sdk_worklink/operation/describe_device/
_describe_device_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeDeviceOutput {
6 pub status: ::std::option::Option<crate::types::DeviceStatus>,
8 pub model: ::std::option::Option<::std::string::String>,
10 pub manufacturer: ::std::option::Option<::std::string::String>,
12 pub operating_system: ::std::option::Option<::std::string::String>,
14 pub operating_system_version: ::std::option::Option<::std::string::String>,
16 pub patch_level: ::std::option::Option<::std::string::String>,
18 pub first_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub last_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22 pub username: ::std::option::Option<::std::string::String>,
24 _request_id: Option<String>,
25}
26impl DescribeDeviceOutput {
27 pub fn status(&self) -> ::std::option::Option<&crate::types::DeviceStatus> {
29 self.status.as_ref()
30 }
31 pub fn model(&self) -> ::std::option::Option<&str> {
33 self.model.as_deref()
34 }
35 pub fn manufacturer(&self) -> ::std::option::Option<&str> {
37 self.manufacturer.as_deref()
38 }
39 pub fn operating_system(&self) -> ::std::option::Option<&str> {
41 self.operating_system.as_deref()
42 }
43 pub fn operating_system_version(&self) -> ::std::option::Option<&str> {
45 self.operating_system_version.as_deref()
46 }
47 pub fn patch_level(&self) -> ::std::option::Option<&str> {
49 self.patch_level.as_deref()
50 }
51 pub fn first_accessed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
53 self.first_accessed_time.as_ref()
54 }
55 pub fn last_accessed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.last_accessed_time.as_ref()
58 }
59 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 pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
72 crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
73 }
74}
75
76#[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 pub fn status(mut self, input: crate::types::DeviceStatus) -> Self {
94 self.status = ::std::option::Option::Some(input);
95 self
96 }
97 pub fn set_status(mut self, input: ::std::option::Option<crate::types::DeviceStatus>) -> Self {
99 self.status = input;
100 self
101 }
102 pub fn get_status(&self) -> &::std::option::Option<crate::types::DeviceStatus> {
104 &self.status
105 }
106 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 pub fn set_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.model = input;
114 self
115 }
116 pub fn get_model(&self) -> &::std::option::Option<::std::string::String> {
118 &self.model
119 }
120 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 pub fn set_manufacturer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.manufacturer = input;
128 self
129 }
130 pub fn get_manufacturer(&self) -> &::std::option::Option<::std::string::String> {
132 &self.manufacturer
133 }
134 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 pub fn set_operating_system(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.operating_system = input;
142 self
143 }
144 pub fn get_operating_system(&self) -> &::std::option::Option<::std::string::String> {
146 &self.operating_system
147 }
148 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 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 pub fn get_operating_system_version(&self) -> &::std::option::Option<::std::string::String> {
160 &self.operating_system_version
161 }
162 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 pub fn set_patch_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.patch_level = input;
170 self
171 }
172 pub fn get_patch_level(&self) -> &::std::option::Option<::std::string::String> {
174 &self.patch_level
175 }
176 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 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 pub fn get_first_accessed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
188 &self.first_accessed_time
189 }
190 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 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 pub fn get_last_accessed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
202 &self.last_accessed_time
203 }
204 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 pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211 self.username = input;
212 self
213 }
214 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 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}