aws_sdk_quicksight/operation/update_dashboard/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_dashboard::_update_dashboard_output::UpdateDashboardOutputBuilder;
3
4pub use crate::operation::update_dashboard::_update_dashboard_input::UpdateDashboardInputBuilder;
5
6impl crate::operation::update_dashboard::builders::UpdateDashboardInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_dashboard::UpdateDashboardOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_dashboard::UpdateDashboardError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_dashboard();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateDashboard`.
24///
25/// <p>Updates a dashboard in an Amazon Web Services account.</p><note>
26/// <p>Updating a Dashboard creates a new dashboard version but does not immediately publish the new version. You can update the published version of a dashboard by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateDashboardPublishedVersion.html">UpdateDashboardPublishedVersion</a> </code> API operation.</p>
27/// </note>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct UpdateDashboardFluentBuilder {
30 handle: ::std::sync::Arc<crate::client::Handle>,
31 inner: crate::operation::update_dashboard::builders::UpdateDashboardInputBuilder,
32 config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35 crate::client::customize::internal::CustomizableSend<
36 crate::operation::update_dashboard::UpdateDashboardOutput,
37 crate::operation::update_dashboard::UpdateDashboardError,
38 > for UpdateDashboardFluentBuilder
39{
40 fn send(
41 self,
42 config_override: crate::config::Builder,
43 ) -> crate::client::customize::internal::BoxFuture<
44 crate::client::customize::internal::SendResult<
45 crate::operation::update_dashboard::UpdateDashboardOutput,
46 crate::operation::update_dashboard::UpdateDashboardError,
47 >,
48 > {
49 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50 }
51}
52impl UpdateDashboardFluentBuilder {
53 /// Creates a new `UpdateDashboardFluentBuilder`.
54 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55 Self {
56 handle,
57 inner: ::std::default::Default::default(),
58 config_override: ::std::option::Option::None,
59 }
60 }
61 /// Access the UpdateDashboard as a reference.
62 pub fn as_input(&self) -> &crate::operation::update_dashboard::builders::UpdateDashboardInputBuilder {
63 &self.inner
64 }
65 /// Sends the request and returns the response.
66 ///
67 /// If an error occurs, an `SdkError` will be returned with additional details that
68 /// can be matched against.
69 ///
70 /// By default, any retryable failures will be retried twice. Retry behavior
71 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72 /// set when configuring the client.
73 pub async fn send(
74 self,
75 ) -> ::std::result::Result<
76 crate::operation::update_dashboard::UpdateDashboardOutput,
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::update_dashboard::UpdateDashboardError,
79 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80 >,
81 > {
82 let input = self
83 .inner
84 .build()
85 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86 let runtime_plugins = crate::operation::update_dashboard::UpdateDashboard::operation_runtime_plugins(
87 self.handle.runtime_plugins.clone(),
88 &self.handle.conf,
89 self.config_override,
90 );
91 crate::operation::update_dashboard::UpdateDashboard::orchestrate(&runtime_plugins, input).await
92 }
93
94 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95 pub fn customize(
96 self,
97 ) -> crate::client::customize::CustomizableOperation<
98 crate::operation::update_dashboard::UpdateDashboardOutput,
99 crate::operation::update_dashboard::UpdateDashboardError,
100 Self,
101 > {
102 crate::client::customize::CustomizableOperation::new(self)
103 }
104 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105 self.set_config_override(::std::option::Option::Some(config_override.into()));
106 self
107 }
108
109 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110 self.config_override = config_override;
111 self
112 }
113 /// <p>The ID of the Amazon Web Services account that contains the dashboard that you're updating.</p>
114 pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.aws_account_id(input.into());
116 self
117 }
118 /// <p>The ID of the Amazon Web Services account that contains the dashboard that you're updating.</p>
119 pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_aws_account_id(input);
121 self
122 }
123 /// <p>The ID of the Amazon Web Services account that contains the dashboard that you're updating.</p>
124 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
125 self.inner.get_aws_account_id()
126 }
127 /// <p>The ID for the dashboard.</p>
128 pub fn dashboard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.dashboard_id(input.into());
130 self
131 }
132 /// <p>The ID for the dashboard.</p>
133 pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.inner = self.inner.set_dashboard_id(input);
135 self
136 }
137 /// <p>The ID for the dashboard.</p>
138 pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
139 self.inner.get_dashboard_id()
140 }
141 /// <p>The display name of the dashboard.</p>
142 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.inner = self.inner.name(input.into());
144 self
145 }
146 /// <p>The display name of the dashboard.</p>
147 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.inner = self.inner.set_name(input);
149 self
150 }
151 /// <p>The display name of the dashboard.</p>
152 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153 self.inner.get_name()
154 }
155 /// <p>The entity that you are using as a source when you update the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only update a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to update a dashboard from an analysis, first convert the analysis to a template by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation. For <code>SourceTemplate</code>, specify the Amazon Resource Name (ARN) of the source template. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region.</p>
156 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
157 pub fn source_entity(mut self, input: crate::types::DashboardSourceEntity) -> Self {
158 self.inner = self.inner.source_entity(input);
159 self
160 }
161 /// <p>The entity that you are using as a source when you update the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only update a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to update a dashboard from an analysis, first convert the analysis to a template by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation. For <code>SourceTemplate</code>, specify the Amazon Resource Name (ARN) of the source template. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region.</p>
162 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
163 pub fn set_source_entity(mut self, input: ::std::option::Option<crate::types::DashboardSourceEntity>) -> Self {
164 self.inner = self.inner.set_source_entity(input);
165 self
166 }
167 /// <p>The entity that you are using as a source when you update the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only update a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to update a dashboard from an analysis, first convert the analysis to a template by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation. For <code>SourceTemplate</code>, specify the Amazon Resource Name (ARN) of the source template. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region.</p>
168 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
169 pub fn get_source_entity(&self) -> &::std::option::Option<crate::types::DashboardSourceEntity> {
170 self.inner.get_source_entity()
171 }
172 /// <p>A structure that contains the parameters of the dashboard. These are parameter overrides for a dashboard. A dashboard can have any type of parameters, and some parameters might accept multiple values.</p>
173 pub fn parameters(mut self, input: crate::types::Parameters) -> Self {
174 self.inner = self.inner.parameters(input);
175 self
176 }
177 /// <p>A structure that contains the parameters of the dashboard. These are parameter overrides for a dashboard. A dashboard can have any type of parameters, and some parameters might accept multiple values.</p>
178 pub fn set_parameters(mut self, input: ::std::option::Option<crate::types::Parameters>) -> Self {
179 self.inner = self.inner.set_parameters(input);
180 self
181 }
182 /// <p>A structure that contains the parameters of the dashboard. These are parameter overrides for a dashboard. A dashboard can have any type of parameters, and some parameters might accept multiple values.</p>
183 pub fn get_parameters(&self) -> &::std::option::Option<crate::types::Parameters> {
184 self.inner.get_parameters()
185 }
186 /// <p>A description for the first version of the dashboard being created.</p>
187 pub fn version_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188 self.inner = self.inner.version_description(input.into());
189 self
190 }
191 /// <p>A description for the first version of the dashboard being created.</p>
192 pub fn set_version_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.inner = self.inner.set_version_description(input);
194 self
195 }
196 /// <p>A description for the first version of the dashboard being created.</p>
197 pub fn get_version_description(&self) -> &::std::option::Option<::std::string::String> {
198 self.inner.get_version_description()
199 }
200 /// <p>Options for publishing the dashboard when you create it:</p>
201 /// <ul>
202 /// <li>
203 /// <p><code>AvailabilityStatus</code> for <code>AdHocFilteringOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. When this is set to <code>DISABLED</code>, Amazon QuickSight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is <code>ENABLED</code> by default.</p></li>
204 /// <li>
205 /// <p><code>AvailabilityStatus</code> for <code>ExportToCSVOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The visual option to export data to .CSV format isn't enabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p></li>
206 /// <li>
207 /// <p><code>VisibilityState</code> for <code>SheetControlsOption</code> - This visibility state can be either <code>COLLAPSED</code> or <code>EXPANDED</code>. This option is <code>COLLAPSED</code> by default.</p></li>
208 /// </ul>
209 pub fn dashboard_publish_options(mut self, input: crate::types::DashboardPublishOptions) -> Self {
210 self.inner = self.inner.dashboard_publish_options(input);
211 self
212 }
213 /// <p>Options for publishing the dashboard when you create it:</p>
214 /// <ul>
215 /// <li>
216 /// <p><code>AvailabilityStatus</code> for <code>AdHocFilteringOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. When this is set to <code>DISABLED</code>, Amazon QuickSight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is <code>ENABLED</code> by default.</p></li>
217 /// <li>
218 /// <p><code>AvailabilityStatus</code> for <code>ExportToCSVOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The visual option to export data to .CSV format isn't enabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p></li>
219 /// <li>
220 /// <p><code>VisibilityState</code> for <code>SheetControlsOption</code> - This visibility state can be either <code>COLLAPSED</code> or <code>EXPANDED</code>. This option is <code>COLLAPSED</code> by default.</p></li>
221 /// </ul>
222 pub fn set_dashboard_publish_options(mut self, input: ::std::option::Option<crate::types::DashboardPublishOptions>) -> Self {
223 self.inner = self.inner.set_dashboard_publish_options(input);
224 self
225 }
226 /// <p>Options for publishing the dashboard when you create it:</p>
227 /// <ul>
228 /// <li>
229 /// <p><code>AvailabilityStatus</code> for <code>AdHocFilteringOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. When this is set to <code>DISABLED</code>, Amazon QuickSight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is <code>ENABLED</code> by default.</p></li>
230 /// <li>
231 /// <p><code>AvailabilityStatus</code> for <code>ExportToCSVOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The visual option to export data to .CSV format isn't enabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p></li>
232 /// <li>
233 /// <p><code>VisibilityState</code> for <code>SheetControlsOption</code> - This visibility state can be either <code>COLLAPSED</code> or <code>EXPANDED</code>. This option is <code>COLLAPSED</code> by default.</p></li>
234 /// </ul>
235 pub fn get_dashboard_publish_options(&self) -> &::std::option::Option<crate::types::DashboardPublishOptions> {
236 self.inner.get_dashboard_publish_options()
237 }
238 /// <p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that was originally associated with the entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.</p>
239 pub fn theme_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 self.inner = self.inner.theme_arn(input.into());
241 self
242 }
243 /// <p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that was originally associated with the entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.</p>
244 pub fn set_theme_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245 self.inner = self.inner.set_theme_arn(input);
246 self
247 }
248 /// <p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that was originally associated with the entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.</p>
249 pub fn get_theme_arn(&self) -> &::std::option::Option<::std::string::String> {
250 self.inner.get_theme_arn()
251 }
252 /// <p>The definition of a dashboard.</p>
253 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
254 pub fn definition(mut self, input: crate::types::DashboardVersionDefinition) -> Self {
255 self.inner = self.inner.definition(input);
256 self
257 }
258 /// <p>The definition of a dashboard.</p>
259 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
260 pub fn set_definition(mut self, input: ::std::option::Option<crate::types::DashboardVersionDefinition>) -> Self {
261 self.inner = self.inner.set_definition(input);
262 self
263 }
264 /// <p>The definition of a dashboard.</p>
265 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
266 pub fn get_definition(&self) -> &::std::option::Option<crate::types::DashboardVersionDefinition> {
267 self.inner.get_definition()
268 }
269 /// <p>The option to relax the validation needed to update a dashboard with definition objects. This skips the validation step for specific errors.</p>
270 pub fn validation_strategy(mut self, input: crate::types::ValidationStrategy) -> Self {
271 self.inner = self.inner.validation_strategy(input);
272 self
273 }
274 /// <p>The option to relax the validation needed to update a dashboard with definition objects. This skips the validation step for specific errors.</p>
275 pub fn set_validation_strategy(mut self, input: ::std::option::Option<crate::types::ValidationStrategy>) -> Self {
276 self.inner = self.inner.set_validation_strategy(input);
277 self
278 }
279 /// <p>The option to relax the validation needed to update a dashboard with definition objects. This skips the validation step for specific errors.</p>
280 pub fn get_validation_strategy(&self) -> &::std::option::Option<crate::types::ValidationStrategy> {
281 self.inner.get_validation_strategy()
282 }
283}