AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
AutoScalingPolicy.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/elasticmapreduce/EMR_EXPORTS.h>
9#include <aws/elasticmapreduce/model/ScalingConstraints.h>
10#include <aws/elasticmapreduce/model/ScalingRule.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace EMR {
22namespace Model {
23
34 public:
35 AWS_EMR_API AutoScalingPolicy() = default;
39
41
46 inline const ScalingConstraints& GetConstraints() const { return m_constraints; }
47 inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; }
48 template <typename ConstraintsT = ScalingConstraints>
49 void SetConstraints(ConstraintsT&& value) {
50 m_constraintsHasBeenSet = true;
51 m_constraints = std::forward<ConstraintsT>(value);
52 }
53 template <typename ConstraintsT = ScalingConstraints>
54 AutoScalingPolicy& WithConstraints(ConstraintsT&& value) {
55 SetConstraints(std::forward<ConstraintsT>(value));
56 return *this;
57 }
59
61
65 inline const Aws::Vector<ScalingRule>& GetRules() const { return m_rules; }
66 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
67 template <typename RulesT = Aws::Vector<ScalingRule>>
68 void SetRules(RulesT&& value) {
69 m_rulesHasBeenSet = true;
70 m_rules = std::forward<RulesT>(value);
71 }
72 template <typename RulesT = Aws::Vector<ScalingRule>>
73 AutoScalingPolicy& WithRules(RulesT&& value) {
74 SetRules(std::forward<RulesT>(value));
75 return *this;
76 }
77 template <typename RulesT = ScalingRule>
78 AutoScalingPolicy& AddRules(RulesT&& value) {
79 m_rulesHasBeenSet = true;
80 m_rules.emplace_back(std::forward<RulesT>(value));
81 return *this;
82 }
84 private:
85 ScalingConstraints m_constraints;
86
88 bool m_constraintsHasBeenSet = false;
89 bool m_rulesHasBeenSet = false;
90};
91
92} // namespace Model
93} // namespace EMR
94} // namespace Aws
const ScalingConstraints & GetConstraints() const
AutoScalingPolicy & AddRules(RulesT &&value)
AWS_EMR_API AutoScalingPolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< ScalingRule > & GetRules() const
AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_EMR_API AutoScalingPolicy()=default
void SetConstraints(ConstraintsT &&value)
AutoScalingPolicy & WithRules(RulesT &&value)
AutoScalingPolicy & WithConstraints(ConstraintsT &&value)
AWS_EMR_API AutoScalingPolicy(Aws::Utils::Json::JsonView jsonValue)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue