aws_sdk_quicksight/operation/describe_analysis_definition/
_describe_analysis_definition_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 DescribeAnalysisDefinitionOutput {
6    /// <p>The ID of the analysis described.</p>
7    pub analysis_id: ::std::option::Option<::std::string::String>,
8    /// <p>The descriptive name of the analysis.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>Errors associated with the analysis.</p>
11    pub errors: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisError>>,
12    /// <p>Status associated with the analysis.</p>
13    /// <ul>
14    /// <li>
15    /// <p><code>CREATION_IN_PROGRESS</code></p></li>
16    /// <li>
17    /// <p><code>CREATION_SUCCESSFUL</code></p></li>
18    /// <li>
19    /// <p><code>CREATION_FAILED</code></p></li>
20    /// <li>
21    /// <p><code>UPDATE_IN_PROGRESS</code></p></li>
22    /// <li>
23    /// <p><code>UPDATE_SUCCESSFUL</code></p></li>
24    /// <li>
25    /// <p><code>UPDATE_FAILED</code></p></li>
26    /// <li>
27    /// <p><code>DELETED</code></p></li>
28    /// </ul>
29    pub resource_status: ::std::option::Option<crate::types::ResourceStatus>,
30    /// <p>The ARN of the theme of the analysis.</p>
31    pub theme_arn: ::std::option::Option<::std::string::String>,
32    /// <p>The definition of an analysis.</p>
33    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
34    pub definition: ::std::option::Option<crate::types::AnalysisDefinition>,
35    /// <p>The HTTP status of the request.</p>
36    pub status: i32,
37    /// <p>The Amazon Web Services request ID for this operation.</p>
38    pub request_id: ::std::option::Option<::std::string::String>,
39    _request_id: Option<String>,
40}
41impl DescribeAnalysisDefinitionOutput {
42    /// <p>The ID of the analysis described.</p>
43    pub fn analysis_id(&self) -> ::std::option::Option<&str> {
44        self.analysis_id.as_deref()
45    }
46    /// <p>The descriptive name of the analysis.</p>
47    pub fn name(&self) -> ::std::option::Option<&str> {
48        self.name.as_deref()
49    }
50    /// <p>Errors associated with the analysis.</p>
51    ///
52    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.errors.is_none()`.
53    pub fn errors(&self) -> &[crate::types::AnalysisError] {
54        self.errors.as_deref().unwrap_or_default()
55    }
56    /// <p>Status associated with the analysis.</p>
57    /// <ul>
58    /// <li>
59    /// <p><code>CREATION_IN_PROGRESS</code></p></li>
60    /// <li>
61    /// <p><code>CREATION_SUCCESSFUL</code></p></li>
62    /// <li>
63    /// <p><code>CREATION_FAILED</code></p></li>
64    /// <li>
65    /// <p><code>UPDATE_IN_PROGRESS</code></p></li>
66    /// <li>
67    /// <p><code>UPDATE_SUCCESSFUL</code></p></li>
68    /// <li>
69    /// <p><code>UPDATE_FAILED</code></p></li>
70    /// <li>
71    /// <p><code>DELETED</code></p></li>
72    /// </ul>
73    pub fn resource_status(&self) -> ::std::option::Option<&crate::types::ResourceStatus> {
74        self.resource_status.as_ref()
75    }
76    /// <p>The ARN of the theme of the analysis.</p>
77    pub fn theme_arn(&self) -> ::std::option::Option<&str> {
78        self.theme_arn.as_deref()
79    }
80    /// <p>The definition of an analysis.</p>
81    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
82    pub fn definition(&self) -> ::std::option::Option<&crate::types::AnalysisDefinition> {
83        self.definition.as_ref()
84    }
85    /// <p>The HTTP status of the request.</p>
86    pub fn status(&self) -> i32 {
87        self.status
88    }
89    /// <p>The Amazon Web Services request ID for this operation.</p>
90    pub fn request_id(&self) -> ::std::option::Option<&str> {
91        self.request_id.as_deref()
92    }
93}
94impl ::aws_types::request_id::RequestId for DescribeAnalysisDefinitionOutput {
95    fn request_id(&self) -> Option<&str> {
96        self._request_id.as_deref()
97    }
98}
99impl DescribeAnalysisDefinitionOutput {
100    /// Creates a new builder-style object to manufacture [`DescribeAnalysisDefinitionOutput`](crate::operation::describe_analysis_definition::DescribeAnalysisDefinitionOutput).
101    pub fn builder() -> crate::operation::describe_analysis_definition::builders::DescribeAnalysisDefinitionOutputBuilder {
102        crate::operation::describe_analysis_definition::builders::DescribeAnalysisDefinitionOutputBuilder::default()
103    }
104}
105
106/// A builder for [`DescribeAnalysisDefinitionOutput`](crate::operation::describe_analysis_definition::DescribeAnalysisDefinitionOutput).
107#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
108#[non_exhaustive]
109pub struct DescribeAnalysisDefinitionOutputBuilder {
110    pub(crate) analysis_id: ::std::option::Option<::std::string::String>,
111    pub(crate) name: ::std::option::Option<::std::string::String>,
112    pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisError>>,
113    pub(crate) resource_status: ::std::option::Option<crate::types::ResourceStatus>,
114    pub(crate) theme_arn: ::std::option::Option<::std::string::String>,
115    pub(crate) definition: ::std::option::Option<crate::types::AnalysisDefinition>,
116    pub(crate) status: ::std::option::Option<i32>,
117    pub(crate) request_id: ::std::option::Option<::std::string::String>,
118    _request_id: Option<String>,
119}
120impl DescribeAnalysisDefinitionOutputBuilder {
121    /// <p>The ID of the analysis described.</p>
122    pub fn analysis_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.analysis_id = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The ID of the analysis described.</p>
127    pub fn set_analysis_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.analysis_id = input;
129        self
130    }
131    /// <p>The ID of the analysis described.</p>
132    pub fn get_analysis_id(&self) -> &::std::option::Option<::std::string::String> {
133        &self.analysis_id
134    }
135    /// <p>The descriptive name of the analysis.</p>
136    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.name = ::std::option::Option::Some(input.into());
138        self
139    }
140    /// <p>The descriptive name of the analysis.</p>
141    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.name = input;
143        self
144    }
145    /// <p>The descriptive name of the analysis.</p>
146    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
147        &self.name
148    }
149    /// Appends an item to `errors`.
150    ///
151    /// To override the contents of this collection use [`set_errors`](Self::set_errors).
152    ///
153    /// <p>Errors associated with the analysis.</p>
154    pub fn errors(mut self, input: crate::types::AnalysisError) -> Self {
155        let mut v = self.errors.unwrap_or_default();
156        v.push(input);
157        self.errors = ::std::option::Option::Some(v);
158        self
159    }
160    /// <p>Errors associated with the analysis.</p>
161    pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisError>>) -> Self {
162        self.errors = input;
163        self
164    }
165    /// <p>Errors associated with the analysis.</p>
166    pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AnalysisError>> {
167        &self.errors
168    }
169    /// <p>Status associated with the analysis.</p>
170    /// <ul>
171    /// <li>
172    /// <p><code>CREATION_IN_PROGRESS</code></p></li>
173    /// <li>
174    /// <p><code>CREATION_SUCCESSFUL</code></p></li>
175    /// <li>
176    /// <p><code>CREATION_FAILED</code></p></li>
177    /// <li>
178    /// <p><code>UPDATE_IN_PROGRESS</code></p></li>
179    /// <li>
180    /// <p><code>UPDATE_SUCCESSFUL</code></p></li>
181    /// <li>
182    /// <p><code>UPDATE_FAILED</code></p></li>
183    /// <li>
184    /// <p><code>DELETED</code></p></li>
185    /// </ul>
186    pub fn resource_status(mut self, input: crate::types::ResourceStatus) -> Self {
187        self.resource_status = ::std::option::Option::Some(input);
188        self
189    }
190    /// <p>Status associated with the analysis.</p>
191    /// <ul>
192    /// <li>
193    /// <p><code>CREATION_IN_PROGRESS</code></p></li>
194    /// <li>
195    /// <p><code>CREATION_SUCCESSFUL</code></p></li>
196    /// <li>
197    /// <p><code>CREATION_FAILED</code></p></li>
198    /// <li>
199    /// <p><code>UPDATE_IN_PROGRESS</code></p></li>
200    /// <li>
201    /// <p><code>UPDATE_SUCCESSFUL</code></p></li>
202    /// <li>
203    /// <p><code>UPDATE_FAILED</code></p></li>
204    /// <li>
205    /// <p><code>DELETED</code></p></li>
206    /// </ul>
207    pub fn set_resource_status(mut self, input: ::std::option::Option<crate::types::ResourceStatus>) -> Self {
208        self.resource_status = input;
209        self
210    }
211    /// <p>Status associated with the analysis.</p>
212    /// <ul>
213    /// <li>
214    /// <p><code>CREATION_IN_PROGRESS</code></p></li>
215    /// <li>
216    /// <p><code>CREATION_SUCCESSFUL</code></p></li>
217    /// <li>
218    /// <p><code>CREATION_FAILED</code></p></li>
219    /// <li>
220    /// <p><code>UPDATE_IN_PROGRESS</code></p></li>
221    /// <li>
222    /// <p><code>UPDATE_SUCCESSFUL</code></p></li>
223    /// <li>
224    /// <p><code>UPDATE_FAILED</code></p></li>
225    /// <li>
226    /// <p><code>DELETED</code></p></li>
227    /// </ul>
228    pub fn get_resource_status(&self) -> &::std::option::Option<crate::types::ResourceStatus> {
229        &self.resource_status
230    }
231    /// <p>The ARN of the theme of the analysis.</p>
232    pub fn theme_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
233        self.theme_arn = ::std::option::Option::Some(input.into());
234        self
235    }
236    /// <p>The ARN of the theme of the analysis.</p>
237    pub fn set_theme_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238        self.theme_arn = input;
239        self
240    }
241    /// <p>The ARN of the theme of the analysis.</p>
242    pub fn get_theme_arn(&self) -> &::std::option::Option<::std::string::String> {
243        &self.theme_arn
244    }
245    /// <p>The definition of an analysis.</p>
246    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
247    pub fn definition(mut self, input: crate::types::AnalysisDefinition) -> Self {
248        self.definition = ::std::option::Option::Some(input);
249        self
250    }
251    /// <p>The definition of an analysis.</p>
252    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
253    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::AnalysisDefinition>) -> Self {
254        self.definition = input;
255        self
256    }
257    /// <p>The definition of an analysis.</p>
258    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
259    pub fn get_definition(&self) -> &::std::option::Option<crate::types::AnalysisDefinition> {
260        &self.definition
261    }
262    /// <p>The HTTP status of the request.</p>
263    pub fn status(mut self, input: i32) -> Self {
264        self.status = ::std::option::Option::Some(input);
265        self
266    }
267    /// <p>The HTTP status of the request.</p>
268    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
269        self.status = input;
270        self
271    }
272    /// <p>The HTTP status of the request.</p>
273    pub fn get_status(&self) -> &::std::option::Option<i32> {
274        &self.status
275    }
276    /// <p>The Amazon Web Services request ID for this operation.</p>
277    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278        self.request_id = ::std::option::Option::Some(input.into());
279        self
280    }
281    /// <p>The Amazon Web Services request ID for this operation.</p>
282    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283        self.request_id = input;
284        self
285    }
286    /// <p>The Amazon Web Services request ID for this operation.</p>
287    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
288        &self.request_id
289    }
290    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
291        self._request_id = Some(request_id.into());
292        self
293    }
294
295    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
296        self._request_id = request_id;
297        self
298    }
299    /// Consumes the builder and constructs a [`DescribeAnalysisDefinitionOutput`](crate::operation::describe_analysis_definition::DescribeAnalysisDefinitionOutput).
300    pub fn build(self) -> crate::operation::describe_analysis_definition::DescribeAnalysisDefinitionOutput {
301        crate::operation::describe_analysis_definition::DescribeAnalysisDefinitionOutput {
302            analysis_id: self.analysis_id,
303            name: self.name,
304            errors: self.errors,
305            resource_status: self.resource_status,
306            theme_arn: self.theme_arn,
307            definition: self.definition,
308            status: self.status.unwrap_or_default(),
309            request_id: self.request_id,
310            _request_id: self._request_id,
311        }
312    }
313}