AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
AutoScalingPolicy.h
1
6#pragma once
7#include <aws/elasticmapreduce/EMR_EXPORTS.h>
8#include <aws/elasticmapreduce/model/ScalingConstraints.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/elasticmapreduce/model/ScalingRule.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace EMR
24{
25namespace Model
26{
27
38 {
39 public:
40 AWS_EMR_API AutoScalingPolicy() = default;
44
45
47
52 inline const ScalingConstraints& GetConstraints() const { return m_constraints; }
53 inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; }
54 template<typename ConstraintsT = ScalingConstraints>
55 void SetConstraints(ConstraintsT&& value) { m_constraintsHasBeenSet = true; m_constraints = std::forward<ConstraintsT>(value); }
56 template<typename ConstraintsT = ScalingConstraints>
57 AutoScalingPolicy& WithConstraints(ConstraintsT&& value) { SetConstraints(std::forward<ConstraintsT>(value)); return *this;}
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) { m_rulesHasBeenSet = true; m_rules = std::forward<RulesT>(value); }
69 template<typename RulesT = Aws::Vector<ScalingRule>>
70 AutoScalingPolicy& WithRules(RulesT&& value) { SetRules(std::forward<RulesT>(value)); return *this;}
71 template<typename RulesT = ScalingRule>
72 AutoScalingPolicy& AddRules(RulesT&& value) { m_rulesHasBeenSet = true; m_rules.emplace_back(std::forward<RulesT>(value)); return *this; }
74 private:
75
76 ScalingConstraints m_constraints;
77 bool m_constraintsHasBeenSet = false;
78
80 bool m_rulesHasBeenSet = false;
81 };
82
83} // namespace Model
84} // namespace EMR
85} // 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