AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
Ec2AutoScalingGroupConfiguration.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/cost-optimization-hub/CostOptimizationHub_EXPORTS.h>
9#include <aws/cost-optimization-hub/model/AllocationStrategy.h>
10#include <aws/cost-optimization-hub/model/Ec2AutoScalingGroupType.h>
11#include <aws/cost-optimization-hub/model/InstanceConfiguration.h>
12#include <aws/cost-optimization-hub/model/MixedInstanceConfiguration.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace CostOptimizationHub {
24namespace Model {
25
33 public:
34 AWS_COSTOPTIMIZATIONHUB_API Ec2AutoScalingGroupConfiguration() = default;
35 AWS_COSTOPTIMIZATIONHUB_API Ec2AutoScalingGroupConfiguration(Aws::Utils::Json::JsonView jsonValue);
37 AWS_COSTOPTIMIZATIONHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
44 inline const InstanceConfiguration& GetInstance() const { return m_instance; }
45 inline bool InstanceHasBeenSet() const { return m_instanceHasBeenSet; }
46 template <typename InstanceT = InstanceConfiguration>
47 void SetInstance(InstanceT&& value) {
48 m_instanceHasBeenSet = true;
49 m_instance = std::forward<InstanceT>(value);
50 }
51 template <typename InstanceT = InstanceConfiguration>
53 SetInstance(std::forward<InstanceT>(value));
54 return *this;
55 }
57
59
63 inline const Aws::Vector<MixedInstanceConfiguration>& GetMixedInstances() const { return m_mixedInstances; }
64 inline bool MixedInstancesHasBeenSet() const { return m_mixedInstancesHasBeenSet; }
65 template <typename MixedInstancesT = Aws::Vector<MixedInstanceConfiguration>>
66 void SetMixedInstances(MixedInstancesT&& value) {
67 m_mixedInstancesHasBeenSet = true;
68 m_mixedInstances = std::forward<MixedInstancesT>(value);
69 }
70 template <typename MixedInstancesT = Aws::Vector<MixedInstanceConfiguration>>
72 SetMixedInstances(std::forward<MixedInstancesT>(value));
73 return *this;
74 }
75 template <typename MixedInstancesT = MixedInstanceConfiguration>
77 m_mixedInstancesHasBeenSet = true;
78 m_mixedInstances.emplace_back(std::forward<MixedInstancesT>(value));
79 return *this;
80 }
82
84
88 inline Ec2AutoScalingGroupType GetType() const { return m_type; }
89 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
90 inline void SetType(Ec2AutoScalingGroupType value) {
91 m_typeHasBeenSet = true;
92 m_type = value;
93 }
95 SetType(value);
96 return *this;
97 }
99
101
105 inline AllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
106 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
108 m_allocationStrategyHasBeenSet = true;
109 m_allocationStrategy = value;
110 }
113 return *this;
114 }
116 private:
117 InstanceConfiguration m_instance;
118
120
122
124 bool m_instanceHasBeenSet = false;
125 bool m_mixedInstancesHasBeenSet = false;
126 bool m_typeHasBeenSet = false;
127 bool m_allocationStrategyHasBeenSet = false;
128};
129
130} // namespace Model
131} // namespace CostOptimizationHub
132} // namespace Aws
Ec2AutoScalingGroupConfiguration & WithAllocationStrategy(AllocationStrategy value)
Ec2AutoScalingGroupConfiguration & AddMixedInstances(MixedInstancesT &&value)
AWS_COSTOPTIMIZATIONHUB_API Ec2AutoScalingGroupConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_COSTOPTIMIZATIONHUB_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COSTOPTIMIZATIONHUB_API Ec2AutoScalingGroupConfiguration()=default
const Aws::Vector< MixedInstanceConfiguration > & GetMixedInstances() const
Ec2AutoScalingGroupConfiguration & WithMixedInstances(MixedInstancesT &&value)
Ec2AutoScalingGroupConfiguration & WithType(Ec2AutoScalingGroupType value)
AWS_COSTOPTIMIZATIONHUB_API Ec2AutoScalingGroupConfiguration(Aws::Utils::Json::JsonView jsonValue)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue