aws_sdk_quicksight/operation/create_analysis/_create_analysis_input.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 CreateAnalysisInput {
6 /// <p>The ID of the Amazon Web Services account where you are creating an analysis.</p>
7 pub aws_account_id: ::std::option::Option<::std::string::String>,
8 /// <p>The ID for the analysis that you're creating. This ID displays in the URL of the analysis.</p>
9 pub analysis_id: ::std::option::Option<::std::string::String>,
10 /// <p>A descriptive name for the analysis that you're creating. This name displays for the analysis in the Amazon Quick Sight console.</p>
11 pub name: ::std::option::Option<::std::string::String>,
12 /// <p>The parameter names and override values that you want to use. An analysis can have any parameter type, and some parameters might accept multiple values.</p>
13 pub parameters: ::std::option::Option<crate::types::Parameters>,
14 /// <p>A structure that describes the principals and the resource-level permissions on an analysis. You can use the <code>Permissions</code> structure to grant permissions by providing a list of Identity and Access Management (IAM) action information for each principal listed by Amazon Resource Name (ARN).</p>
15 /// <p>To specify no permissions, omit <code>Permissions</code>.</p>
16 pub permissions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>,
17 /// <p>A source entity to use for the analysis that you're creating. This metadata structure contains details that describe a source template and one or more datasets.</p>
18 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
19 pub source_entity: ::std::option::Option<crate::types::AnalysisSourceEntity>,
20 /// <p>The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon Quick Sight console, make sure that you have access to it.</p>
21 pub theme_arn: ::std::option::Option<::std::string::String>,
22 /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the analysis.</p>
23 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
24 /// <p>The definition of an analysis.</p>
25 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
26 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
27 pub definition: ::std::option::Option<crate::types::AnalysisDefinition>,
28 /// <p>The option to relax the validation needed to create an analysis with definition objects. This skips the validation step for specific errors.</p>
29 pub validation_strategy: ::std::option::Option<crate::types::ValidationStrategy>,
30 /// <p>When you create the analysis, Amazon Quick Sight adds the analysis to these folders.</p>
31 pub folder_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
32}
33impl CreateAnalysisInput {
34 /// <p>The ID of the Amazon Web Services account where you are creating an analysis.</p>
35 pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
36 self.aws_account_id.as_deref()
37 }
38 /// <p>The ID for the analysis that you're creating. This ID displays in the URL of the analysis.</p>
39 pub fn analysis_id(&self) -> ::std::option::Option<&str> {
40 self.analysis_id.as_deref()
41 }
42 /// <p>A descriptive name for the analysis that you're creating. This name displays for the analysis in the Amazon Quick Sight console.</p>
43 pub fn name(&self) -> ::std::option::Option<&str> {
44 self.name.as_deref()
45 }
46 /// <p>The parameter names and override values that you want to use. An analysis can have any parameter type, and some parameters might accept multiple values.</p>
47 pub fn parameters(&self) -> ::std::option::Option<&crate::types::Parameters> {
48 self.parameters.as_ref()
49 }
50 /// <p>A structure that describes the principals and the resource-level permissions on an analysis. You can use the <code>Permissions</code> structure to grant permissions by providing a list of Identity and Access Management (IAM) action information for each principal listed by Amazon Resource Name (ARN).</p>
51 /// <p>To specify no permissions, omit <code>Permissions</code>.</p>
52 ///
53 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.permissions.is_none()`.
54 pub fn permissions(&self) -> &[crate::types::ResourcePermission] {
55 self.permissions.as_deref().unwrap_or_default()
56 }
57 /// <p>A source entity to use for the analysis that you're creating. This metadata structure contains details that describe a source template and one or more datasets.</p>
58 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
59 pub fn source_entity(&self) -> ::std::option::Option<&crate::types::AnalysisSourceEntity> {
60 self.source_entity.as_ref()
61 }
62 /// <p>The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon Quick Sight console, make sure that you have access to it.</p>
63 pub fn theme_arn(&self) -> ::std::option::Option<&str> {
64 self.theme_arn.as_deref()
65 }
66 /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the analysis.</p>
67 ///
68 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
69 pub fn tags(&self) -> &[crate::types::Tag] {
70 self.tags.as_deref().unwrap_or_default()
71 }
72 /// <p>The definition of an analysis.</p>
73 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
74 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
75 pub fn definition(&self) -> ::std::option::Option<&crate::types::AnalysisDefinition> {
76 self.definition.as_ref()
77 }
78 /// <p>The option to relax the validation needed to create an analysis with definition objects. This skips the validation step for specific errors.</p>
79 pub fn validation_strategy(&self) -> ::std::option::Option<&crate::types::ValidationStrategy> {
80 self.validation_strategy.as_ref()
81 }
82 /// <p>When you create the analysis, Amazon Quick Sight adds the analysis to these folders.</p>
83 ///
84 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.folder_arns.is_none()`.
85 pub fn folder_arns(&self) -> &[::std::string::String] {
86 self.folder_arns.as_deref().unwrap_or_default()
87 }
88}
89impl CreateAnalysisInput {
90 /// Creates a new builder-style object to manufacture [`CreateAnalysisInput`](crate::operation::create_analysis::CreateAnalysisInput).
91 pub fn builder() -> crate::operation::create_analysis::builders::CreateAnalysisInputBuilder {
92 crate::operation::create_analysis::builders::CreateAnalysisInputBuilder::default()
93 }
94}
95
96/// A builder for [`CreateAnalysisInput`](crate::operation::create_analysis::CreateAnalysisInput).
97#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
98#[non_exhaustive]
99pub struct CreateAnalysisInputBuilder {
100 pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
101 pub(crate) analysis_id: ::std::option::Option<::std::string::String>,
102 pub(crate) name: ::std::option::Option<::std::string::String>,
103 pub(crate) parameters: ::std::option::Option<crate::types::Parameters>,
104 pub(crate) permissions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>,
105 pub(crate) source_entity: ::std::option::Option<crate::types::AnalysisSourceEntity>,
106 pub(crate) theme_arn: ::std::option::Option<::std::string::String>,
107 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
108 pub(crate) definition: ::std::option::Option<crate::types::AnalysisDefinition>,
109 pub(crate) validation_strategy: ::std::option::Option<crate::types::ValidationStrategy>,
110 pub(crate) folder_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
111}
112impl CreateAnalysisInputBuilder {
113 /// <p>The ID of the Amazon Web Services account where you are creating an analysis.</p>
114 /// This field is required.
115 pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.aws_account_id = ::std::option::Option::Some(input.into());
117 self
118 }
119 /// <p>The ID of the Amazon Web Services account where you are creating an analysis.</p>
120 pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.aws_account_id = input;
122 self
123 }
124 /// <p>The ID of the Amazon Web Services account where you are creating an analysis.</p>
125 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
126 &self.aws_account_id
127 }
128 /// <p>The ID for the analysis that you're creating. This ID displays in the URL of the analysis.</p>
129 /// This field is required.
130 pub fn analysis_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.analysis_id = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The ID for the analysis that you're creating. This ID displays in the URL of the analysis.</p>
135 pub fn set_analysis_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.analysis_id = input;
137 self
138 }
139 /// <p>The ID for the analysis that you're creating. This ID displays in the URL of the analysis.</p>
140 pub fn get_analysis_id(&self) -> &::std::option::Option<::std::string::String> {
141 &self.analysis_id
142 }
143 /// <p>A descriptive name for the analysis that you're creating. This name displays for the analysis in the Amazon Quick Sight console.</p>
144 /// This field is required.
145 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.name = ::std::option::Option::Some(input.into());
147 self
148 }
149 /// <p>A descriptive name for the analysis that you're creating. This name displays for the analysis in the Amazon Quick Sight console.</p>
150 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.name = input;
152 self
153 }
154 /// <p>A descriptive name for the analysis that you're creating. This name displays for the analysis in the Amazon Quick Sight console.</p>
155 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
156 &self.name
157 }
158 /// <p>The parameter names and override values that you want to use. An analysis can have any parameter type, and some parameters might accept multiple values.</p>
159 pub fn parameters(mut self, input: crate::types::Parameters) -> Self {
160 self.parameters = ::std::option::Option::Some(input);
161 self
162 }
163 /// <p>The parameter names and override values that you want to use. An analysis can have any parameter type, and some parameters might accept multiple values.</p>
164 pub fn set_parameters(mut self, input: ::std::option::Option<crate::types::Parameters>) -> Self {
165 self.parameters = input;
166 self
167 }
168 /// <p>The parameter names and override values that you want to use. An analysis can have any parameter type, and some parameters might accept multiple values.</p>
169 pub fn get_parameters(&self) -> &::std::option::Option<crate::types::Parameters> {
170 &self.parameters
171 }
172 /// Appends an item to `permissions`.
173 ///
174 /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
175 ///
176 /// <p>A structure that describes the principals and the resource-level permissions on an analysis. You can use the <code>Permissions</code> structure to grant permissions by providing a list of Identity and Access Management (IAM) action information for each principal listed by Amazon Resource Name (ARN).</p>
177 /// <p>To specify no permissions, omit <code>Permissions</code>.</p>
178 pub fn permissions(mut self, input: crate::types::ResourcePermission) -> Self {
179 let mut v = self.permissions.unwrap_or_default();
180 v.push(input);
181 self.permissions = ::std::option::Option::Some(v);
182 self
183 }
184 /// <p>A structure that describes the principals and the resource-level permissions on an analysis. You can use the <code>Permissions</code> structure to grant permissions by providing a list of Identity and Access Management (IAM) action information for each principal listed by Amazon Resource Name (ARN).</p>
185 /// <p>To specify no permissions, omit <code>Permissions</code>.</p>
186 pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>) -> Self {
187 self.permissions = input;
188 self
189 }
190 /// <p>A structure that describes the principals and the resource-level permissions on an analysis. You can use the <code>Permissions</code> structure to grant permissions by providing a list of Identity and Access Management (IAM) action information for each principal listed by Amazon Resource Name (ARN).</p>
191 /// <p>To specify no permissions, omit <code>Permissions</code>.</p>
192 pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>> {
193 &self.permissions
194 }
195 /// <p>A source entity to use for the analysis that you're creating. This metadata structure contains details that describe a source template and one or more datasets.</p>
196 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
197 pub fn source_entity(mut self, input: crate::types::AnalysisSourceEntity) -> Self {
198 self.source_entity = ::std::option::Option::Some(input);
199 self
200 }
201 /// <p>A source entity to use for the analysis that you're creating. This metadata structure contains details that describe a source template and one or more datasets.</p>
202 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
203 pub fn set_source_entity(mut self, input: ::std::option::Option<crate::types::AnalysisSourceEntity>) -> Self {
204 self.source_entity = input;
205 self
206 }
207 /// <p>A source entity to use for the analysis that you're creating. This metadata structure contains details that describe a source template and one or more datasets.</p>
208 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
209 pub fn get_source_entity(&self) -> &::std::option::Option<crate::types::AnalysisSourceEntity> {
210 &self.source_entity
211 }
212 /// <p>The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon Quick Sight console, make sure that you have access to it.</p>
213 pub fn theme_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214 self.theme_arn = ::std::option::Option::Some(input.into());
215 self
216 }
217 /// <p>The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon Quick Sight console, make sure that you have access to it.</p>
218 pub fn set_theme_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.theme_arn = input;
220 self
221 }
222 /// <p>The ARN for the theme to apply to the analysis that you're creating. To see the theme in the Amazon Quick Sight console, make sure that you have access to it.</p>
223 pub fn get_theme_arn(&self) -> &::std::option::Option<::std::string::String> {
224 &self.theme_arn
225 }
226 /// Appends an item to `tags`.
227 ///
228 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
229 ///
230 /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the analysis.</p>
231 pub fn tags(mut self, input: crate::types::Tag) -> Self {
232 let mut v = self.tags.unwrap_or_default();
233 v.push(input);
234 self.tags = ::std::option::Option::Some(v);
235 self
236 }
237 /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the analysis.</p>
238 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
239 self.tags = input;
240 self
241 }
242 /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the analysis.</p>
243 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
244 &self.tags
245 }
246 /// <p>The definition of an analysis.</p>
247 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
248 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
249 pub fn definition(mut self, input: crate::types::AnalysisDefinition) -> Self {
250 self.definition = ::std::option::Option::Some(input);
251 self
252 }
253 /// <p>The definition of an analysis.</p>
254 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
255 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
256 pub fn set_definition(mut self, input: ::std::option::Option<crate::types::AnalysisDefinition>) -> Self {
257 self.definition = input;
258 self
259 }
260 /// <p>The definition of an analysis.</p>
261 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
262 /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
263 pub fn get_definition(&self) -> &::std::option::Option<crate::types::AnalysisDefinition> {
264 &self.definition
265 }
266 /// <p>The option to relax the validation needed to create an analysis with definition objects. This skips the validation step for specific errors.</p>
267 pub fn validation_strategy(mut self, input: crate::types::ValidationStrategy) -> Self {
268 self.validation_strategy = ::std::option::Option::Some(input);
269 self
270 }
271 /// <p>The option to relax the validation needed to create an analysis with definition objects. This skips the validation step for specific errors.</p>
272 pub fn set_validation_strategy(mut self, input: ::std::option::Option<crate::types::ValidationStrategy>) -> Self {
273 self.validation_strategy = input;
274 self
275 }
276 /// <p>The option to relax the validation needed to create an analysis with definition objects. This skips the validation step for specific errors.</p>
277 pub fn get_validation_strategy(&self) -> &::std::option::Option<crate::types::ValidationStrategy> {
278 &self.validation_strategy
279 }
280 /// Appends an item to `folder_arns`.
281 ///
282 /// To override the contents of this collection use [`set_folder_arns`](Self::set_folder_arns).
283 ///
284 /// <p>When you create the analysis, Amazon Quick Sight adds the analysis to these folders.</p>
285 pub fn folder_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
286 let mut v = self.folder_arns.unwrap_or_default();
287 v.push(input.into());
288 self.folder_arns = ::std::option::Option::Some(v);
289 self
290 }
291 /// <p>When you create the analysis, Amazon Quick Sight adds the analysis to these folders.</p>
292 pub fn set_folder_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
293 self.folder_arns = input;
294 self
295 }
296 /// <p>When you create the analysis, Amazon Quick Sight adds the analysis to these folders.</p>
297 pub fn get_folder_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
298 &self.folder_arns
299 }
300 /// Consumes the builder and constructs a [`CreateAnalysisInput`](crate::operation::create_analysis::CreateAnalysisInput).
301 pub fn build(
302 self,
303 ) -> ::std::result::Result<crate::operation::create_analysis::CreateAnalysisInput, ::aws_smithy_types::error::operation::BuildError> {
304 ::std::result::Result::Ok(crate::operation::create_analysis::CreateAnalysisInput {
305 aws_account_id: self.aws_account_id,
306 analysis_id: self.analysis_id,
307 name: self.name,
308 parameters: self.parameters,
309 permissions: self.permissions,
310 source_entity: self.source_entity,
311 theme_arn: self.theme_arn,
312 tags: self.tags,
313 definition: self.definition,
314 validation_strategy: self.validation_strategy,
315 folder_arns: self.folder_arns,
316 })
317 }
318}