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