AWS SDK for C++

AWS SDK for C++ Version 1.11.752

Loading...
Searching...
No Matches
MixedInstancesPolicy.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/model/InstancesDistribution.h>
9#include <aws/autoscaling/model/LaunchTemplate.h>
10#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace AutoScaling {
21namespace Model {
22
35 public:
36 AWS_AUTOSCALING_API MixedInstancesPolicy() = default;
37 AWS_AUTOSCALING_API MixedInstancesPolicy(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_AUTOSCALING_API MixedInstancesPolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
44
48 inline const LaunchTemplate& GetLaunchTemplate() const { return m_launchTemplate; }
49 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
50 template <typename LaunchTemplateT = LaunchTemplate>
51 void SetLaunchTemplate(LaunchTemplateT&& value) {
52 m_launchTemplateHasBeenSet = true;
53 m_launchTemplate = std::forward<LaunchTemplateT>(value);
54 }
55 template <typename LaunchTemplateT = LaunchTemplate>
56 MixedInstancesPolicy& WithLaunchTemplate(LaunchTemplateT&& value) {
57 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
58 return *this;
59 }
61
63
66 inline const InstancesDistribution& GetInstancesDistribution() const { return m_instancesDistribution; }
67 inline bool InstancesDistributionHasBeenSet() const { return m_instancesDistributionHasBeenSet; }
68 template <typename InstancesDistributionT = InstancesDistribution>
69 void SetInstancesDistribution(InstancesDistributionT&& value) {
70 m_instancesDistributionHasBeenSet = true;
71 m_instancesDistribution = std::forward<InstancesDistributionT>(value);
72 }
73 template <typename InstancesDistributionT = InstancesDistribution>
74 MixedInstancesPolicy& WithInstancesDistribution(InstancesDistributionT&& value) {
75 SetInstancesDistribution(std::forward<InstancesDistributionT>(value));
76 return *this;
77 }
79 private:
80 LaunchTemplate m_launchTemplate;
81
82 InstancesDistribution m_instancesDistribution;
83 bool m_launchTemplateHasBeenSet = false;
84 bool m_instancesDistributionHasBeenSet = false;
85};
86
87} // namespace Model
88} // namespace AutoScaling
89} // namespace Aws
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_AUTOSCALING_API MixedInstancesPolicy()=default
AWS_AUTOSCALING_API MixedInstancesPolicy(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetInstancesDistribution(InstancesDistributionT &&value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_AUTOSCALING_API MixedInstancesPolicy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
MixedInstancesPolicy & WithLaunchTemplate(LaunchTemplateT &&value)
MixedInstancesPolicy & WithInstancesDistribution(InstancesDistributionT &&value)
const InstancesDistribution & GetInstancesDistribution() const
std::basic_ostream< char, std::char_traits< char > > OStream