aws_sdk_iotsitewise/operation/describe_execution/
_describe_execution_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 DescribeExecutionOutput {
6    /// <p>The ID of the execution.</p>
7    pub execution_id: ::std::string::String,
8    /// <p>The type of action exectued.</p>
9    pub action_type: ::std::option::Option<::std::string::String>,
10    /// <p>The resource the action will be taken on. This can include asset-based resources and computation model resources.</p>
11    pub target_resource: ::std::option::Option<crate::types::TargetResource>,
12    /// <p>The version of the target resource.</p>
13    pub target_resource_version: ::std::string::String,
14    /// <p>The detailed resource this execution resolves to.</p>
15    pub resolve_to: ::std::option::Option<crate::types::ResolveTo>,
16    /// <p>The time the process started.</p>
17    pub execution_start_time: ::aws_smithy_types::DateTime,
18    /// <p>The time the process ended.</p>
19    pub execution_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The status of the execution process.</p>
21    pub execution_status: ::std::option::Option<crate::types::ExecutionStatus>,
22    /// <p>The result of the execution.</p>
23    pub execution_result: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24    /// <p>Provides detailed information about the execution of your anomaly detection models. This includes model metrics and training timestamps for both training and inference actions.</p>
25    /// <ul>
26    /// <li>
27    /// <p>The training action (Amazon Web Services/ANOMALY_DETECTION_TRAINING), includes performance metrics that help you compare different versions of your anomaly detection models. These metrics provide insights into the model's performance during the training process.</p></li>
28    /// <li>
29    /// <p>The inference action (Amazon Web Services/ANOMALY_DETECTION_INFERENCE), includes information about the results of executing your anomaly detection models. This helps you understand the output of your models and assess their performance.</p></li>
30    /// </ul>
31    pub execution_details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
32    /// <p>Entity version used for the execution.</p>
33    pub execution_entity_version: ::std::option::Option<::std::string::String>,
34    _request_id: Option<String>,
35}
36impl DescribeExecutionOutput {
37    /// <p>The ID of the execution.</p>
38    pub fn execution_id(&self) -> &str {
39        use std::ops::Deref;
40        self.execution_id.deref()
41    }
42    /// <p>The type of action exectued.</p>
43    pub fn action_type(&self) -> ::std::option::Option<&str> {
44        self.action_type.as_deref()
45    }
46    /// <p>The resource the action will be taken on. This can include asset-based resources and computation model resources.</p>
47    pub fn target_resource(&self) -> ::std::option::Option<&crate::types::TargetResource> {
48        self.target_resource.as_ref()
49    }
50    /// <p>The version of the target resource.</p>
51    pub fn target_resource_version(&self) -> &str {
52        use std::ops::Deref;
53        self.target_resource_version.deref()
54    }
55    /// <p>The detailed resource this execution resolves to.</p>
56    pub fn resolve_to(&self) -> ::std::option::Option<&crate::types::ResolveTo> {
57        self.resolve_to.as_ref()
58    }
59    /// <p>The time the process started.</p>
60    pub fn execution_start_time(&self) -> &::aws_smithy_types::DateTime {
61        &self.execution_start_time
62    }
63    /// <p>The time the process ended.</p>
64    pub fn execution_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65        self.execution_end_time.as_ref()
66    }
67    /// <p>The status of the execution process.</p>
68    pub fn execution_status(&self) -> ::std::option::Option<&crate::types::ExecutionStatus> {
69        self.execution_status.as_ref()
70    }
71    /// <p>The result of the execution.</p>
72    pub fn execution_result(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
73        self.execution_result.as_ref()
74    }
75    /// <p>Provides detailed information about the execution of your anomaly detection models. This includes model metrics and training timestamps for both training and inference actions.</p>
76    /// <ul>
77    /// <li>
78    /// <p>The training action (Amazon Web Services/ANOMALY_DETECTION_TRAINING), includes performance metrics that help you compare different versions of your anomaly detection models. These metrics provide insights into the model's performance during the training process.</p></li>
79    /// <li>
80    /// <p>The inference action (Amazon Web Services/ANOMALY_DETECTION_INFERENCE), includes information about the results of executing your anomaly detection models. This helps you understand the output of your models and assess their performance.</p></li>
81    /// </ul>
82    pub fn execution_details(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
83        self.execution_details.as_ref()
84    }
85    /// <p>Entity version used for the execution.</p>
86    pub fn execution_entity_version(&self) -> ::std::option::Option<&str> {
87        self.execution_entity_version.as_deref()
88    }
89}
90impl ::aws_types::request_id::RequestId for DescribeExecutionOutput {
91    fn request_id(&self) -> Option<&str> {
92        self._request_id.as_deref()
93    }
94}
95impl DescribeExecutionOutput {
96    /// Creates a new builder-style object to manufacture [`DescribeExecutionOutput`](crate::operation::describe_execution::DescribeExecutionOutput).
97    pub fn builder() -> crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder {
98        crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder::default()
99    }
100}
101
102/// A builder for [`DescribeExecutionOutput`](crate::operation::describe_execution::DescribeExecutionOutput).
103#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
104#[non_exhaustive]
105pub struct DescribeExecutionOutputBuilder {
106    pub(crate) execution_id: ::std::option::Option<::std::string::String>,
107    pub(crate) action_type: ::std::option::Option<::std::string::String>,
108    pub(crate) target_resource: ::std::option::Option<crate::types::TargetResource>,
109    pub(crate) target_resource_version: ::std::option::Option<::std::string::String>,
110    pub(crate) resolve_to: ::std::option::Option<crate::types::ResolveTo>,
111    pub(crate) execution_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
112    pub(crate) execution_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
113    pub(crate) execution_status: ::std::option::Option<crate::types::ExecutionStatus>,
114    pub(crate) execution_result: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
115    pub(crate) execution_details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
116    pub(crate) execution_entity_version: ::std::option::Option<::std::string::String>,
117    _request_id: Option<String>,
118}
119impl DescribeExecutionOutputBuilder {
120    /// <p>The ID of the execution.</p>
121    /// This field is required.
122    pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.execution_id = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The ID of the execution.</p>
127    pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.execution_id = input;
129        self
130    }
131    /// <p>The ID of the execution.</p>
132    pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
133        &self.execution_id
134    }
135    /// <p>The type of action exectued.</p>
136    pub fn action_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.action_type = ::std::option::Option::Some(input.into());
138        self
139    }
140    /// <p>The type of action exectued.</p>
141    pub fn set_action_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.action_type = input;
143        self
144    }
145    /// <p>The type of action exectued.</p>
146    pub fn get_action_type(&self) -> &::std::option::Option<::std::string::String> {
147        &self.action_type
148    }
149    /// <p>The resource the action will be taken on. This can include asset-based resources and computation model resources.</p>
150    /// This field is required.
151    pub fn target_resource(mut self, input: crate::types::TargetResource) -> Self {
152        self.target_resource = ::std::option::Option::Some(input);
153        self
154    }
155    /// <p>The resource the action will be taken on. This can include asset-based resources and computation model resources.</p>
156    pub fn set_target_resource(mut self, input: ::std::option::Option<crate::types::TargetResource>) -> Self {
157        self.target_resource = input;
158        self
159    }
160    /// <p>The resource the action will be taken on. This can include asset-based resources and computation model resources.</p>
161    pub fn get_target_resource(&self) -> &::std::option::Option<crate::types::TargetResource> {
162        &self.target_resource
163    }
164    /// <p>The version of the target resource.</p>
165    /// This field is required.
166    pub fn target_resource_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.target_resource_version = ::std::option::Option::Some(input.into());
168        self
169    }
170    /// <p>The version of the target resource.</p>
171    pub fn set_target_resource_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.target_resource_version = input;
173        self
174    }
175    /// <p>The version of the target resource.</p>
176    pub fn get_target_resource_version(&self) -> &::std::option::Option<::std::string::String> {
177        &self.target_resource_version
178    }
179    /// <p>The detailed resource this execution resolves to.</p>
180    pub fn resolve_to(mut self, input: crate::types::ResolveTo) -> Self {
181        self.resolve_to = ::std::option::Option::Some(input);
182        self
183    }
184    /// <p>The detailed resource this execution resolves to.</p>
185    pub fn set_resolve_to(mut self, input: ::std::option::Option<crate::types::ResolveTo>) -> Self {
186        self.resolve_to = input;
187        self
188    }
189    /// <p>The detailed resource this execution resolves to.</p>
190    pub fn get_resolve_to(&self) -> &::std::option::Option<crate::types::ResolveTo> {
191        &self.resolve_to
192    }
193    /// <p>The time the process started.</p>
194    /// This field is required.
195    pub fn execution_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
196        self.execution_start_time = ::std::option::Option::Some(input);
197        self
198    }
199    /// <p>The time the process started.</p>
200    pub fn set_execution_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
201        self.execution_start_time = input;
202        self
203    }
204    /// <p>The time the process started.</p>
205    pub fn get_execution_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
206        &self.execution_start_time
207    }
208    /// <p>The time the process ended.</p>
209    pub fn execution_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
210        self.execution_end_time = ::std::option::Option::Some(input);
211        self
212    }
213    /// <p>The time the process ended.</p>
214    pub fn set_execution_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
215        self.execution_end_time = input;
216        self
217    }
218    /// <p>The time the process ended.</p>
219    pub fn get_execution_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
220        &self.execution_end_time
221    }
222    /// <p>The status of the execution process.</p>
223    /// This field is required.
224    pub fn execution_status(mut self, input: crate::types::ExecutionStatus) -> Self {
225        self.execution_status = ::std::option::Option::Some(input);
226        self
227    }
228    /// <p>The status of the execution process.</p>
229    pub fn set_execution_status(mut self, input: ::std::option::Option<crate::types::ExecutionStatus>) -> Self {
230        self.execution_status = input;
231        self
232    }
233    /// <p>The status of the execution process.</p>
234    pub fn get_execution_status(&self) -> &::std::option::Option<crate::types::ExecutionStatus> {
235        &self.execution_status
236    }
237    /// Adds a key-value pair to `execution_result`.
238    ///
239    /// To override the contents of this collection use [`set_execution_result`](Self::set_execution_result).
240    ///
241    /// <p>The result of the execution.</p>
242    pub fn execution_result(
243        mut self,
244        k: impl ::std::convert::Into<::std::string::String>,
245        v: impl ::std::convert::Into<::std::string::String>,
246    ) -> Self {
247        let mut hash_map = self.execution_result.unwrap_or_default();
248        hash_map.insert(k.into(), v.into());
249        self.execution_result = ::std::option::Option::Some(hash_map);
250        self
251    }
252    /// <p>The result of the execution.</p>
253    pub fn set_execution_result(
254        mut self,
255        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
256    ) -> Self {
257        self.execution_result = input;
258        self
259    }
260    /// <p>The result of the execution.</p>
261    pub fn get_execution_result(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
262        &self.execution_result
263    }
264    /// Adds a key-value pair to `execution_details`.
265    ///
266    /// To override the contents of this collection use [`set_execution_details`](Self::set_execution_details).
267    ///
268    /// <p>Provides detailed information about the execution of your anomaly detection models. This includes model metrics and training timestamps for both training and inference actions.</p>
269    /// <ul>
270    /// <li>
271    /// <p>The training action (Amazon Web Services/ANOMALY_DETECTION_TRAINING), includes performance metrics that help you compare different versions of your anomaly detection models. These metrics provide insights into the model's performance during the training process.</p></li>
272    /// <li>
273    /// <p>The inference action (Amazon Web Services/ANOMALY_DETECTION_INFERENCE), includes information about the results of executing your anomaly detection models. This helps you understand the output of your models and assess their performance.</p></li>
274    /// </ul>
275    pub fn execution_details(
276        mut self,
277        k: impl ::std::convert::Into<::std::string::String>,
278        v: impl ::std::convert::Into<::std::string::String>,
279    ) -> Self {
280        let mut hash_map = self.execution_details.unwrap_or_default();
281        hash_map.insert(k.into(), v.into());
282        self.execution_details = ::std::option::Option::Some(hash_map);
283        self
284    }
285    /// <p>Provides detailed information about the execution of your anomaly detection models. This includes model metrics and training timestamps for both training and inference actions.</p>
286    /// <ul>
287    /// <li>
288    /// <p>The training action (Amazon Web Services/ANOMALY_DETECTION_TRAINING), includes performance metrics that help you compare different versions of your anomaly detection models. These metrics provide insights into the model's performance during the training process.</p></li>
289    /// <li>
290    /// <p>The inference action (Amazon Web Services/ANOMALY_DETECTION_INFERENCE), includes information about the results of executing your anomaly detection models. This helps you understand the output of your models and assess their performance.</p></li>
291    /// </ul>
292    pub fn set_execution_details(
293        mut self,
294        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
295    ) -> Self {
296        self.execution_details = input;
297        self
298    }
299    /// <p>Provides detailed information about the execution of your anomaly detection models. This includes model metrics and training timestamps for both training and inference actions.</p>
300    /// <ul>
301    /// <li>
302    /// <p>The training action (Amazon Web Services/ANOMALY_DETECTION_TRAINING), includes performance metrics that help you compare different versions of your anomaly detection models. These metrics provide insights into the model's performance during the training process.</p></li>
303    /// <li>
304    /// <p>The inference action (Amazon Web Services/ANOMALY_DETECTION_INFERENCE), includes information about the results of executing your anomaly detection models. This helps you understand the output of your models and assess their performance.</p></li>
305    /// </ul>
306    pub fn get_execution_details(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
307        &self.execution_details
308    }
309    /// <p>Entity version used for the execution.</p>
310    pub fn execution_entity_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
311        self.execution_entity_version = ::std::option::Option::Some(input.into());
312        self
313    }
314    /// <p>Entity version used for the execution.</p>
315    pub fn set_execution_entity_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
316        self.execution_entity_version = input;
317        self
318    }
319    /// <p>Entity version used for the execution.</p>
320    pub fn get_execution_entity_version(&self) -> &::std::option::Option<::std::string::String> {
321        &self.execution_entity_version
322    }
323    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
324        self._request_id = Some(request_id.into());
325        self
326    }
327
328    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
329        self._request_id = request_id;
330        self
331    }
332    /// Consumes the builder and constructs a [`DescribeExecutionOutput`](crate::operation::describe_execution::DescribeExecutionOutput).
333    /// This method will fail if any of the following fields are not set:
334    /// - [`execution_id`](crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder::execution_id)
335    /// - [`target_resource_version`](crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder::target_resource_version)
336    /// - [`execution_start_time`](crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder::execution_start_time)
337    pub fn build(
338        self,
339    ) -> ::std::result::Result<crate::operation::describe_execution::DescribeExecutionOutput, ::aws_smithy_types::error::operation::BuildError> {
340        ::std::result::Result::Ok(crate::operation::describe_execution::DescribeExecutionOutput {
341            execution_id: self.execution_id.ok_or_else(|| {
342                ::aws_smithy_types::error::operation::BuildError::missing_field(
343                    "execution_id",
344                    "execution_id was not specified but it is required when building DescribeExecutionOutput",
345                )
346            })?,
347            action_type: self.action_type,
348            target_resource: self.target_resource,
349            target_resource_version: self.target_resource_version.ok_or_else(|| {
350                ::aws_smithy_types::error::operation::BuildError::missing_field(
351                    "target_resource_version",
352                    "target_resource_version was not specified but it is required when building DescribeExecutionOutput",
353                )
354            })?,
355            resolve_to: self.resolve_to,
356            execution_start_time: self.execution_start_time.ok_or_else(|| {
357                ::aws_smithy_types::error::operation::BuildError::missing_field(
358                    "execution_start_time",
359                    "execution_start_time was not specified but it is required when building DescribeExecutionOutput",
360                )
361            })?,
362            execution_end_time: self.execution_end_time,
363            execution_status: self.execution_status,
364            execution_result: self.execution_result,
365            execution_details: self.execution_details,
366            execution_entity_version: self.execution_entity_version,
367            _request_id: self._request_id,
368        })
369    }
370}