aws_sdk_costoptimizationhub/operation/get_recommendation/
_get_recommendation_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 GetRecommendationOutput {
6    /// <p>The ID for the recommendation.</p>
7    pub recommendation_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier for the resource. This is the same as the Amazon Resource Name (ARN), if available.</p>
9    pub resource_id: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
11    pub resource_arn: ::std::option::Option<::std::string::String>,
12    /// <p>The account to which the recommendation applies.</p>
13    pub account_id: ::std::option::Option<::std::string::String>,
14    /// <p>The currency code used for the recommendation.</p>
15    pub currency_code: ::std::option::Option<::std::string::String>,
16    /// <p>The lookback period that's used to generate the recommendation.</p>
17    pub recommendation_lookback_period_in_days: ::std::option::Option<i32>,
18    /// <p>The lookback period used to calculate cost impact for a recommendation.</p>
19    pub cost_calculation_lookback_period_in_days: ::std::option::Option<i32>,
20    /// <p>The estimated savings percentage relative to the total cost over the cost calculation lookback period.</p>
21    pub estimated_savings_percentage: ::std::option::Option<f64>,
22    /// <p>The estimated savings amount over the lookback period used to calculate cost impact for a recommendation.</p>
23    pub estimated_savings_over_cost_calculation_lookback_period: ::std::option::Option<f64>,
24    /// <p>The type of resource.</p>
25    pub current_resource_type: ::std::option::Option<crate::types::ResourceType>,
26    /// <p>The resource type of the recommendation.</p>
27    pub recommended_resource_type: ::std::option::Option<crate::types::ResourceType>,
28    /// <p>The Amazon Web Services Region of the resource.</p>
29    pub region: ::std::option::Option<::std::string::String>,
30    /// <p>The source of the recommendation.</p>
31    pub source: ::std::option::Option<crate::types::Source>,
32    /// <p>The time when the recommendation was last generated.</p>
33    pub last_refresh_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
34    /// <p>The estimated monthly savings amount for the recommendation.</p>
35    pub estimated_monthly_savings: ::std::option::Option<f64>,
36    /// <p>The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.</p>
37    pub estimated_monthly_cost: ::std::option::Option<f64>,
38    /// <p>The effort required to implement the recommendation.</p>
39    pub implementation_effort: ::std::option::Option<crate::types::ImplementationEffort>,
40    /// <p>Whether or not implementing the recommendation requires a restart.</p>
41    pub restart_needed: ::std::option::Option<bool>,
42    /// <p>The type of action you can take by adopting the recommendation.</p>
43    pub action_type: ::std::option::Option<crate::types::ActionType>,
44    /// <p>Whether or not implementing the recommendation can be rolled back.</p>
45    pub rollback_possible: ::std::option::Option<bool>,
46    /// <p>The details for the resource.</p>
47    pub current_resource_details: ::std::option::Option<crate::types::ResourceDetails>,
48    /// <p>The details about the recommended resource.</p>
49    pub recommended_resource_details: ::std::option::Option<crate::types::ResourceDetails>,
50    /// <p>A list of tags associated with the resource for which the recommendation exists.</p>
51    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
52    _request_id: Option<String>,
53}
54impl GetRecommendationOutput {
55    /// <p>The ID for the recommendation.</p>
56    pub fn recommendation_id(&self) -> ::std::option::Option<&str> {
57        self.recommendation_id.as_deref()
58    }
59    /// <p>The unique identifier for the resource. This is the same as the Amazon Resource Name (ARN), if available.</p>
60    pub fn resource_id(&self) -> ::std::option::Option<&str> {
61        self.resource_id.as_deref()
62    }
63    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
64    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
65        self.resource_arn.as_deref()
66    }
67    /// <p>The account to which the recommendation applies.</p>
68    pub fn account_id(&self) -> ::std::option::Option<&str> {
69        self.account_id.as_deref()
70    }
71    /// <p>The currency code used for the recommendation.</p>
72    pub fn currency_code(&self) -> ::std::option::Option<&str> {
73        self.currency_code.as_deref()
74    }
75    /// <p>The lookback period that's used to generate the recommendation.</p>
76    pub fn recommendation_lookback_period_in_days(&self) -> ::std::option::Option<i32> {
77        self.recommendation_lookback_period_in_days
78    }
79    /// <p>The lookback period used to calculate cost impact for a recommendation.</p>
80    pub fn cost_calculation_lookback_period_in_days(&self) -> ::std::option::Option<i32> {
81        self.cost_calculation_lookback_period_in_days
82    }
83    /// <p>The estimated savings percentage relative to the total cost over the cost calculation lookback period.</p>
84    pub fn estimated_savings_percentage(&self) -> ::std::option::Option<f64> {
85        self.estimated_savings_percentage
86    }
87    /// <p>The estimated savings amount over the lookback period used to calculate cost impact for a recommendation.</p>
88    pub fn estimated_savings_over_cost_calculation_lookback_period(&self) -> ::std::option::Option<f64> {
89        self.estimated_savings_over_cost_calculation_lookback_period
90    }
91    /// <p>The type of resource.</p>
92    pub fn current_resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
93        self.current_resource_type.as_ref()
94    }
95    /// <p>The resource type of the recommendation.</p>
96    pub fn recommended_resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
97        self.recommended_resource_type.as_ref()
98    }
99    /// <p>The Amazon Web Services Region of the resource.</p>
100    pub fn region(&self) -> ::std::option::Option<&str> {
101        self.region.as_deref()
102    }
103    /// <p>The source of the recommendation.</p>
104    pub fn source(&self) -> ::std::option::Option<&crate::types::Source> {
105        self.source.as_ref()
106    }
107    /// <p>The time when the recommendation was last generated.</p>
108    pub fn last_refresh_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
109        self.last_refresh_timestamp.as_ref()
110    }
111    /// <p>The estimated monthly savings amount for the recommendation.</p>
112    pub fn estimated_monthly_savings(&self) -> ::std::option::Option<f64> {
113        self.estimated_monthly_savings
114    }
115    /// <p>The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.</p>
116    pub fn estimated_monthly_cost(&self) -> ::std::option::Option<f64> {
117        self.estimated_monthly_cost
118    }
119    /// <p>The effort required to implement the recommendation.</p>
120    pub fn implementation_effort(&self) -> ::std::option::Option<&crate::types::ImplementationEffort> {
121        self.implementation_effort.as_ref()
122    }
123    /// <p>Whether or not implementing the recommendation requires a restart.</p>
124    pub fn restart_needed(&self) -> ::std::option::Option<bool> {
125        self.restart_needed
126    }
127    /// <p>The type of action you can take by adopting the recommendation.</p>
128    pub fn action_type(&self) -> ::std::option::Option<&crate::types::ActionType> {
129        self.action_type.as_ref()
130    }
131    /// <p>Whether or not implementing the recommendation can be rolled back.</p>
132    pub fn rollback_possible(&self) -> ::std::option::Option<bool> {
133        self.rollback_possible
134    }
135    /// <p>The details for the resource.</p>
136    pub fn current_resource_details(&self) -> ::std::option::Option<&crate::types::ResourceDetails> {
137        self.current_resource_details.as_ref()
138    }
139    /// <p>The details about the recommended resource.</p>
140    pub fn recommended_resource_details(&self) -> ::std::option::Option<&crate::types::ResourceDetails> {
141        self.recommended_resource_details.as_ref()
142    }
143    /// <p>A list of tags associated with the resource for which the recommendation exists.</p>
144    ///
145    /// 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()`.
146    pub fn tags(&self) -> &[crate::types::Tag] {
147        self.tags.as_deref().unwrap_or_default()
148    }
149}
150impl ::aws_types::request_id::RequestId for GetRecommendationOutput {
151    fn request_id(&self) -> Option<&str> {
152        self._request_id.as_deref()
153    }
154}
155impl GetRecommendationOutput {
156    /// Creates a new builder-style object to manufacture [`GetRecommendationOutput`](crate::operation::get_recommendation::GetRecommendationOutput).
157    pub fn builder() -> crate::operation::get_recommendation::builders::GetRecommendationOutputBuilder {
158        crate::operation::get_recommendation::builders::GetRecommendationOutputBuilder::default()
159    }
160}
161
162/// A builder for [`GetRecommendationOutput`](crate::operation::get_recommendation::GetRecommendationOutput).
163#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
164#[non_exhaustive]
165pub struct GetRecommendationOutputBuilder {
166    pub(crate) recommendation_id: ::std::option::Option<::std::string::String>,
167    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
168    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
169    pub(crate) account_id: ::std::option::Option<::std::string::String>,
170    pub(crate) currency_code: ::std::option::Option<::std::string::String>,
171    pub(crate) recommendation_lookback_period_in_days: ::std::option::Option<i32>,
172    pub(crate) cost_calculation_lookback_period_in_days: ::std::option::Option<i32>,
173    pub(crate) estimated_savings_percentage: ::std::option::Option<f64>,
174    pub(crate) estimated_savings_over_cost_calculation_lookback_period: ::std::option::Option<f64>,
175    pub(crate) current_resource_type: ::std::option::Option<crate::types::ResourceType>,
176    pub(crate) recommended_resource_type: ::std::option::Option<crate::types::ResourceType>,
177    pub(crate) region: ::std::option::Option<::std::string::String>,
178    pub(crate) source: ::std::option::Option<crate::types::Source>,
179    pub(crate) last_refresh_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
180    pub(crate) estimated_monthly_savings: ::std::option::Option<f64>,
181    pub(crate) estimated_monthly_cost: ::std::option::Option<f64>,
182    pub(crate) implementation_effort: ::std::option::Option<crate::types::ImplementationEffort>,
183    pub(crate) restart_needed: ::std::option::Option<bool>,
184    pub(crate) action_type: ::std::option::Option<crate::types::ActionType>,
185    pub(crate) rollback_possible: ::std::option::Option<bool>,
186    pub(crate) current_resource_details: ::std::option::Option<crate::types::ResourceDetails>,
187    pub(crate) recommended_resource_details: ::std::option::Option<crate::types::ResourceDetails>,
188    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
189    _request_id: Option<String>,
190}
191impl GetRecommendationOutputBuilder {
192    /// <p>The ID for the recommendation.</p>
193    pub fn recommendation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.recommendation_id = ::std::option::Option::Some(input.into());
195        self
196    }
197    /// <p>The ID for the recommendation.</p>
198    pub fn set_recommendation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.recommendation_id = input;
200        self
201    }
202    /// <p>The ID for the recommendation.</p>
203    pub fn get_recommendation_id(&self) -> &::std::option::Option<::std::string::String> {
204        &self.recommendation_id
205    }
206    /// <p>The unique identifier for the resource. This is the same as the Amazon Resource Name (ARN), if available.</p>
207    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        self.resource_id = ::std::option::Option::Some(input.into());
209        self
210    }
211    /// <p>The unique identifier for the resource. This is the same as the Amazon Resource Name (ARN), if available.</p>
212    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213        self.resource_id = input;
214        self
215    }
216    /// <p>The unique identifier for the resource. This is the same as the Amazon Resource Name (ARN), if available.</p>
217    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
218        &self.resource_id
219    }
220    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
221    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.resource_arn = ::std::option::Option::Some(input.into());
223        self
224    }
225    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
226    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.resource_arn = input;
228        self
229    }
230    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
231    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
232        &self.resource_arn
233    }
234    /// <p>The account to which the recommendation applies.</p>
235    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
236        self.account_id = ::std::option::Option::Some(input.into());
237        self
238    }
239    /// <p>The account to which the recommendation applies.</p>
240    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
241        self.account_id = input;
242        self
243    }
244    /// <p>The account to which the recommendation applies.</p>
245    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
246        &self.account_id
247    }
248    /// <p>The currency code used for the recommendation.</p>
249    pub fn currency_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250        self.currency_code = ::std::option::Option::Some(input.into());
251        self
252    }
253    /// <p>The currency code used for the recommendation.</p>
254    pub fn set_currency_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255        self.currency_code = input;
256        self
257    }
258    /// <p>The currency code used for the recommendation.</p>
259    pub fn get_currency_code(&self) -> &::std::option::Option<::std::string::String> {
260        &self.currency_code
261    }
262    /// <p>The lookback period that's used to generate the recommendation.</p>
263    pub fn recommendation_lookback_period_in_days(mut self, input: i32) -> Self {
264        self.recommendation_lookback_period_in_days = ::std::option::Option::Some(input);
265        self
266    }
267    /// <p>The lookback period that's used to generate the recommendation.</p>
268    pub fn set_recommendation_lookback_period_in_days(mut self, input: ::std::option::Option<i32>) -> Self {
269        self.recommendation_lookback_period_in_days = input;
270        self
271    }
272    /// <p>The lookback period that's used to generate the recommendation.</p>
273    pub fn get_recommendation_lookback_period_in_days(&self) -> &::std::option::Option<i32> {
274        &self.recommendation_lookback_period_in_days
275    }
276    /// <p>The lookback period used to calculate cost impact for a recommendation.</p>
277    pub fn cost_calculation_lookback_period_in_days(mut self, input: i32) -> Self {
278        self.cost_calculation_lookback_period_in_days = ::std::option::Option::Some(input);
279        self
280    }
281    /// <p>The lookback period used to calculate cost impact for a recommendation.</p>
282    pub fn set_cost_calculation_lookback_period_in_days(mut self, input: ::std::option::Option<i32>) -> Self {
283        self.cost_calculation_lookback_period_in_days = input;
284        self
285    }
286    /// <p>The lookback period used to calculate cost impact for a recommendation.</p>
287    pub fn get_cost_calculation_lookback_period_in_days(&self) -> &::std::option::Option<i32> {
288        &self.cost_calculation_lookback_period_in_days
289    }
290    /// <p>The estimated savings percentage relative to the total cost over the cost calculation lookback period.</p>
291    pub fn estimated_savings_percentage(mut self, input: f64) -> Self {
292        self.estimated_savings_percentage = ::std::option::Option::Some(input);
293        self
294    }
295    /// <p>The estimated savings percentage relative to the total cost over the cost calculation lookback period.</p>
296    pub fn set_estimated_savings_percentage(mut self, input: ::std::option::Option<f64>) -> Self {
297        self.estimated_savings_percentage = input;
298        self
299    }
300    /// <p>The estimated savings percentage relative to the total cost over the cost calculation lookback period.</p>
301    pub fn get_estimated_savings_percentage(&self) -> &::std::option::Option<f64> {
302        &self.estimated_savings_percentage
303    }
304    /// <p>The estimated savings amount over the lookback period used to calculate cost impact for a recommendation.</p>
305    pub fn estimated_savings_over_cost_calculation_lookback_period(mut self, input: f64) -> Self {
306        self.estimated_savings_over_cost_calculation_lookback_period = ::std::option::Option::Some(input);
307        self
308    }
309    /// <p>The estimated savings amount over the lookback period used to calculate cost impact for a recommendation.</p>
310    pub fn set_estimated_savings_over_cost_calculation_lookback_period(mut self, input: ::std::option::Option<f64>) -> Self {
311        self.estimated_savings_over_cost_calculation_lookback_period = input;
312        self
313    }
314    /// <p>The estimated savings amount over the lookback period used to calculate cost impact for a recommendation.</p>
315    pub fn get_estimated_savings_over_cost_calculation_lookback_period(&self) -> &::std::option::Option<f64> {
316        &self.estimated_savings_over_cost_calculation_lookback_period
317    }
318    /// <p>The type of resource.</p>
319    pub fn current_resource_type(mut self, input: crate::types::ResourceType) -> Self {
320        self.current_resource_type = ::std::option::Option::Some(input);
321        self
322    }
323    /// <p>The type of resource.</p>
324    pub fn set_current_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
325        self.current_resource_type = input;
326        self
327    }
328    /// <p>The type of resource.</p>
329    pub fn get_current_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
330        &self.current_resource_type
331    }
332    /// <p>The resource type of the recommendation.</p>
333    pub fn recommended_resource_type(mut self, input: crate::types::ResourceType) -> Self {
334        self.recommended_resource_type = ::std::option::Option::Some(input);
335        self
336    }
337    /// <p>The resource type of the recommendation.</p>
338    pub fn set_recommended_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
339        self.recommended_resource_type = input;
340        self
341    }
342    /// <p>The resource type of the recommendation.</p>
343    pub fn get_recommended_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
344        &self.recommended_resource_type
345    }
346    /// <p>The Amazon Web Services Region of the resource.</p>
347    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
348        self.region = ::std::option::Option::Some(input.into());
349        self
350    }
351    /// <p>The Amazon Web Services Region of the resource.</p>
352    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
353        self.region = input;
354        self
355    }
356    /// <p>The Amazon Web Services Region of the resource.</p>
357    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
358        &self.region
359    }
360    /// <p>The source of the recommendation.</p>
361    pub fn source(mut self, input: crate::types::Source) -> Self {
362        self.source = ::std::option::Option::Some(input);
363        self
364    }
365    /// <p>The source of the recommendation.</p>
366    pub fn set_source(mut self, input: ::std::option::Option<crate::types::Source>) -> Self {
367        self.source = input;
368        self
369    }
370    /// <p>The source of the recommendation.</p>
371    pub fn get_source(&self) -> &::std::option::Option<crate::types::Source> {
372        &self.source
373    }
374    /// <p>The time when the recommendation was last generated.</p>
375    pub fn last_refresh_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
376        self.last_refresh_timestamp = ::std::option::Option::Some(input);
377        self
378    }
379    /// <p>The time when the recommendation was last generated.</p>
380    pub fn set_last_refresh_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
381        self.last_refresh_timestamp = input;
382        self
383    }
384    /// <p>The time when the recommendation was last generated.</p>
385    pub fn get_last_refresh_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
386        &self.last_refresh_timestamp
387    }
388    /// <p>The estimated monthly savings amount for the recommendation.</p>
389    pub fn estimated_monthly_savings(mut self, input: f64) -> Self {
390        self.estimated_monthly_savings = ::std::option::Option::Some(input);
391        self
392    }
393    /// <p>The estimated monthly savings amount for the recommendation.</p>
394    pub fn set_estimated_monthly_savings(mut self, input: ::std::option::Option<f64>) -> Self {
395        self.estimated_monthly_savings = input;
396        self
397    }
398    /// <p>The estimated monthly savings amount for the recommendation.</p>
399    pub fn get_estimated_monthly_savings(&self) -> &::std::option::Option<f64> {
400        &self.estimated_monthly_savings
401    }
402    /// <p>The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.</p>
403    pub fn estimated_monthly_cost(mut self, input: f64) -> Self {
404        self.estimated_monthly_cost = ::std::option::Option::Some(input);
405        self
406    }
407    /// <p>The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.</p>
408    pub fn set_estimated_monthly_cost(mut self, input: ::std::option::Option<f64>) -> Self {
409        self.estimated_monthly_cost = input;
410        self
411    }
412    /// <p>The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.</p>
413    pub fn get_estimated_monthly_cost(&self) -> &::std::option::Option<f64> {
414        &self.estimated_monthly_cost
415    }
416    /// <p>The effort required to implement the recommendation.</p>
417    pub fn implementation_effort(mut self, input: crate::types::ImplementationEffort) -> Self {
418        self.implementation_effort = ::std::option::Option::Some(input);
419        self
420    }
421    /// <p>The effort required to implement the recommendation.</p>
422    pub fn set_implementation_effort(mut self, input: ::std::option::Option<crate::types::ImplementationEffort>) -> Self {
423        self.implementation_effort = input;
424        self
425    }
426    /// <p>The effort required to implement the recommendation.</p>
427    pub fn get_implementation_effort(&self) -> &::std::option::Option<crate::types::ImplementationEffort> {
428        &self.implementation_effort
429    }
430    /// <p>Whether or not implementing the recommendation requires a restart.</p>
431    pub fn restart_needed(mut self, input: bool) -> Self {
432        self.restart_needed = ::std::option::Option::Some(input);
433        self
434    }
435    /// <p>Whether or not implementing the recommendation requires a restart.</p>
436    pub fn set_restart_needed(mut self, input: ::std::option::Option<bool>) -> Self {
437        self.restart_needed = input;
438        self
439    }
440    /// <p>Whether or not implementing the recommendation requires a restart.</p>
441    pub fn get_restart_needed(&self) -> &::std::option::Option<bool> {
442        &self.restart_needed
443    }
444    /// <p>The type of action you can take by adopting the recommendation.</p>
445    pub fn action_type(mut self, input: crate::types::ActionType) -> Self {
446        self.action_type = ::std::option::Option::Some(input);
447        self
448    }
449    /// <p>The type of action you can take by adopting the recommendation.</p>
450    pub fn set_action_type(mut self, input: ::std::option::Option<crate::types::ActionType>) -> Self {
451        self.action_type = input;
452        self
453    }
454    /// <p>The type of action you can take by adopting the recommendation.</p>
455    pub fn get_action_type(&self) -> &::std::option::Option<crate::types::ActionType> {
456        &self.action_type
457    }
458    /// <p>Whether or not implementing the recommendation can be rolled back.</p>
459    pub fn rollback_possible(mut self, input: bool) -> Self {
460        self.rollback_possible = ::std::option::Option::Some(input);
461        self
462    }
463    /// <p>Whether or not implementing the recommendation can be rolled back.</p>
464    pub fn set_rollback_possible(mut self, input: ::std::option::Option<bool>) -> Self {
465        self.rollback_possible = input;
466        self
467    }
468    /// <p>Whether or not implementing the recommendation can be rolled back.</p>
469    pub fn get_rollback_possible(&self) -> &::std::option::Option<bool> {
470        &self.rollback_possible
471    }
472    /// <p>The details for the resource.</p>
473    pub fn current_resource_details(mut self, input: crate::types::ResourceDetails) -> Self {
474        self.current_resource_details = ::std::option::Option::Some(input);
475        self
476    }
477    /// <p>The details for the resource.</p>
478    pub fn set_current_resource_details(mut self, input: ::std::option::Option<crate::types::ResourceDetails>) -> Self {
479        self.current_resource_details = input;
480        self
481    }
482    /// <p>The details for the resource.</p>
483    pub fn get_current_resource_details(&self) -> &::std::option::Option<crate::types::ResourceDetails> {
484        &self.current_resource_details
485    }
486    /// <p>The details about the recommended resource.</p>
487    pub fn recommended_resource_details(mut self, input: crate::types::ResourceDetails) -> Self {
488        self.recommended_resource_details = ::std::option::Option::Some(input);
489        self
490    }
491    /// <p>The details about the recommended resource.</p>
492    pub fn set_recommended_resource_details(mut self, input: ::std::option::Option<crate::types::ResourceDetails>) -> Self {
493        self.recommended_resource_details = input;
494        self
495    }
496    /// <p>The details about the recommended resource.</p>
497    pub fn get_recommended_resource_details(&self) -> &::std::option::Option<crate::types::ResourceDetails> {
498        &self.recommended_resource_details
499    }
500    /// Appends an item to `tags`.
501    ///
502    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
503    ///
504    /// <p>A list of tags associated with the resource for which the recommendation exists.</p>
505    pub fn tags(mut self, input: crate::types::Tag) -> Self {
506        let mut v = self.tags.unwrap_or_default();
507        v.push(input);
508        self.tags = ::std::option::Option::Some(v);
509        self
510    }
511    /// <p>A list of tags associated with the resource for which the recommendation exists.</p>
512    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
513        self.tags = input;
514        self
515    }
516    /// <p>A list of tags associated with the resource for which the recommendation exists.</p>
517    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
518        &self.tags
519    }
520    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
521        self._request_id = Some(request_id.into());
522        self
523    }
524
525    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
526        self._request_id = request_id;
527        self
528    }
529    /// Consumes the builder and constructs a [`GetRecommendationOutput`](crate::operation::get_recommendation::GetRecommendationOutput).
530    pub fn build(self) -> crate::operation::get_recommendation::GetRecommendationOutput {
531        crate::operation::get_recommendation::GetRecommendationOutput {
532            recommendation_id: self.recommendation_id,
533            resource_id: self.resource_id,
534            resource_arn: self.resource_arn,
535            account_id: self.account_id,
536            currency_code: self.currency_code,
537            recommendation_lookback_period_in_days: self.recommendation_lookback_period_in_days,
538            cost_calculation_lookback_period_in_days: self.cost_calculation_lookback_period_in_days,
539            estimated_savings_percentage: self.estimated_savings_percentage,
540            estimated_savings_over_cost_calculation_lookback_period: self.estimated_savings_over_cost_calculation_lookback_period,
541            current_resource_type: self.current_resource_type,
542            recommended_resource_type: self.recommended_resource_type,
543            region: self.region,
544            source: self.source,
545            last_refresh_timestamp: self.last_refresh_timestamp,
546            estimated_monthly_savings: self.estimated_monthly_savings,
547            estimated_monthly_cost: self.estimated_monthly_cost,
548            implementation_effort: self.implementation_effort,
549            restart_needed: self.restart_needed,
550            action_type: self.action_type,
551            rollback_possible: self.rollback_possible,
552            current_resource_details: self.current_resource_details,
553            recommended_resource_details: self.recommended_resource_details,
554            tags: self.tags,
555            _request_id: self._request_id,
556        }
557    }
558}