AWS SDK for C++

AWS SDK for C++ Version 1.11.745

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
81 inline const Scope& GetScope() const { return m_scope; }
82 inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
83 template <typename ScopeT = Scope>
84 void SetScope(ScopeT&& value) {
85 m_scopeHasBeenSet = true;
86 m_scope = std::forward<ScopeT>(value);
87 }
88 template <typename ScopeT = Scope>
90 SetScope(std::forward<ScopeT>(value));
91 return *this;
92 }
94
96
104 inline EnhancedInfrastructureMetrics GetEnhancedInfrastructureMetrics() const { return m_enhancedInfrastructureMetrics; }
105 inline bool EnhancedInfrastructureMetricsHasBeenSet() const { return m_enhancedInfrastructureMetricsHasBeenSet; }
107 m_enhancedInfrastructureMetricsHasBeenSet = true;
108 m_enhancedInfrastructureMetrics = value;
109 }
112 return *this;
113 }
115
117
126 inline InferredWorkloadTypesPreference GetInferredWorkloadTypes() const { return m_inferredWorkloadTypes; }
127 inline bool InferredWorkloadTypesHasBeenSet() const { return m_inferredWorkloadTypesHasBeenSet; }
129 m_inferredWorkloadTypesHasBeenSet = true;
130 m_inferredWorkloadTypes = value;
131 }
134 return *this;
135 }
137
139
149 inline const ExternalMetricsPreference& GetExternalMetricsPreference() const { return m_externalMetricsPreference; }
150 inline bool ExternalMetricsPreferenceHasBeenSet() const { return m_externalMetricsPreferenceHasBeenSet; }
151 template <typename ExternalMetricsPreferenceT = ExternalMetricsPreference>
152 void SetExternalMetricsPreference(ExternalMetricsPreferenceT&& value) {
153 m_externalMetricsPreferenceHasBeenSet = true;
154 m_externalMetricsPreference = std::forward<ExternalMetricsPreferenceT>(value);
155 }
156 template <typename ExternalMetricsPreferenceT = ExternalMetricsPreference>
158 SetExternalMetricsPreference(std::forward<ExternalMetricsPreferenceT>(value));
159 return *this;
160 }
162
164
174 inline LookBackPeriodPreference GetLookBackPeriod() const { return m_lookBackPeriod; }
175 inline bool LookBackPeriodHasBeenSet() const { return m_lookBackPeriodHasBeenSet; }
177 m_lookBackPeriodHasBeenSet = true;
178 m_lookBackPeriod = value;
179 }
181 SetLookBackPeriod(value);
182 return *this;
183 }
185
187
199 inline const Aws::Vector<UtilizationPreference>& GetUtilizationPreferences() const { return m_utilizationPreferences; }
200 inline bool UtilizationPreferencesHasBeenSet() const { return m_utilizationPreferencesHasBeenSet; }
201 template <typename UtilizationPreferencesT = Aws::Vector<UtilizationPreference>>
202 void SetUtilizationPreferences(UtilizationPreferencesT&& value) {
203 m_utilizationPreferencesHasBeenSet = true;
204 m_utilizationPreferences = std::forward<UtilizationPreferencesT>(value);
205 }
206 template <typename UtilizationPreferencesT = Aws::Vector<UtilizationPreference>>
208 SetUtilizationPreferences(std::forward<UtilizationPreferencesT>(value));
209 return *this;
210 }
211 template <typename UtilizationPreferencesT = UtilizationPreference>
213 m_utilizationPreferencesHasBeenSet = true;
214 m_utilizationPreferences.emplace_back(std::forward<UtilizationPreferencesT>(value));
215 return *this;
216 }
218
220
229 inline const Aws::Vector<PreferredResource>& GetPreferredResources() const { return m_preferredResources; }
230 inline bool PreferredResourcesHasBeenSet() const { return m_preferredResourcesHasBeenSet; }
231 template <typename PreferredResourcesT = Aws::Vector<PreferredResource>>
232 void SetPreferredResources(PreferredResourcesT&& value) {
233 m_preferredResourcesHasBeenSet = true;
234 m_preferredResources = std::forward<PreferredResourcesT>(value);
235 }
236 template <typename PreferredResourcesT = Aws::Vector<PreferredResource>>
238 SetPreferredResources(std::forward<PreferredResourcesT>(value));
239 return *this;
240 }
241 template <typename PreferredResourcesT = PreferredResource>
243 m_preferredResourcesHasBeenSet = true;
244 m_preferredResources.emplace_back(std::forward<PreferredResourcesT>(value));
245 return *this;
246 }
248
250
259 inline SavingsEstimationMode GetSavingsEstimationMode() const { return m_savingsEstimationMode; }
260 inline bool SavingsEstimationModeHasBeenSet() const { return m_savingsEstimationModeHasBeenSet; }
262 m_savingsEstimationModeHasBeenSet = true;
263 m_savingsEstimationMode = value;
264 }
267 return *this;
268 }
270 private:
271 ResourceType m_resourceType{ResourceType::NOT_SET};
272
273 Scope m_scope;
274
276
278
279 ExternalMetricsPreference m_externalMetricsPreference;
280
282
283 Aws::Vector<UtilizationPreference> m_utilizationPreferences;
284
285 Aws::Vector<PreferredResource> m_preferredResources;
286
288 bool m_resourceTypeHasBeenSet = false;
289 bool m_scopeHasBeenSet = false;
290 bool m_enhancedInfrastructureMetricsHasBeenSet = false;
291 bool m_inferredWorkloadTypesHasBeenSet = false;
292 bool m_externalMetricsPreferenceHasBeenSet = false;
293 bool m_lookBackPeriodHasBeenSet = false;
294 bool m_utilizationPreferencesHasBeenSet = false;
295 bool m_preferredResourcesHasBeenSet = false;
296 bool m_savingsEstimationModeHasBeenSet = false;
297};
298
299} // namespace Model
300} // namespace ComputeOptimizer
301} // 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