aws_sdk_computeoptimizer/operation/put_recommendation_preferences/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::put_recommendation_preferences::_put_recommendation_preferences_output::PutRecommendationPreferencesOutputBuilder;
3
4pub use crate::operation::put_recommendation_preferences::_put_recommendation_preferences_input::PutRecommendationPreferencesInputBuilder;
5
6impl crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesInputBuilder {
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::put_recommendation_preferences::PutRecommendationPreferencesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.put_recommendation_preferences();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `PutRecommendationPreferences`.
24///
25/// <p>Creates a new recommendation preference or updates an existing recommendation preference, such as enhanced infrastructure metrics.</p>
26/// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct PutRecommendationPreferencesFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesOutput,
36 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesError,
37 > for PutRecommendationPreferencesFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesOutput,
45 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl PutRecommendationPreferencesFluentBuilder {
52 /// Creates a new `PutRecommendationPreferencesFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the PutRecommendationPreferences as a reference.
61 pub fn as_input(&self) -> &crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::put_recommendation_preferences::PutRecommendationPreferences::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::put_recommendation_preferences::PutRecommendationPreferences::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesOutput,
98 crate::operation::put_recommendation_preferences::PutRecommendationPreferencesError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>The target resource type of the recommendation preference to create.</p>
113 /// <p>The <code>Ec2Instance</code> option encompasses standalone instances and instances that are part of Auto Scaling groups. The <code>AutoScalingGroup</code> option encompasses only instances that are part of an Auto Scaling group.</p>
114 pub fn resource_type(mut self, input: crate::types::ResourceType) -> Self {
115 self.inner = self.inner.resource_type(input);
116 self
117 }
118 /// <p>The target resource type of the recommendation preference to create.</p>
119 /// <p>The <code>Ec2Instance</code> option encompasses standalone instances and instances that are part of Auto Scaling groups. The <code>AutoScalingGroup</code> option encompasses only instances that are part of an Auto Scaling group.</p>
120 pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
121 self.inner = self.inner.set_resource_type(input);
122 self
123 }
124 /// <p>The target resource type of the recommendation preference to create.</p>
125 /// <p>The <code>Ec2Instance</code> option encompasses standalone instances and instances that are part of Auto Scaling groups. The <code>AutoScalingGroup</code> option encompasses only instances that are part of an Auto Scaling group.</p>
126 pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
127 self.inner.get_resource_type()
128 }
129 /// <p>An object that describes the scope of the recommendation preference to create.</p>
130 /// <p>You can create recommendation preferences at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p><note>
131 /// <p>You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope name of <code>ResourceArn</code> and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This will configure the preference for all instances that are part of the specified Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling group. You can create recommendation preferences at the resource level only for standalone instances.</p>
132 /// </note>
133 pub fn scope(mut self, input: crate::types::Scope) -> Self {
134 self.inner = self.inner.scope(input);
135 self
136 }
137 /// <p>An object that describes the scope of the recommendation preference to create.</p>
138 /// <p>You can create recommendation preferences at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p><note>
139 /// <p>You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope name of <code>ResourceArn</code> and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This will configure the preference for all instances that are part of the specified Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling group. You can create recommendation preferences at the resource level only for standalone instances.</p>
140 /// </note>
141 pub fn set_scope(mut self, input: ::std::option::Option<crate::types::Scope>) -> Self {
142 self.inner = self.inner.set_scope(input);
143 self
144 }
145 /// <p>An object that describes the scope of the recommendation preference to create.</p>
146 /// <p>You can create recommendation preferences at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p><note>
147 /// <p>You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope name of <code>ResourceArn</code> and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This will configure the preference for all instances that are part of the specified Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling group. You can create recommendation preferences at the resource level only for standalone instances.</p>
148 /// </note>
149 pub fn get_scope(&self) -> &::std::option::Option<crate::types::Scope> {
150 self.inner.get_scope()
151 }
152 /// <p>The status of the enhanced infrastructure metrics recommendation preference to create or update.</p>
153 /// <p>Specify the <code>Active</code> status to activate the preference, or specify <code>Inactive</code> to deactivate the preference.</p>
154 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
155 pub fn enhanced_infrastructure_metrics(mut self, input: crate::types::EnhancedInfrastructureMetrics) -> Self {
156 self.inner = self.inner.enhanced_infrastructure_metrics(input);
157 self
158 }
159 /// <p>The status of the enhanced infrastructure metrics recommendation preference to create or update.</p>
160 /// <p>Specify the <code>Active</code> status to activate the preference, or specify <code>Inactive</code> to deactivate the preference.</p>
161 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
162 pub fn set_enhanced_infrastructure_metrics(mut self, input: ::std::option::Option<crate::types::EnhancedInfrastructureMetrics>) -> Self {
163 self.inner = self.inner.set_enhanced_infrastructure_metrics(input);
164 self
165 }
166 /// <p>The status of the enhanced infrastructure metrics recommendation preference to create or update.</p>
167 /// <p>Specify the <code>Active</code> status to activate the preference, or specify <code>Inactive</code> to deactivate the preference.</p>
168 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
169 pub fn get_enhanced_infrastructure_metrics(&self) -> &::std::option::Option<crate::types::EnhancedInfrastructureMetrics> {
170 self.inner.get_enhanced_infrastructure_metrics()
171 }
172 /// <p>The status of the inferred workload types recommendation preference to create or update.</p><note>
173 /// <p>The inferred workload type feature is active by default. To deactivate it, create a recommendation preference.</p>
174 /// </note>
175 /// <p>Specify the <code>Inactive</code> status to deactivate the feature, or specify <code>Active</code> to activate it.</p>
176 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/inferred-workload-types.html">Inferred workload types</a> in the <i>Compute Optimizer User Guide</i>.</p>
177 pub fn inferred_workload_types(mut self, input: crate::types::InferredWorkloadTypesPreference) -> Self {
178 self.inner = self.inner.inferred_workload_types(input);
179 self
180 }
181 /// <p>The status of the inferred workload types recommendation preference to create or update.</p><note>
182 /// <p>The inferred workload type feature is active by default. To deactivate it, create a recommendation preference.</p>
183 /// </note>
184 /// <p>Specify the <code>Inactive</code> status to deactivate the feature, or specify <code>Active</code> to activate it.</p>
185 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/inferred-workload-types.html">Inferred workload types</a> in the <i>Compute Optimizer User Guide</i>.</p>
186 pub fn set_inferred_workload_types(mut self, input: ::std::option::Option<crate::types::InferredWorkloadTypesPreference>) -> Self {
187 self.inner = self.inner.set_inferred_workload_types(input);
188 self
189 }
190 /// <p>The status of the inferred workload types recommendation preference to create or update.</p><note>
191 /// <p>The inferred workload type feature is active by default. To deactivate it, create a recommendation preference.</p>
192 /// </note>
193 /// <p>Specify the <code>Inactive</code> status to deactivate the feature, or specify <code>Active</code> to activate it.</p>
194 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/inferred-workload-types.html">Inferred workload types</a> in the <i>Compute Optimizer User Guide</i>.</p>
195 pub fn get_inferred_workload_types(&self) -> &::std::option::Option<crate::types::InferredWorkloadTypesPreference> {
196 self.inner.get_inferred_workload_types()
197 }
198 /// <p>The provider of the external metrics recommendation preference to create or update.</p>
199 /// <p>Specify a valid provider in the <code>source</code> field to activate the preference. To delete this preference, see the <code>DeleteRecommendationPreferences</code> action.</p>
200 /// <p>This preference can only be set for the <code>Ec2Instance</code> resource type.</p>
201 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html">External metrics ingestion</a> in the <i>Compute Optimizer User Guide</i>.</p>
202 pub fn external_metrics_preference(mut self, input: crate::types::ExternalMetricsPreference) -> Self {
203 self.inner = self.inner.external_metrics_preference(input);
204 self
205 }
206 /// <p>The provider of the external metrics recommendation preference to create or update.</p>
207 /// <p>Specify a valid provider in the <code>source</code> field to activate the preference. To delete this preference, see the <code>DeleteRecommendationPreferences</code> action.</p>
208 /// <p>This preference can only be set for the <code>Ec2Instance</code> resource type.</p>
209 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html">External metrics ingestion</a> in the <i>Compute Optimizer User Guide</i>.</p>
210 pub fn set_external_metrics_preference(mut self, input: ::std::option::Option<crate::types::ExternalMetricsPreference>) -> Self {
211 self.inner = self.inner.set_external_metrics_preference(input);
212 self
213 }
214 /// <p>The provider of the external metrics recommendation preference to create or update.</p>
215 /// <p>Specify a valid provider in the <code>source</code> field to activate the preference. To delete this preference, see the <code>DeleteRecommendationPreferences</code> action.</p>
216 /// <p>This preference can only be set for the <code>Ec2Instance</code> resource type.</p>
217 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html">External metrics ingestion</a> in the <i>Compute Optimizer User Guide</i>.</p>
218 pub fn get_external_metrics_preference(&self) -> &::std::option::Option<crate::types::ExternalMetricsPreference> {
219 self.inner.get_external_metrics_preference()
220 }
221 /// <p>The preference to control the number of days the utilization metrics of the Amazon Web Services resource are analyzed. When this preference isn't specified, we use the default value <code>DAYS_14</code>.</p>
222 /// <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p><note>
223 /// <ul>
224 /// <li>
225 /// <p>Amazon EC2 instance lookback preferences can be set at the organization, account, and resource levels.</p></li>
226 /// <li>
227 /// <p>Auto Scaling group lookback preferences can only be set at the resource level.</p></li>
228 /// </ul>
229 /// </note>
230 pub fn look_back_period(mut self, input: crate::types::LookBackPeriodPreference) -> Self {
231 self.inner = self.inner.look_back_period(input);
232 self
233 }
234 /// <p>The preference to control the number of days the utilization metrics of the Amazon Web Services resource are analyzed. When this preference isn't specified, we use the default value <code>DAYS_14</code>.</p>
235 /// <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p><note>
236 /// <ul>
237 /// <li>
238 /// <p>Amazon EC2 instance lookback preferences can be set at the organization, account, and resource levels.</p></li>
239 /// <li>
240 /// <p>Auto Scaling group lookback preferences can only be set at the resource level.</p></li>
241 /// </ul>
242 /// </note>
243 pub fn set_look_back_period(mut self, input: ::std::option::Option<crate::types::LookBackPeriodPreference>) -> Self {
244 self.inner = self.inner.set_look_back_period(input);
245 self
246 }
247 /// <p>The preference to control the number of days the utilization metrics of the Amazon Web Services resource are analyzed. When this preference isn't specified, we use the default value <code>DAYS_14</code>.</p>
248 /// <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p><note>
249 /// <ul>
250 /// <li>
251 /// <p>Amazon EC2 instance lookback preferences can be set at the organization, account, and resource levels.</p></li>
252 /// <li>
253 /// <p>Auto Scaling group lookback preferences can only be set at the resource level.</p></li>
254 /// </ul>
255 /// </note>
256 pub fn get_look_back_period(&self) -> &::std::option::Option<crate::types::LookBackPeriodPreference> {
257 self.inner.get_look_back_period()
258 }
259 ///
260 /// Appends an item to `utilizationPreferences`.
261 ///
262 /// To override the contents of this collection use [`set_utilization_preferences`](Self::set_utilization_preferences).
263 ///
264 /// <p>The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. When this preference isn't specified, we use the following default values.</p>
265 /// <p>CPU utilization:</p>
266 /// <ul>
267 /// <li>
268 /// <p><code>P99_5</code> for threshold</p></li>
269 /// <li>
270 /// <p><code>PERCENT_20</code> for headroom</p></li>
271 /// </ul>
272 /// <p>Memory utilization:</p>
273 /// <ul>
274 /// <li>
275 /// <p><code>PERCENT_20</code> for headroom</p></li>
276 /// </ul><note>
277 /// <ul>
278 /// <li>
279 /// <p>You can only set CPU and memory utilization preferences for the Amazon EC2 instance resource type.</p></li>
280 /// <li>
281 /// <p>The threshold setting isn’t available for memory utilization.</p></li>
282 /// </ul>
283 /// </note>
284 pub fn utilization_preferences(mut self, input: crate::types::UtilizationPreference) -> Self {
285 self.inner = self.inner.utilization_preferences(input);
286 self
287 }
288 /// <p>The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. When this preference isn't specified, we use the following default values.</p>
289 /// <p>CPU utilization:</p>
290 /// <ul>
291 /// <li>
292 /// <p><code>P99_5</code> for threshold</p></li>
293 /// <li>
294 /// <p><code>PERCENT_20</code> for headroom</p></li>
295 /// </ul>
296 /// <p>Memory utilization:</p>
297 /// <ul>
298 /// <li>
299 /// <p><code>PERCENT_20</code> for headroom</p></li>
300 /// </ul><note>
301 /// <ul>
302 /// <li>
303 /// <p>You can only set CPU and memory utilization preferences for the Amazon EC2 instance resource type.</p></li>
304 /// <li>
305 /// <p>The threshold setting isn’t available for memory utilization.</p></li>
306 /// </ul>
307 /// </note>
308 pub fn set_utilization_preferences(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UtilizationPreference>>) -> Self {
309 self.inner = self.inner.set_utilization_preferences(input);
310 self
311 }
312 /// <p>The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. When this preference isn't specified, we use the following default values.</p>
313 /// <p>CPU utilization:</p>
314 /// <ul>
315 /// <li>
316 /// <p><code>P99_5</code> for threshold</p></li>
317 /// <li>
318 /// <p><code>PERCENT_20</code> for headroom</p></li>
319 /// </ul>
320 /// <p>Memory utilization:</p>
321 /// <ul>
322 /// <li>
323 /// <p><code>PERCENT_20</code> for headroom</p></li>
324 /// </ul><note>
325 /// <ul>
326 /// <li>
327 /// <p>You can only set CPU and memory utilization preferences for the Amazon EC2 instance resource type.</p></li>
328 /// <li>
329 /// <p>The threshold setting isn’t available for memory utilization.</p></li>
330 /// </ul>
331 /// </note>
332 pub fn get_utilization_preferences(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UtilizationPreference>> {
333 self.inner.get_utilization_preferences()
334 }
335 ///
336 /// Appends an item to `preferredResources`.
337 ///
338 /// To override the contents of this collection use [`set_preferred_resources`](Self::set_preferred_resources).
339 ///
340 /// <p>The preference to control which resource type values are considered when generating rightsizing recommendations. You can specify this preference as a combination of include and exclude lists. You must specify either an <code>includeList</code> or <code>excludeList</code>. If the preference is an empty set of resource type values, an error occurs.</p><note>
341 /// <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p>
342 /// </note>
343 pub fn preferred_resources(mut self, input: crate::types::PreferredResource) -> Self {
344 self.inner = self.inner.preferred_resources(input);
345 self
346 }
347 /// <p>The preference to control which resource type values are considered when generating rightsizing recommendations. You can specify this preference as a combination of include and exclude lists. You must specify either an <code>includeList</code> or <code>excludeList</code>. If the preference is an empty set of resource type values, an error occurs.</p><note>
348 /// <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p>
349 /// </note>
350 pub fn set_preferred_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PreferredResource>>) -> Self {
351 self.inner = self.inner.set_preferred_resources(input);
352 self
353 }
354 /// <p>The preference to control which resource type values are considered when generating rightsizing recommendations. You can specify this preference as a combination of include and exclude lists. You must specify either an <code>includeList</code> or <code>excludeList</code>. If the preference is an empty set of resource type values, an error occurs.</p><note>
355 /// <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p>
356 /// </note>
357 pub fn get_preferred_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PreferredResource>> {
358 self.inner.get_preferred_resources()
359 }
360 /// <p>The status of the savings estimation mode preference to create or update.</p>
361 /// <p>Specify the <code>AfterDiscounts</code> status to activate the preference, or specify <code>BeforeDiscounts</code> to deactivate the preference.</p>
362 /// <p>Only the account manager or delegated administrator of your organization can activate this preference.</p>
363 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/savings-estimation-mode.html"> Savings estimation mode</a> in the <i>Compute Optimizer User Guide</i>.</p>
364 pub fn savings_estimation_mode(mut self, input: crate::types::SavingsEstimationMode) -> Self {
365 self.inner = self.inner.savings_estimation_mode(input);
366 self
367 }
368 /// <p>The status of the savings estimation mode preference to create or update.</p>
369 /// <p>Specify the <code>AfterDiscounts</code> status to activate the preference, or specify <code>BeforeDiscounts</code> to deactivate the preference.</p>
370 /// <p>Only the account manager or delegated administrator of your organization can activate this preference.</p>
371 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/savings-estimation-mode.html"> Savings estimation mode</a> in the <i>Compute Optimizer User Guide</i>.</p>
372 pub fn set_savings_estimation_mode(mut self, input: ::std::option::Option<crate::types::SavingsEstimationMode>) -> Self {
373 self.inner = self.inner.set_savings_estimation_mode(input);
374 self
375 }
376 /// <p>The status of the savings estimation mode preference to create or update.</p>
377 /// <p>Specify the <code>AfterDiscounts</code> status to activate the preference, or specify <code>BeforeDiscounts</code> to deactivate the preference.</p>
378 /// <p>Only the account manager or delegated administrator of your organization can activate this preference.</p>
379 /// <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/savings-estimation-mode.html"> Savings estimation mode</a> in the <i>Compute Optimizer User Guide</i>.</p>
380 pub fn get_savings_estimation_mode(&self) -> &::std::option::Option<crate::types::SavingsEstimationMode> {
381 self.inner.get_savings_estimation_mode()
382 }
383}