AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ReportInstanceStatusRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2Request.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/ReportInstanceReasonCodes.h>
13#include <aws/ec2/model/ReportStatusType.h>
14
15#include <utility>
16
17namespace Aws {
18namespace EC2 {
19namespace Model {
20
24 public:
25 AWS_EC2_API ReportInstanceStatusRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "ReportInstanceStatus"; }
32
33 AWS_EC2_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
46 inline bool GetDryRun() const { return m_dryRun; }
47 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
48 inline void SetDryRun(bool value) {
49 m_dryRunHasBeenSet = true;
50 m_dryRun = value;
51 }
53 SetDryRun(value);
54 return *this;
55 }
57
59
62 inline const Aws::Vector<Aws::String>& GetInstances() const { return m_instances; }
63 inline bool InstancesHasBeenSet() const { return m_instancesHasBeenSet; }
64 template <typename InstancesT = Aws::Vector<Aws::String>>
65 void SetInstances(InstancesT&& value) {
66 m_instancesHasBeenSet = true;
67 m_instances = std::forward<InstancesT>(value);
68 }
69 template <typename InstancesT = Aws::Vector<Aws::String>>
71 SetInstances(std::forward<InstancesT>(value));
72 return *this;
73 }
74 template <typename InstancesT = Aws::String>
76 m_instancesHasBeenSet = true;
77 m_instances.emplace_back(std::forward<InstancesT>(value));
78 return *this;
79 }
81
83
86 inline ReportStatusType GetStatus() const { return m_status; }
87 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
88 inline void SetStatus(ReportStatusType value) {
89 m_statusHasBeenSet = true;
90 m_status = value;
91 }
93 SetStatus(value);
94 return *this;
95 }
97
99
102 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
103 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
104 template <typename StartTimeT = Aws::Utils::DateTime>
105 void SetStartTime(StartTimeT&& value) {
106 m_startTimeHasBeenSet = true;
107 m_startTime = std::forward<StartTimeT>(value);
108 }
109 template <typename StartTimeT = Aws::Utils::DateTime>
111 SetStartTime(std::forward<StartTimeT>(value));
112 return *this;
113 }
115
117
120 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
121 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
122 template <typename EndTimeT = Aws::Utils::DateTime>
123 void SetEndTime(EndTimeT&& value) {
124 m_endTimeHasBeenSet = true;
125 m_endTime = std::forward<EndTimeT>(value);
126 }
127 template <typename EndTimeT = Aws::Utils::DateTime>
129 SetEndTime(std::forward<EndTimeT>(value));
130 return *this;
131 }
133
135
152 inline const Aws::Vector<ReportInstanceReasonCodes>& GetReasonCodes() const { return m_reasonCodes; }
153 inline bool ReasonCodesHasBeenSet() const { return m_reasonCodesHasBeenSet; }
154 template <typename ReasonCodesT = Aws::Vector<ReportInstanceReasonCodes>>
155 void SetReasonCodes(ReasonCodesT&& value) {
156 m_reasonCodesHasBeenSet = true;
157 m_reasonCodes = std::forward<ReasonCodesT>(value);
158 }
159 template <typename ReasonCodesT = Aws::Vector<ReportInstanceReasonCodes>>
161 SetReasonCodes(std::forward<ReasonCodesT>(value));
162 return *this;
163 }
165 m_reasonCodesHasBeenSet = true;
166 m_reasonCodes.push_back(value);
167 return *this;
168 }
170 private:
171 bool m_dryRun{false};
172
173 Aws::Vector<Aws::String> m_instances;
174
176
177 Aws::Utils::DateTime m_startTime{};
178
179 Aws::Utils::DateTime m_endTime{};
180
182 bool m_dryRunHasBeenSet = false;
183 bool m_instancesHasBeenSet = false;
184 bool m_statusHasBeenSet = false;
185 bool m_startTimeHasBeenSet = false;
186 bool m_endTimeHasBeenSet = false;
187 bool m_reasonCodesHasBeenSet = false;
188};
189
190} // namespace Model
191} // namespace EC2
192} // namespace Aws
ReportInstanceStatusRequest & AddInstances(InstancesT &&value)
ReportInstanceStatusRequest & WithDryRun(bool value)
AWS_EC2_API ReportInstanceStatusRequest()=default
ReportInstanceStatusRequest & WithInstances(InstancesT &&value)
ReportInstanceStatusRequest & WithEndTime(EndTimeT &&value)
ReportInstanceStatusRequest & AddReasonCodes(ReportInstanceReasonCodes value)
ReportInstanceStatusRequest & WithReasonCodes(ReasonCodesT &&value)
const Aws::Vector< ReportInstanceReasonCodes > & GetReasonCodes() const
const Aws::Vector< Aws::String > & GetInstances() const
virtual const char * GetServiceRequestName() const override
AWS_EC2_API Aws::String SerializePayload() const override
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
ReportInstanceStatusRequest & WithStartTime(StartTimeT &&value)
ReportInstanceStatusRequest & WithStatus(ReportStatusType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector