AWS SDK for C++

AWS SDK for C++ Version 1.11.844

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
184 inline LookBackPeriodPreference GetLookBackPeriod() const { return m_lookBackPeriod; }
185 inline bool LookBackPeriodHasBeenSet() const { return m_lookBackPeriodHasBeenSet; }
187 m_lookBackPeriodHasBeenSet = true;
188 m_lookBackPeriod = value;
189 }
191 SetLookBackPeriod(value);
192 return *this;
193 }
195
197
209 inline const Aws::Vector<UtilizationPreference>& GetUtilizationPreferences() const { return m_utilizationPreferences; }
210 inline bool UtilizationPreferencesHasBeenSet() const { return m_utilizationPreferencesHasBeenSet; }
211 template <typename UtilizationPreferencesT = Aws::Vector<UtilizationPreference>>
212 void SetUtilizationPreferences(UtilizationPreferencesT&& value) {
213 m_utilizationPreferencesHasBeenSet = true;
214 m_utilizationPreferences = std::forward<UtilizationPreferencesT>(value);
215 }
216 template <typename UtilizationPreferencesT = Aws::Vector<UtilizationPreference>>
218 SetUtilizationPreferences(std::forward<UtilizationPreferencesT>(value));
219 return *this;
220 }
221 template <typename UtilizationPreferencesT = UtilizationPreference>
223 m_utilizationPreferencesHasBeenSet = true;
224 m_utilizationPreferences.emplace_back(std::forward<UtilizationPreferencesT>(value));
225 return *this;
226 }
228
230
240 inline const Aws::Vector<PreferredResource>& GetPreferredResources() const { return m_preferredResources; }
241 inline bool PreferredResourcesHasBeenSet() const { return m_preferredResourcesHasBeenSet; }
242 template <typename PreferredResourcesT = Aws::Vector<PreferredResource>>
243 void SetPreferredResources(PreferredResourcesT&& value) {
244 m_preferredResourcesHasBeenSet = true;
245 m_preferredResources = std::forward<PreferredResourcesT>(value);
246 }
247 template <typename PreferredResourcesT = Aws::Vector<PreferredResource>>
249 SetPreferredResources(std::forward<PreferredResourcesT>(value));
250 return *this;
251 }
252 template <typename PreferredResourcesT = PreferredResource>
254 m_preferredResourcesHasBeenSet = true;
255 m_preferredResources.emplace_back(std::forward<PreferredResourcesT>(value));
256 return *this;
257 }
259
261
270 inline SavingsEstimationMode GetSavingsEstimationMode() const { return m_savingsEstimationMode; }
271 inline bool SavingsEstimationModeHasBeenSet() const { return m_savingsEstimationModeHasBeenSet; }
273 m_savingsEstimationModeHasBeenSet = true;
274 m_savingsEstimationMode = value;
275 }
278 return *this;
279 }
281 private:
282 ResourceType m_resourceType{ResourceType::NOT_SET};
283
284 Scope m_scope;
285
287
289
290 ExternalMetricsPreference m_externalMetricsPreference;
291
293
294 Aws::Vector<UtilizationPreference> m_utilizationPreferences;
295
296 Aws::Vector<PreferredResource> m_preferredResources;
297
299 bool m_resourceTypeHasBeenSet = false;
300 bool m_scopeHasBeenSet = false;
301 bool m_enhancedInfrastructureMetricsHasBeenSet = false;
302 bool m_inferredWorkloadTypesHasBeenSet = false;
303 bool m_externalMetricsPreferenceHasBeenSet = false;
304 bool m_lookBackPeriodHasBeenSet = false;
305 bool m_utilizationPreferencesHasBeenSet = false;
306 bool m_preferredResourcesHasBeenSet = false;
307 bool m_savingsEstimationModeHasBeenSet = false;
308};
309
310} // namespace Model
311} // namespace ComputeOptimizer
312} // 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