aws_sdk_athena/operation/stop_calculation_execution/_stop_calculation_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 StopCalculationExecutionOutput {
6 /// <p><code>CREATING</code> - The calculation is in the process of being created.</p>
7 /// <p><code>CREATED</code> - The calculation has been created and is ready to run.</p>
8 /// <p><code>QUEUED</code> - The calculation has been queued for processing.</p>
9 /// <p><code>RUNNING</code> - The calculation is running.</p>
10 /// <p><code>CANCELING</code> - A request to cancel the calculation has been received and the system is working to stop it.</p>
11 /// <p><code>CANCELED</code> - The calculation is no longer running as the result of a cancel request.</p>
12 /// <p><code>COMPLETED</code> - The calculation has completed without error.</p>
13 /// <p><code>FAILED</code> - The calculation failed and is no longer running.</p>
14 pub state: ::std::option::Option<crate::types::CalculationExecutionState>,
15 _request_id: Option<String>,
16}
17impl StopCalculationExecutionOutput {
18 /// <p><code>CREATING</code> - The calculation is in the process of being created.</p>
19 /// <p><code>CREATED</code> - The calculation has been created and is ready to run.</p>
20 /// <p><code>QUEUED</code> - The calculation has been queued for processing.</p>
21 /// <p><code>RUNNING</code> - The calculation is running.</p>
22 /// <p><code>CANCELING</code> - A request to cancel the calculation has been received and the system is working to stop it.</p>
23 /// <p><code>CANCELED</code> - The calculation is no longer running as the result of a cancel request.</p>
24 /// <p><code>COMPLETED</code> - The calculation has completed without error.</p>
25 /// <p><code>FAILED</code> - The calculation failed and is no longer running.</p>
26 pub fn state(&self) -> ::std::option::Option<&crate::types::CalculationExecutionState> {
27 self.state.as_ref()
28 }
29}
30impl ::aws_types::request_id::RequestId for StopCalculationExecutionOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl StopCalculationExecutionOutput {
36 /// Creates a new builder-style object to manufacture [`StopCalculationExecutionOutput`](crate::operation::stop_calculation_execution::StopCalculationExecutionOutput).
37 pub fn builder() -> crate::operation::stop_calculation_execution::builders::StopCalculationExecutionOutputBuilder {
38 crate::operation::stop_calculation_execution::builders::StopCalculationExecutionOutputBuilder::default()
39 }
40}
41
42/// A builder for [`StopCalculationExecutionOutput`](crate::operation::stop_calculation_execution::StopCalculationExecutionOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct StopCalculationExecutionOutputBuilder {
46 pub(crate) state: ::std::option::Option<crate::types::CalculationExecutionState>,
47 _request_id: Option<String>,
48}
49impl StopCalculationExecutionOutputBuilder {
50 /// <p><code>CREATING</code> - The calculation is in the process of being created.</p>
51 /// <p><code>CREATED</code> - The calculation has been created and is ready to run.</p>
52 /// <p><code>QUEUED</code> - The calculation has been queued for processing.</p>
53 /// <p><code>RUNNING</code> - The calculation is running.</p>
54 /// <p><code>CANCELING</code> - A request to cancel the calculation has been received and the system is working to stop it.</p>
55 /// <p><code>CANCELED</code> - The calculation is no longer running as the result of a cancel request.</p>
56 /// <p><code>COMPLETED</code> - The calculation has completed without error.</p>
57 /// <p><code>FAILED</code> - The calculation failed and is no longer running.</p>
58 pub fn state(mut self, input: crate::types::CalculationExecutionState) -> Self {
59 self.state = ::std::option::Option::Some(input);
60 self
61 }
62 /// <p><code>CREATING</code> - The calculation is in the process of being created.</p>
63 /// <p><code>CREATED</code> - The calculation has been created and is ready to run.</p>
64 /// <p><code>QUEUED</code> - The calculation has been queued for processing.</p>
65 /// <p><code>RUNNING</code> - The calculation is running.</p>
66 /// <p><code>CANCELING</code> - A request to cancel the calculation has been received and the system is working to stop it.</p>
67 /// <p><code>CANCELED</code> - The calculation is no longer running as the result of a cancel request.</p>
68 /// <p><code>COMPLETED</code> - The calculation has completed without error.</p>
69 /// <p><code>FAILED</code> - The calculation failed and is no longer running.</p>
70 pub fn set_state(mut self, input: ::std::option::Option<crate::types::CalculationExecutionState>) -> Self {
71 self.state = input;
72 self
73 }
74 /// <p><code>CREATING</code> - The calculation is in the process of being created.</p>
75 /// <p><code>CREATED</code> - The calculation has been created and is ready to run.</p>
76 /// <p><code>QUEUED</code> - The calculation has been queued for processing.</p>
77 /// <p><code>RUNNING</code> - The calculation is running.</p>
78 /// <p><code>CANCELING</code> - A request to cancel the calculation has been received and the system is working to stop it.</p>
79 /// <p><code>CANCELED</code> - The calculation is no longer running as the result of a cancel request.</p>
80 /// <p><code>COMPLETED</code> - The calculation has completed without error.</p>
81 /// <p><code>FAILED</code> - The calculation failed and is no longer running.</p>
82 pub fn get_state(&self) -> &::std::option::Option<crate::types::CalculationExecutionState> {
83 &self.state
84 }
85 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
86 self._request_id = Some(request_id.into());
87 self
88 }
89
90 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
91 self._request_id = request_id;
92 self
93 }
94 /// Consumes the builder and constructs a [`StopCalculationExecutionOutput`](crate::operation::stop_calculation_execution::StopCalculationExecutionOutput).
95 pub fn build(self) -> crate::operation::stop_calculation_execution::StopCalculationExecutionOutput {
96 crate::operation::stop_calculation_execution::StopCalculationExecutionOutput {
97 state: self.state,
98 _request_id: self._request_id,
99 }
100 }
101}