AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
ClusterConfig.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/opensearch/OpenSearchService_EXPORTS.h>
9#include <aws/opensearch/model/ColdStorageOptions.h>
10#include <aws/opensearch/model/NodeOption.h>
11#include <aws/opensearch/model/OpenSearchPartitionInstanceType.h>
12#include <aws/opensearch/model/OpenSearchWarmPartitionInstanceType.h>
13#include <aws/opensearch/model/ZoneAwarenessConfig.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace OpenSearchService {
25namespace Model {
26
37 public:
38 AWS_OPENSEARCHSERVICE_API ClusterConfig() = default;
39 AWS_OPENSEARCHSERVICE_API ClusterConfig(Aws::Utils::Json::JsonView jsonValue);
40 AWS_OPENSEARCHSERVICE_API ClusterConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline OpenSearchPartitionInstanceType GetInstanceType() const { return m_instanceType; }
48 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
50 m_instanceTypeHasBeenSet = true;
51 m_instanceType = value;
52 }
54 SetInstanceType(value);
55 return *this;
56 }
58
60
64 inline int GetInstanceCount() const { return m_instanceCount; }
65 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
66 inline void SetInstanceCount(int value) {
67 m_instanceCountHasBeenSet = true;
68 m_instanceCount = value;
69 }
70 inline ClusterConfig& WithInstanceCount(int value) {
71 SetInstanceCount(value);
72 return *this;
73 }
75
77
82 inline bool GetDedicatedMasterEnabled() const { return m_dedicatedMasterEnabled; }
83 inline bool DedicatedMasterEnabledHasBeenSet() const { return m_dedicatedMasterEnabledHasBeenSet; }
84 inline void SetDedicatedMasterEnabled(bool value) {
85 m_dedicatedMasterEnabledHasBeenSet = true;
86 m_dedicatedMasterEnabled = value;
87 }
90 return *this;
91 }
93
95
101 inline bool GetZoneAwarenessEnabled() const { return m_zoneAwarenessEnabled; }
102 inline bool ZoneAwarenessEnabledHasBeenSet() const { return m_zoneAwarenessEnabledHasBeenSet; }
103 inline void SetZoneAwarenessEnabled(bool value) {
104 m_zoneAwarenessEnabledHasBeenSet = true;
105 m_zoneAwarenessEnabled = value;
106 }
109 return *this;
110 }
112
114
118 inline const ZoneAwarenessConfig& GetZoneAwarenessConfig() const { return m_zoneAwarenessConfig; }
119 inline bool ZoneAwarenessConfigHasBeenSet() const { return m_zoneAwarenessConfigHasBeenSet; }
120 template <typename ZoneAwarenessConfigT = ZoneAwarenessConfig>
121 void SetZoneAwarenessConfig(ZoneAwarenessConfigT&& value) {
122 m_zoneAwarenessConfigHasBeenSet = true;
123 m_zoneAwarenessConfig = std::forward<ZoneAwarenessConfigT>(value);
124 }
125 template <typename ZoneAwarenessConfigT = ZoneAwarenessConfig>
126 ClusterConfig& WithZoneAwarenessConfig(ZoneAwarenessConfigT&& value) {
127 SetZoneAwarenessConfig(std::forward<ZoneAwarenessConfigT>(value));
128 return *this;
129 }
131
133
137 inline OpenSearchPartitionInstanceType GetDedicatedMasterType() const { return m_dedicatedMasterType; }
138 inline bool DedicatedMasterTypeHasBeenSet() const { return m_dedicatedMasterTypeHasBeenSet; }
140 m_dedicatedMasterTypeHasBeenSet = true;
141 m_dedicatedMasterType = value;
142 }
145 return *this;
146 }
148
150
154 inline int GetDedicatedMasterCount() const { return m_dedicatedMasterCount; }
155 inline bool DedicatedMasterCountHasBeenSet() const { return m_dedicatedMasterCountHasBeenSet; }
156 inline void SetDedicatedMasterCount(int value) {
157 m_dedicatedMasterCountHasBeenSet = true;
158 m_dedicatedMasterCount = value;
159 }
162 return *this;
163 }
165
167
170 inline bool GetWarmEnabled() const { return m_warmEnabled; }
171 inline bool WarmEnabledHasBeenSet() const { return m_warmEnabledHasBeenSet; }
172 inline void SetWarmEnabled(bool value) {
173 m_warmEnabledHasBeenSet = true;
174 m_warmEnabled = value;
175 }
176 inline ClusterConfig& WithWarmEnabled(bool value) {
177 SetWarmEnabled(value);
178 return *this;
179 }
181
183
186 inline OpenSearchWarmPartitionInstanceType GetWarmType() const { return m_warmType; }
187 inline bool WarmTypeHasBeenSet() const { return m_warmTypeHasBeenSet; }
189 m_warmTypeHasBeenSet = true;
190 m_warmType = value;
191 }
193 SetWarmType(value);
194 return *this;
195 }
197
199
202 inline int GetWarmCount() const { return m_warmCount; }
203 inline bool WarmCountHasBeenSet() const { return m_warmCountHasBeenSet; }
204 inline void SetWarmCount(int value) {
205 m_warmCountHasBeenSet = true;
206 m_warmCount = value;
207 }
208 inline ClusterConfig& WithWarmCount(int value) {
209 SetWarmCount(value);
210 return *this;
211 }
213
215
218 inline const ColdStorageOptions& GetColdStorageOptions() const { return m_coldStorageOptions; }
219 inline bool ColdStorageOptionsHasBeenSet() const { return m_coldStorageOptionsHasBeenSet; }
220 template <typename ColdStorageOptionsT = ColdStorageOptions>
221 void SetColdStorageOptions(ColdStorageOptionsT&& value) {
222 m_coldStorageOptionsHasBeenSet = true;
223 m_coldStorageOptions = std::forward<ColdStorageOptionsT>(value);
224 }
225 template <typename ColdStorageOptionsT = ColdStorageOptions>
226 ClusterConfig& WithColdStorageOptions(ColdStorageOptionsT&& value) {
227 SetColdStorageOptions(std::forward<ColdStorageOptionsT>(value));
228 return *this;
229 }
231
233
239 inline bool GetMultiAZWithStandbyEnabled() const { return m_multiAZWithStandbyEnabled; }
240 inline bool MultiAZWithStandbyEnabledHasBeenSet() const { return m_multiAZWithStandbyEnabledHasBeenSet; }
241 inline void SetMultiAZWithStandbyEnabled(bool value) {
242 m_multiAZWithStandbyEnabledHasBeenSet = true;
243 m_multiAZWithStandbyEnabled = value;
244 }
247 return *this;
248 }
250
252
255 inline const Aws::Vector<NodeOption>& GetNodeOptions() const { return m_nodeOptions; }
256 inline bool NodeOptionsHasBeenSet() const { return m_nodeOptionsHasBeenSet; }
257 template <typename NodeOptionsT = Aws::Vector<NodeOption>>
258 void SetNodeOptions(NodeOptionsT&& value) {
259 m_nodeOptionsHasBeenSet = true;
260 m_nodeOptions = std::forward<NodeOptionsT>(value);
261 }
262 template <typename NodeOptionsT = Aws::Vector<NodeOption>>
263 ClusterConfig& WithNodeOptions(NodeOptionsT&& value) {
264 SetNodeOptions(std::forward<NodeOptionsT>(value));
265 return *this;
266 }
267 template <typename NodeOptionsT = NodeOption>
268 ClusterConfig& AddNodeOptions(NodeOptionsT&& value) {
269 m_nodeOptionsHasBeenSet = true;
270 m_nodeOptions.emplace_back(std::forward<NodeOptionsT>(value));
271 return *this;
272 }
274 private:
276
277 int m_instanceCount{0};
278
279 bool m_dedicatedMasterEnabled{false};
280
281 bool m_zoneAwarenessEnabled{false};
282
283 ZoneAwarenessConfig m_zoneAwarenessConfig;
284
286
287 int m_dedicatedMasterCount{0};
288
289 bool m_warmEnabled{false};
290
292
293 int m_warmCount{0};
294
295 ColdStorageOptions m_coldStorageOptions;
296
297 bool m_multiAZWithStandbyEnabled{false};
298
299 Aws::Vector<NodeOption> m_nodeOptions;
300 bool m_instanceTypeHasBeenSet = false;
301 bool m_instanceCountHasBeenSet = false;
302 bool m_dedicatedMasterEnabledHasBeenSet = false;
303 bool m_zoneAwarenessEnabledHasBeenSet = false;
304 bool m_zoneAwarenessConfigHasBeenSet = false;
305 bool m_dedicatedMasterTypeHasBeenSet = false;
306 bool m_dedicatedMasterCountHasBeenSet = false;
307 bool m_warmEnabledHasBeenSet = false;
308 bool m_warmTypeHasBeenSet = false;
309 bool m_warmCountHasBeenSet = false;
310 bool m_coldStorageOptionsHasBeenSet = false;
311 bool m_multiAZWithStandbyEnabledHasBeenSet = false;
312 bool m_nodeOptionsHasBeenSet = false;
313};
314
315} // namespace Model
316} // namespace OpenSearchService
317} // namespace Aws
ClusterConfig & WithInstanceType(OpenSearchPartitionInstanceType value)
ClusterConfig & WithDedicatedMasterCount(int value)
void SetDedicatedMasterType(OpenSearchPartitionInstanceType value)
const ZoneAwarenessConfig & GetZoneAwarenessConfig() const
void SetZoneAwarenessConfig(ZoneAwarenessConfigT &&value)
ClusterConfig & WithInstanceCount(int value)
OpenSearchWarmPartitionInstanceType GetWarmType() const
OpenSearchPartitionInstanceType GetDedicatedMasterType() const
ClusterConfig & WithZoneAwarenessEnabled(bool value)
void SetColdStorageOptions(ColdStorageOptionsT &&value)
AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
ClusterConfig & WithZoneAwarenessConfig(ZoneAwarenessConfigT &&value)
const ColdStorageOptions & GetColdStorageOptions() const
ClusterConfig & WithWarmType(OpenSearchWarmPartitionInstanceType value)
ClusterConfig & WithDedicatedMasterEnabled(bool value)
AWS_OPENSEARCHSERVICE_API ClusterConfig()=default
void SetInstanceType(OpenSearchPartitionInstanceType value)
ClusterConfig & WithDedicatedMasterType(OpenSearchPartitionInstanceType value)
void SetWarmType(OpenSearchWarmPartitionInstanceType value)
AWS_OPENSEARCHSERVICE_API ClusterConfig(Aws::Utils::Json::JsonView jsonValue)
ClusterConfig & WithMultiAZWithStandbyEnabled(bool value)
ClusterConfig & WithColdStorageOptions(ColdStorageOptionsT &&value)
AWS_OPENSEARCHSERVICE_API ClusterConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
ClusterConfig & AddNodeOptions(NodeOptionsT &&value)
OpenSearchPartitionInstanceType GetInstanceType() const
const Aws::Vector< NodeOption > & GetNodeOptions() const
ClusterConfig & WithWarmEnabled(bool value)
ClusterConfig & WithNodeOptions(NodeOptionsT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue