-
Notifications
You must be signed in to change notification settings - Fork 244
/
_volume_recommendation_option.rs
156 lines (153 loc) · 11 KB
/
_volume_recommendation_option.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes a recommendation option for an Amazon Elastic Block Store (Amazon EBS) instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VolumeRecommendationOption {
/// <p>An array of objects that describe a volume configuration.</p>
pub configuration: ::std::option::Option<crate::types::VolumeConfiguration>,
/// <p>The performance risk of the volume recommendation option.</p>
/// <p>Performance risk is the likelihood of the recommended volume type meeting the performance requirement of your workload.</p>
/// <p>The value ranges from <code>0</code> - <code>4</code>, with <code>0</code> meaning that the recommended resource is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely you should validate whether the recommendation will meet the performance requirements of your workload before migrating your resource.</p>
pub performance_risk: f64,
/// <p>The rank of the volume recommendation option.</p>
/// <p>The top recommendation option is ranked as <code>1</code>.</p>
pub rank: i32,
/// <p>An object that describes the savings opportunity for the EBS volume recommendation option. Savings opportunity includes the estimated monthly savings amount and percentage.</p>
pub savings_opportunity: ::std::option::Option<crate::types::SavingsOpportunity>,
/// <p>An object that describes the savings opportunity for the Amazon EBS volume recommendation option with specific discounts. Savings opportunity includes the estimated monthly savings and percentage.</p>
pub savings_opportunity_after_discounts: ::std::option::Option<crate::types::EbsSavingsOpportunityAfterDiscounts>,
}
impl VolumeRecommendationOption {
/// <p>An array of objects that describe a volume configuration.</p>
pub fn configuration(&self) -> ::std::option::Option<& crate::types::VolumeConfiguration> {
self.configuration.as_ref()
}
/// <p>The performance risk of the volume recommendation option.</p>
/// <p>Performance risk is the likelihood of the recommended volume type meeting the performance requirement of your workload.</p>
/// <p>The value ranges from <code>0</code> - <code>4</code>, with <code>0</code> meaning that the recommended resource is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely you should validate whether the recommendation will meet the performance requirements of your workload before migrating your resource.</p>
pub fn performance_risk(&self) -> f64 {
self.performance_risk
}
/// <p>The rank of the volume recommendation option.</p>
/// <p>The top recommendation option is ranked as <code>1</code>.</p>
pub fn rank(&self) -> i32 {
self.rank
}
/// <p>An object that describes the savings opportunity for the EBS volume recommendation option. Savings opportunity includes the estimated monthly savings amount and percentage.</p>
pub fn savings_opportunity(&self) -> ::std::option::Option<& crate::types::SavingsOpportunity> {
self.savings_opportunity.as_ref()
}
/// <p>An object that describes the savings opportunity for the Amazon EBS volume recommendation option with specific discounts. Savings opportunity includes the estimated monthly savings and percentage.</p>
pub fn savings_opportunity_after_discounts(&self) -> ::std::option::Option<& crate::types::EbsSavingsOpportunityAfterDiscounts> {
self.savings_opportunity_after_discounts.as_ref()
}
}
impl VolumeRecommendationOption {
/// Creates a new builder-style object to manufacture [`VolumeRecommendationOption`](crate::types::VolumeRecommendationOption).
pub fn builder() -> crate::types::builders::VolumeRecommendationOptionBuilder {
crate::types::builders::VolumeRecommendationOptionBuilder::default()
}
}
/// A builder for [`VolumeRecommendationOption`](crate::types::VolumeRecommendationOption).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VolumeRecommendationOptionBuilder {
pub(crate) configuration: ::std::option::Option<crate::types::VolumeConfiguration>,
pub(crate) performance_risk: ::std::option::Option<f64>,
pub(crate) rank: ::std::option::Option<i32>,
pub(crate) savings_opportunity: ::std::option::Option<crate::types::SavingsOpportunity>,
pub(crate) savings_opportunity_after_discounts: ::std::option::Option<crate::types::EbsSavingsOpportunityAfterDiscounts>,
}
impl VolumeRecommendationOptionBuilder {
/// <p>An array of objects that describe a volume configuration.</p>
pub fn configuration(mut self, input: crate::types::VolumeConfiguration) -> Self {
self.configuration = ::std::option::Option::Some(input);
self
}
/// <p>An array of objects that describe a volume configuration.</p>
pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::VolumeConfiguration>) -> Self {
self.configuration = input; self
}
/// <p>An array of objects that describe a volume configuration.</p>
pub fn get_configuration(&self) -> &::std::option::Option<crate::types::VolumeConfiguration> {
&self.configuration
}
/// <p>The performance risk of the volume recommendation option.</p>
/// <p>Performance risk is the likelihood of the recommended volume type meeting the performance requirement of your workload.</p>
/// <p>The value ranges from <code>0</code> - <code>4</code>, with <code>0</code> meaning that the recommended resource is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely you should validate whether the recommendation will meet the performance requirements of your workload before migrating your resource.</p>
pub fn performance_risk(mut self, input: f64) -> Self {
self.performance_risk = ::std::option::Option::Some(input);
self
}
/// <p>The performance risk of the volume recommendation option.</p>
/// <p>Performance risk is the likelihood of the recommended volume type meeting the performance requirement of your workload.</p>
/// <p>The value ranges from <code>0</code> - <code>4</code>, with <code>0</code> meaning that the recommended resource is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely you should validate whether the recommendation will meet the performance requirements of your workload before migrating your resource.</p>
pub fn set_performance_risk(mut self, input: ::std::option::Option<f64>) -> Self {
self.performance_risk = input; self
}
/// <p>The performance risk of the volume recommendation option.</p>
/// <p>Performance risk is the likelihood of the recommended volume type meeting the performance requirement of your workload.</p>
/// <p>The value ranges from <code>0</code> - <code>4</code>, with <code>0</code> meaning that the recommended resource is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely you should validate whether the recommendation will meet the performance requirements of your workload before migrating your resource.</p>
pub fn get_performance_risk(&self) -> &::std::option::Option<f64> {
&self.performance_risk
}
/// <p>The rank of the volume recommendation option.</p>
/// <p>The top recommendation option is ranked as <code>1</code>.</p>
pub fn rank(mut self, input: i32) -> Self {
self.rank = ::std::option::Option::Some(input);
self
}
/// <p>The rank of the volume recommendation option.</p>
/// <p>The top recommendation option is ranked as <code>1</code>.</p>
pub fn set_rank(mut self, input: ::std::option::Option<i32>) -> Self {
self.rank = input; self
}
/// <p>The rank of the volume recommendation option.</p>
/// <p>The top recommendation option is ranked as <code>1</code>.</p>
pub fn get_rank(&self) -> &::std::option::Option<i32> {
&self.rank
}
/// <p>An object that describes the savings opportunity for the EBS volume recommendation option. Savings opportunity includes the estimated monthly savings amount and percentage.</p>
pub fn savings_opportunity(mut self, input: crate::types::SavingsOpportunity) -> Self {
self.savings_opportunity = ::std::option::Option::Some(input);
self
}
/// <p>An object that describes the savings opportunity for the EBS volume recommendation option. Savings opportunity includes the estimated monthly savings amount and percentage.</p>
pub fn set_savings_opportunity(mut self, input: ::std::option::Option<crate::types::SavingsOpportunity>) -> Self {
self.savings_opportunity = input; self
}
/// <p>An object that describes the savings opportunity for the EBS volume recommendation option. Savings opportunity includes the estimated monthly savings amount and percentage.</p>
pub fn get_savings_opportunity(&self) -> &::std::option::Option<crate::types::SavingsOpportunity> {
&self.savings_opportunity
}
/// <p>An object that describes the savings opportunity for the Amazon EBS volume recommendation option with specific discounts. Savings opportunity includes the estimated monthly savings and percentage.</p>
pub fn savings_opportunity_after_discounts(mut self, input: crate::types::EbsSavingsOpportunityAfterDiscounts) -> Self {
self.savings_opportunity_after_discounts = ::std::option::Option::Some(input);
self
}
/// <p>An object that describes the savings opportunity for the Amazon EBS volume recommendation option with specific discounts. Savings opportunity includes the estimated monthly savings and percentage.</p>
pub fn set_savings_opportunity_after_discounts(mut self, input: ::std::option::Option<crate::types::EbsSavingsOpportunityAfterDiscounts>) -> Self {
self.savings_opportunity_after_discounts = input; self
}
/// <p>An object that describes the savings opportunity for the Amazon EBS volume recommendation option with specific discounts. Savings opportunity includes the estimated monthly savings and percentage.</p>
pub fn get_savings_opportunity_after_discounts(&self) -> &::std::option::Option<crate::types::EbsSavingsOpportunityAfterDiscounts> {
&self.savings_opportunity_after_discounts
}
/// Consumes the builder and constructs a [`VolumeRecommendationOption`](crate::types::VolumeRecommendationOption).
pub fn build(self) -> crate::types::VolumeRecommendationOption {
crate::types::VolumeRecommendationOption {
configuration: self.configuration
,
performance_risk: self.performance_risk
.unwrap_or_default()
,
rank: self.rank
.unwrap_or_default()
,
savings_opportunity: self.savings_opportunity
,
savings_opportunity_after_discounts: self.savings_opportunity_after_discounts
,
}
}
}