AWS SDK for C++

AWS SDK for C++ Version 1.11.807

Loading...
Searching...
No Matches
PutRecommendationPreferencesRequest.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizerRequest.h>
8#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
9#include <aws/compute-optimizer/model/EnhancedInfrastructureMetrics.h>
10#include <aws/compute-optimizer/model/ExternalMetricsPreference.h>
11#include <aws/compute-optimizer/model/InferredWorkloadTypesPreference.h>
12#include <aws/compute-optimizer/model/LookBackPeriodPreference.h>
13#include <aws/compute-optimizer/model/PreferredResource.h>
14#include <aws/compute-optimizer/model/ResourceType.h>
15#include <aws/compute-optimizer/model/SavingsEstimationMode.h>
16#include <aws/compute-optimizer/model/Scope.h>
17#include <aws/compute-optimizer/model/UtilizationPreference.h>
18#include <aws/core/utils/memory/stl/AWSVector.h>
19
20#include <utility>
21
22namespace Aws {
23namespace ComputeOptimizer {
24namespace Model {
25
29 public:
30 AWS_COMPUTEOPTIMIZER_API PutRecommendationPreferencesRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "PutRecommendationPreferences"; }
37
38 AWS_COMPUTEOPTIMIZER_API Aws::String SerializePayload() const override;
39
40 AWS_COMPUTEOPTIMIZER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
41
43
50 inline ResourceType GetResourceType() const { return m_resourceType; }
51 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
52 inline void SetResourceType(ResourceType value) {
53 m_resourceTypeHasBeenSet = true;
54 m_resourceType = value;
55 }
57 SetResourceType(value);
58 return *this;
59 }
61
63
80 inline const Scope& GetScope() const { return m_scope; }
81 inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
82 template <typename ScopeT = Scope>
83 void SetScope(ScopeT&& value) {
84 m_scopeHasBeenSet = true;
85 m_scope = std::forward<ScopeT>(value);
86 }
87 template <typename ScopeT = Scope>
89 SetScope(std::forward<ScopeT>(value));
90 return *this;
91 }
93
95
103 inline EnhancedInfrastructureMetrics GetEnhancedInfrastructureMetrics() const { return m_enhancedInfrastructureMetrics; }
104 inline bool EnhancedInfrastructureMetricsHasBeenSet() const { return m_enhancedInfrastructureMetricsHasBeenSet; }
106 m_enhancedInfrastructureMetricsHasBeenSet = true;
107 m_enhancedInfrastructureMetrics = value;
108 }
111 return *this;
112 }
114
116
125 inline InferredWorkloadTypesPreference GetInferredWorkloadTypes() const { return m_inferredWorkloadTypes; }
126 inline bool InferredWorkloadTypesHasBeenSet() const { return m_inferredWorkloadTypesHasBeenSet; }
128 m_inferredWorkloadTypesHasBeenSet = true;
129 m_inferredWorkloadTypes = value;
130 }
133 return *this;
134 }
136
138
148 inline const ExternalMetricsPreference& GetExternalMetricsPreference() const { return m_externalMetricsPreference; }
149 inline bool ExternalMetricsPreferenceHasBeenSet() const { return m_externalMetricsPreferenceHasBeenSet; }
150 template <typename ExternalMetricsPreferenceT = ExternalMetricsPreference>
151 void SetExternalMetricsPreference(ExternalMetricsPreferenceT&& value) {
152 m_externalMetricsPreferenceHasBeenSet = true;
153 m_externalMetricsPreference = std::forward<ExternalMetricsPreferenceT>(value);
154 }
155 template <typename ExternalMetricsPreferenceT = ExternalMetricsPreference>
157 SetExternalMetricsPreference(std::forward<ExternalMetricsPreferenceT>(value));
158 return *this;
159 }
161
163
173 inline LookBackPeriodPreference GetLookBackPeriod() const { return m_lookBackPeriod; }
174 inline bool LookBackPeriodHasBeenSet() const { return m_lookBackPeriodHasBeenSet; }
176 m_lookBackPeriodHasBeenSet = true;
177 m_lookBackPeriod = value;
178 }
180 SetLookBackPeriod(value);
181 return *this;
182 }
184
186
198 inline const Aws::Vector<UtilizationPreference>& GetUtilizationPreferences() const { return m_utilizationPreferences; }
199 inline bool UtilizationPreferencesHasBeenSet() const { return m_utilizationPreferencesHasBeenSet; }
200 template <typename UtilizationPreferencesT = Aws::Vector<UtilizationPreference>>
201 void SetUtilizationPreferences(UtilizationPreferencesT&& value) {
202 m_utilizationPreferencesHasBeenSet = true;
203 m_utilizationPreferences = std::forward<UtilizationPreferencesT>(value);
204 }
205 template <typename UtilizationPreferencesT = Aws::Vector<UtilizationPreference>>
207 SetUtilizationPreferences(std::forward<UtilizationPreferencesT>(value));
208 return *this;
209 }
210 template <typename UtilizationPreferencesT = UtilizationPreference>
212 m_utilizationPreferencesHasBeenSet = true;
213 m_utilizationPreferences.emplace_back(std::forward<UtilizationPreferencesT>(value));
214 return *this;
215 }
217
219
228 inline const Aws::Vector<PreferredResource>& GetPreferredResources() const { return m_preferredResources; }
229 inline bool PreferredResourcesHasBeenSet() const { return m_preferredResourcesHasBeenSet; }
230 template <typename PreferredResourcesT = Aws::Vector<PreferredResource>>
231 void SetPreferredResources(PreferredResourcesT&& value) {
232 m_preferredResourcesHasBeenSet = true;
233 m_preferredResources = std::forward<PreferredResourcesT>(value);
234 }
235 template <typename PreferredResourcesT = Aws::Vector<PreferredResource>>
237 SetPreferredResources(std::forward<PreferredResourcesT>(value));
238 return *this;
239 }
240 template <typename PreferredResourcesT = PreferredResource>
242 m_preferredResourcesHasBeenSet = true;
243 m_preferredResources.emplace_back(std::forward<PreferredResourcesT>(value));
244 return *this;
245 }
247
249
258 inline SavingsEstimationMode GetSavingsEstimationMode() const { return m_savingsEstimationMode; }
259 inline bool SavingsEstimationModeHasBeenSet() const { return m_savingsEstimationModeHasBeenSet; }
261 m_savingsEstimationModeHasBeenSet = true;
262 m_savingsEstimationMode = value;
263 }
266 return *this;
267 }
269 private:
270 ResourceType m_resourceType{ResourceType::NOT_SET};
271
272 Scope m_scope;
273
275
277
278 ExternalMetricsPreference m_externalMetricsPreference;
279
281
282 Aws::Vector<UtilizationPreference> m_utilizationPreferences;
283
284 Aws::Vector<PreferredResource> m_preferredResources;
285
287 bool m_resourceTypeHasBeenSet = false;
288 bool m_scopeHasBeenSet = false;
289 bool m_enhancedInfrastructureMetricsHasBeenSet = false;
290 bool m_inferredWorkloadTypesHasBeenSet = false;
291 bool m_externalMetricsPreferenceHasBeenSet = false;
292 bool m_lookBackPeriodHasBeenSet = false;
293 bool m_utilizationPreferencesHasBeenSet = false;
294 bool m_preferredResourcesHasBeenSet = false;
295 bool m_savingsEstimationModeHasBeenSet = false;
296};
297
298} // namespace Model
299} // namespace ComputeOptimizer
300} // namespace Aws
PutRecommendationPreferencesRequest & WithPreferredResources(PreferredResourcesT &&value)
PutRecommendationPreferencesRequest & WithExternalMetricsPreference(ExternalMetricsPreferenceT &&value)
AWS_COMPUTEOPTIMIZER_API PutRecommendationPreferencesRequest()=default
PutRecommendationPreferencesRequest & WithUtilizationPreferences(UtilizationPreferencesT &&value)
PutRecommendationPreferencesRequest & WithInferredWorkloadTypes(InferredWorkloadTypesPreference value)
PutRecommendationPreferencesRequest & AddPreferredResources(PreferredResourcesT &&value)
AWS_COMPUTEOPTIMIZER_API Aws::String SerializePayload() const override
PutRecommendationPreferencesRequest & WithSavingsEstimationMode(SavingsEstimationMode value)
PutRecommendationPreferencesRequest & WithResourceType(ResourceType value)
PutRecommendationPreferencesRequest & WithEnhancedInfrastructureMetrics(EnhancedInfrastructureMetrics value)
PutRecommendationPreferencesRequest & WithLookBackPeriod(LookBackPeriodPreference value)
const Aws::Vector< UtilizationPreference > & GetUtilizationPreferences() const
AWS_COMPUTEOPTIMIZER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutRecommendationPreferencesRequest & AddUtilizationPreferences(UtilizationPreferencesT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector