aws_sdk_sagemaker/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 device_arn: ::std::option::Option<::std::string::String>,
8 pub device_name: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub device_fleet_name: ::std::option::Option<::std::string::String>,
14 pub iot_thing_name: ::std::option::Option<::std::string::String>,
16 pub registration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18 pub latest_heartbeat: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub models: ::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>>,
22 pub max_models: ::std::option::Option<i32>,
24 pub next_token: ::std::option::Option<::std::string::String>,
26 pub agent_version: ::std::option::Option<::std::string::String>,
28 _request_id: Option<String>,
29}
30impl DescribeDeviceOutput {
31 pub fn device_arn(&self) -> ::std::option::Option<&str> {
33 self.device_arn.as_deref()
34 }
35 pub fn device_name(&self) -> ::std::option::Option<&str> {
37 self.device_name.as_deref()
38 }
39 pub fn description(&self) -> ::std::option::Option<&str> {
41 self.description.as_deref()
42 }
43 pub fn device_fleet_name(&self) -> ::std::option::Option<&str> {
45 self.device_fleet_name.as_deref()
46 }
47 pub fn iot_thing_name(&self) -> ::std::option::Option<&str> {
49 self.iot_thing_name.as_deref()
50 }
51 pub fn registration_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
53 self.registration_time.as_ref()
54 }
55 pub fn latest_heartbeat(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.latest_heartbeat.as_ref()
58 }
59 pub fn models(&self) -> &[crate::types::EdgeModel] {
63 self.models.as_deref().unwrap_or_default()
64 }
65 pub fn max_models(&self) -> ::std::option::Option<i32> {
67 self.max_models
68 }
69 pub fn next_token(&self) -> ::std::option::Option<&str> {
71 self.next_token.as_deref()
72 }
73 pub fn agent_version(&self) -> ::std::option::Option<&str> {
75 self.agent_version.as_deref()
76 }
77}
78impl ::aws_types::request_id::RequestId for DescribeDeviceOutput {
79 fn request_id(&self) -> Option<&str> {
80 self._request_id.as_deref()
81 }
82}
83impl DescribeDeviceOutput {
84 pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
86 crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
87 }
88}
89
90#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
92#[non_exhaustive]
93pub struct DescribeDeviceOutputBuilder {
94 pub(crate) device_arn: ::std::option::Option<::std::string::String>,
95 pub(crate) device_name: ::std::option::Option<::std::string::String>,
96 pub(crate) description: ::std::option::Option<::std::string::String>,
97 pub(crate) device_fleet_name: ::std::option::Option<::std::string::String>,
98 pub(crate) iot_thing_name: ::std::option::Option<::std::string::String>,
99 pub(crate) registration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
100 pub(crate) latest_heartbeat: ::std::option::Option<::aws_smithy_types::DateTime>,
101 pub(crate) models: ::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>>,
102 pub(crate) max_models: ::std::option::Option<i32>,
103 pub(crate) next_token: ::std::option::Option<::std::string::String>,
104 pub(crate) agent_version: ::std::option::Option<::std::string::String>,
105 _request_id: Option<String>,
106}
107impl DescribeDeviceOutputBuilder {
108 pub fn device_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.device_arn = ::std::option::Option::Some(input.into());
111 self
112 }
113 pub fn set_device_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.device_arn = input;
116 self
117 }
118 pub fn get_device_arn(&self) -> &::std::option::Option<::std::string::String> {
120 &self.device_arn
121 }
122 pub fn device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.device_name = ::std::option::Option::Some(input.into());
126 self
127 }
128 pub fn set_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130 self.device_name = input;
131 self
132 }
133 pub fn get_device_name(&self) -> &::std::option::Option<::std::string::String> {
135 &self.device_name
136 }
137 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139 self.description = ::std::option::Option::Some(input.into());
140 self
141 }
142 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144 self.description = input;
145 self
146 }
147 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
149 &self.description
150 }
151 pub fn device_fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.device_fleet_name = ::std::option::Option::Some(input.into());
155 self
156 }
157 pub fn set_device_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159 self.device_fleet_name = input;
160 self
161 }
162 pub fn get_device_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
164 &self.device_fleet_name
165 }
166 pub fn iot_thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168 self.iot_thing_name = ::std::option::Option::Some(input.into());
169 self
170 }
171 pub fn set_iot_thing_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.iot_thing_name = input;
174 self
175 }
176 pub fn get_iot_thing_name(&self) -> &::std::option::Option<::std::string::String> {
178 &self.iot_thing_name
179 }
180 pub fn registration_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
183 self.registration_time = ::std::option::Option::Some(input);
184 self
185 }
186 pub fn set_registration_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
188 self.registration_time = input;
189 self
190 }
191 pub fn get_registration_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
193 &self.registration_time
194 }
195 pub fn latest_heartbeat(mut self, input: ::aws_smithy_types::DateTime) -> Self {
197 self.latest_heartbeat = ::std::option::Option::Some(input);
198 self
199 }
200 pub fn set_latest_heartbeat(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
202 self.latest_heartbeat = input;
203 self
204 }
205 pub fn get_latest_heartbeat(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
207 &self.latest_heartbeat
208 }
209 pub fn models(mut self, input: crate::types::EdgeModel) -> Self {
215 let mut v = self.models.unwrap_or_default();
216 v.push(input);
217 self.models = ::std::option::Option::Some(v);
218 self
219 }
220 pub fn set_models(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>>) -> Self {
222 self.models = input;
223 self
224 }
225 pub fn get_models(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EdgeModel>> {
227 &self.models
228 }
229 pub fn max_models(mut self, input: i32) -> Self {
231 self.max_models = ::std::option::Option::Some(input);
232 self
233 }
234 pub fn set_max_models(mut self, input: ::std::option::Option<i32>) -> Self {
236 self.max_models = input;
237 self
238 }
239 pub fn get_max_models(&self) -> &::std::option::Option<i32> {
241 &self.max_models
242 }
243 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245 self.next_token = ::std::option::Option::Some(input.into());
246 self
247 }
248 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250 self.next_token = input;
251 self
252 }
253 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
255 &self.next_token
256 }
257 pub fn agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
259 self.agent_version = ::std::option::Option::Some(input.into());
260 self
261 }
262 pub fn set_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
264 self.agent_version = input;
265 self
266 }
267 pub fn get_agent_version(&self) -> &::std::option::Option<::std::string::String> {
269 &self.agent_version
270 }
271 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
272 self._request_id = Some(request_id.into());
273 self
274 }
275
276 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
277 self._request_id = request_id;
278 self
279 }
280 pub fn build(self) -> crate::operation::describe_device::DescribeDeviceOutput {
282 crate::operation::describe_device::DescribeDeviceOutput {
283 device_arn: self.device_arn,
284 device_name: self.device_name,
285 description: self.description,
286 device_fleet_name: self.device_fleet_name,
287 iot_thing_name: self.iot_thing_name,
288 registration_time: self.registration_time,
289 latest_heartbeat: self.latest_heartbeat,
290 models: self.models,
291 max_models: self.max_models,
292 next_token: self.next_token,
293 agent_version: self.agent_version,
294 _request_id: self._request_id,
295 }
296 }
297}