AWS SDK for C++  1.9.45
AWS SDK for C++
AutoScalingPolicy.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19  class JsonValue;
20  class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace EMR
24 {
25 namespace Model
26 {
27 
38  {
39  public:
44 
45 
51  inline const ScalingConstraints& GetConstraints() const{ return m_constraints; }
52 
58  inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; }
59 
65  inline void SetConstraints(const ScalingConstraints& value) { m_constraintsHasBeenSet = true; m_constraints = value; }
66 
72  inline void SetConstraints(ScalingConstraints&& value) { m_constraintsHasBeenSet = true; m_constraints = std::move(value); }
73 
79  inline AutoScalingPolicy& WithConstraints(const ScalingConstraints& value) { SetConstraints(value); return *this;}
80 
86  inline AutoScalingPolicy& WithConstraints(ScalingConstraints&& value) { SetConstraints(std::move(value)); return *this;}
87 
88 
93  inline const Aws::Vector<ScalingRule>& GetRules() const{ return m_rules; }
94 
99  inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
100 
105  inline void SetRules(const Aws::Vector<ScalingRule>& value) { m_rulesHasBeenSet = true; m_rules = value; }
106 
111  inline void SetRules(Aws::Vector<ScalingRule>&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); }
112 
117  inline AutoScalingPolicy& WithRules(const Aws::Vector<ScalingRule>& value) { SetRules(value); return *this;}
118 
123  inline AutoScalingPolicy& WithRules(Aws::Vector<ScalingRule>&& value) { SetRules(std::move(value)); return *this;}
124 
129  inline AutoScalingPolicy& AddRules(const ScalingRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; }
130 
135  inline AutoScalingPolicy& AddRules(ScalingRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; }
136 
137  private:
138 
139  ScalingConstraints m_constraints;
140  bool m_constraintsHasBeenSet;
141 
142  Aws::Vector<ScalingRule> m_rules;
143  bool m_rulesHasBeenSet;
144  };
145 
146 } // namespace Model
147 } // namespace EMR
148 } // namespace Aws
ScalingConstraints.h
Aws::EMR::Model::ScalingRule
Definition: ScalingRule.h:38
Aws::EMR::Model::AutoScalingPolicy::RulesHasBeenSet
bool RulesHasBeenSet() const
Definition: AutoScalingPolicy.h:99
Aws::EMR::Model::AutoScalingPolicy::operator=
AutoScalingPolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::EMR::Model::AutoScalingPolicy::SetConstraints
void SetConstraints(const ScalingConstraints &value)
Definition: AutoScalingPolicy.h:65
EMR_EXPORTS.h
Aws::EMR::Model::AutoScalingPolicy::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::EMR::Model::ScalingConstraints
Definition: ScalingConstraints.h:33
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EMR::Model::AutoScalingPolicy::SetRules
void SetRules(const Aws::Vector< ScalingRule > &value)
Definition: AutoScalingPolicy.h:105
Aws::EMR::Model::AutoScalingPolicy::WithConstraints
AutoScalingPolicy & WithConstraints(ScalingConstraints &&value)
Definition: AutoScalingPolicy.h:86
AWSVector.h
Aws::EMR::Model::AutoScalingPolicy::AutoScalingPolicy
AutoScalingPolicy(Aws::Utils::Json::JsonView jsonValue)
Aws::EMR::Model::AutoScalingPolicy::SetConstraints
void SetConstraints(ScalingConstraints &&value)
Definition: AutoScalingPolicy.h:72
Aws::EMR::Model::AutoScalingPolicy::GetRules
const Aws::Vector< ScalingRule > & GetRules() const
Definition: AutoScalingPolicy.h:93
Aws::EMR::Model::ExecutionEngineType::NOT_SET
@ NOT_SET
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:222
Aws::EMR::Model::AutoScalingPolicy::WithConstraints
AutoScalingPolicy & WithConstraints(const ScalingConstraints &value)
Definition: AutoScalingPolicy.h:79
ScalingRule.h
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:30
Aws::EMR::Model::AutoScalingPolicy
Definition: AutoScalingPolicy.h:38
Aws::EMR::Model::AutoScalingPolicy::GetConstraints
const ScalingConstraints & GetConstraints() const
Definition: AutoScalingPolicy.h:51
Aws::EMR::Model::AutoScalingPolicy::WithRules
AutoScalingPolicy & WithRules(Aws::Vector< ScalingRule > &&value)
Definition: AutoScalingPolicy.h:123
Aws::EMR::Model::AutoScalingPolicy::AddRules
AutoScalingPolicy & AddRules(const ScalingRule &value)
Definition: AutoScalingPolicy.h:129
Aws
Definition: AccessManagementClient.h:15
Aws::EMR::Model::AutoScalingPolicy::SetRules
void SetRules(Aws::Vector< ScalingRule > &&value)
Definition: AutoScalingPolicy.h:111
Aws::EMR::Model::AutoScalingPolicy::ConstraintsHasBeenSet
bool ConstraintsHasBeenSet() const
Definition: AutoScalingPolicy.h:58
Aws::EMR::Model::AutoScalingPolicy::WithRules
AutoScalingPolicy & WithRules(const Aws::Vector< ScalingRule > &value)
Definition: AutoScalingPolicy.h:117
Aws::EMR::Model::AutoScalingPolicy::AutoScalingPolicy
AutoScalingPolicy()
AWS_EMR_API
#define AWS_EMR_API
Definition: EMR_EXPORTS.h:28
Aws::EMR::Model::AutoScalingPolicy::AddRules
AutoScalingPolicy & AddRules(ScalingRule &&value)
Definition: AutoScalingPolicy.h:135