AWS SDK for C++

AWS SDK for C++ Version 1.11.889

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
41 public:
42 AWS_AUTOSCALING_API MixedInstancesPolicy() = default;
43 AWS_AUTOSCALING_API MixedInstancesPolicy(const Aws::Utils::Xml::XmlNode& xmlNode);
44 AWS_AUTOSCALING_API MixedInstancesPolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45
46 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
48
50
54 inline const LaunchTemplate& GetLaunchTemplate() const { return m_launchTemplate; }
55 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
56 template <typename LaunchTemplateT = LaunchTemplate>
57 void SetLaunchTemplate(LaunchTemplateT&& value) {
58 m_launchTemplateHasBeenSet = true;
59 m_launchTemplate = std::forward<LaunchTemplateT>(value);
60 }
61 template <typename LaunchTemplateT = LaunchTemplate>
62 MixedInstancesPolicy& WithLaunchTemplate(LaunchTemplateT&& value) {
63 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
64 return *this;
65 }
67
69
72 inline const InstancesDistribution& GetInstancesDistribution() const { return m_instancesDistribution; }
73 inline bool InstancesDistributionHasBeenSet() const { return m_instancesDistributionHasBeenSet; }
74 template <typename InstancesDistributionT = InstancesDistribution>
75 void SetInstancesDistribution(InstancesDistributionT&& value) {
76 m_instancesDistributionHasBeenSet = true;
77 m_instancesDistribution = std::forward<InstancesDistributionT>(value);
78 }
79 template <typename InstancesDistributionT = InstancesDistribution>
80 MixedInstancesPolicy& WithInstancesDistribution(InstancesDistributionT&& value) {
81 SetInstancesDistribution(std::forward<InstancesDistributionT>(value));
82 return *this;
83 }
85 private:
86 LaunchTemplate m_launchTemplate;
87
88 InstancesDistribution m_instancesDistribution;
89 bool m_launchTemplateHasBeenSet = false;
90 bool m_instancesDistributionHasBeenSet = false;
91};
92
93} // namespace Model
94} // namespace AutoScaling
95} // 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