AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
InstanceEventWindow.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/InstanceEventWindowAssociationTarget.h>
12#include <aws/ec2/model/InstanceEventWindowState.h>
13#include <aws/ec2/model/InstanceEventWindowTimeRange.h>
14#include <aws/ec2/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Xml {
21class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2 {
25namespace Model {
26
33 public:
34 AWS_EC2_API InstanceEventWindow() = default;
35 AWS_EC2_API InstanceEventWindow(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
45 inline const Aws::String& GetInstanceEventWindowId() const { return m_instanceEventWindowId; }
46 inline bool InstanceEventWindowIdHasBeenSet() const { return m_instanceEventWindowIdHasBeenSet; }
47 template <typename InstanceEventWindowIdT = Aws::String>
48 void SetInstanceEventWindowId(InstanceEventWindowIdT&& value) {
49 m_instanceEventWindowIdHasBeenSet = true;
50 m_instanceEventWindowId = std::forward<InstanceEventWindowIdT>(value);
51 }
52 template <typename InstanceEventWindowIdT = Aws::String>
53 InstanceEventWindow& WithInstanceEventWindowId(InstanceEventWindowIdT&& value) {
54 SetInstanceEventWindowId(std::forward<InstanceEventWindowIdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::Vector<InstanceEventWindowTimeRange>& GetTimeRanges() const { return m_timeRanges; }
64 inline bool TimeRangesHasBeenSet() const { return m_timeRangesHasBeenSet; }
65 template <typename TimeRangesT = Aws::Vector<InstanceEventWindowTimeRange>>
66 void SetTimeRanges(TimeRangesT&& value) {
67 m_timeRangesHasBeenSet = true;
68 m_timeRanges = std::forward<TimeRangesT>(value);
69 }
70 template <typename TimeRangesT = Aws::Vector<InstanceEventWindowTimeRange>>
71 InstanceEventWindow& WithTimeRanges(TimeRangesT&& value) {
72 SetTimeRanges(std::forward<TimeRangesT>(value));
73 return *this;
74 }
75 template <typename TimeRangesT = InstanceEventWindowTimeRange>
76 InstanceEventWindow& AddTimeRanges(TimeRangesT&& value) {
77 m_timeRangesHasBeenSet = true;
78 m_timeRanges.emplace_back(std::forward<TimeRangesT>(value));
79 return *this;
80 }
82
84
87 inline const Aws::String& GetName() const { return m_name; }
88 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
89 template <typename NameT = Aws::String>
90 void SetName(NameT&& value) {
91 m_nameHasBeenSet = true;
92 m_name = std::forward<NameT>(value);
93 }
94 template <typename NameT = Aws::String>
95 InstanceEventWindow& WithName(NameT&& value) {
96 SetName(std::forward<NameT>(value));
97 return *this;
98 }
100
102
105 inline const Aws::String& GetCronExpression() const { return m_cronExpression; }
106 inline bool CronExpressionHasBeenSet() const { return m_cronExpressionHasBeenSet; }
107 template <typename CronExpressionT = Aws::String>
108 void SetCronExpression(CronExpressionT&& value) {
109 m_cronExpressionHasBeenSet = true;
110 m_cronExpression = std::forward<CronExpressionT>(value);
111 }
112 template <typename CronExpressionT = Aws::String>
113 InstanceEventWindow& WithCronExpression(CronExpressionT&& value) {
114 SetCronExpression(std::forward<CronExpressionT>(value));
115 return *this;
116 }
118
120
123 inline const InstanceEventWindowAssociationTarget& GetAssociationTarget() const { return m_associationTarget; }
124 inline bool AssociationTargetHasBeenSet() const { return m_associationTargetHasBeenSet; }
125 template <typename AssociationTargetT = InstanceEventWindowAssociationTarget>
126 void SetAssociationTarget(AssociationTargetT&& value) {
127 m_associationTargetHasBeenSet = true;
128 m_associationTarget = std::forward<AssociationTargetT>(value);
129 }
130 template <typename AssociationTargetT = InstanceEventWindowAssociationTarget>
131 InstanceEventWindow& WithAssociationTarget(AssociationTargetT&& value) {
132 SetAssociationTarget(std::forward<AssociationTargetT>(value));
133 return *this;
134 }
136
138
141 inline InstanceEventWindowState GetState() const { return m_state; }
142 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
144 m_stateHasBeenSet = true;
145 m_state = value;
146 }
148 SetState(value);
149 return *this;
150 }
152
154
157 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
158 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
159 template <typename TagsT = Aws::Vector<Tag>>
160 void SetTags(TagsT&& value) {
161 m_tagsHasBeenSet = true;
162 m_tags = std::forward<TagsT>(value);
163 }
164 template <typename TagsT = Aws::Vector<Tag>>
166 SetTags(std::forward<TagsT>(value));
167 return *this;
168 }
169 template <typename TagsT = Tag>
170 InstanceEventWindow& AddTags(TagsT&& value) {
171 m_tagsHasBeenSet = true;
172 m_tags.emplace_back(std::forward<TagsT>(value));
173 return *this;
174 }
176 private:
177 Aws::String m_instanceEventWindowId;
178
180
181 Aws::String m_name;
182
183 Aws::String m_cronExpression;
184
185 InstanceEventWindowAssociationTarget m_associationTarget;
186
188
189 Aws::Vector<Tag> m_tags;
190 bool m_instanceEventWindowIdHasBeenSet = false;
191 bool m_timeRangesHasBeenSet = false;
192 bool m_nameHasBeenSet = false;
193 bool m_cronExpressionHasBeenSet = false;
194 bool m_associationTargetHasBeenSet = false;
195 bool m_stateHasBeenSet = false;
196 bool m_tagsHasBeenSet = false;
197};
198
199} // namespace Model
200} // namespace EC2
201} // namespace Aws
InstanceEventWindow & WithCronExpression(CronExpressionT &&value)
InstanceEventWindow & AddTags(TagsT &&value)
void SetTimeRanges(TimeRangesT &&value)
const Aws::Vector< InstanceEventWindowTimeRange > & GetTimeRanges() const
InstanceEventWindow & WithTimeRanges(TimeRangesT &&value)
const Aws::String & GetCronExpression() const
InstanceEventWindow & WithInstanceEventWindowId(InstanceEventWindowIdT &&value)
AWS_EC2_API InstanceEventWindow()=default
const Aws::String & GetInstanceEventWindowId() const
InstanceEventWindow & WithTags(TagsT &&value)
InstanceEventWindow & WithAssociationTarget(AssociationTargetT &&value)
InstanceEventWindow & AddTimeRanges(TimeRangesT &&value)
const Aws::String & GetName() const
void SetState(InstanceEventWindowState value)
AWS_EC2_API InstanceEventWindow(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetInstanceEventWindowId(InstanceEventWindowIdT &&value)
void SetCronExpression(CronExpressionT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
InstanceEventWindow & WithName(NameT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
InstanceEventWindowState GetState() const
void SetAssociationTarget(AssociationTargetT &&value)
const InstanceEventWindowAssociationTarget & GetAssociationTarget() const
InstanceEventWindow & WithState(InstanceEventWindowState value)
const Aws::Vector< Tag > & GetTags() const
AWS_EC2_API InstanceEventWindow & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream