AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
InstanceStateChange.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/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/InstanceState.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace EC2 {
21namespace Model {
22
29 public:
30 AWS_EC2_API InstanceStateChange() = default;
31 AWS_EC2_API InstanceStateChange(const Aws::Utils::Xml::XmlNode& xmlNode);
33
34 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
35 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
36
38
41 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
42 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
43 template <typename InstanceIdT = Aws::String>
44 void SetInstanceId(InstanceIdT&& value) {
45 m_instanceIdHasBeenSet = true;
46 m_instanceId = std::forward<InstanceIdT>(value);
47 }
48 template <typename InstanceIdT = Aws::String>
49 InstanceStateChange& WithInstanceId(InstanceIdT&& value) {
50 SetInstanceId(std::forward<InstanceIdT>(value));
51 return *this;
52 }
54
56
59 inline const InstanceState& GetCurrentState() const { return m_currentState; }
60 inline bool CurrentStateHasBeenSet() const { return m_currentStateHasBeenSet; }
61 template <typename CurrentStateT = InstanceState>
62 void SetCurrentState(CurrentStateT&& value) {
63 m_currentStateHasBeenSet = true;
64 m_currentState = std::forward<CurrentStateT>(value);
65 }
66 template <typename CurrentStateT = InstanceState>
67 InstanceStateChange& WithCurrentState(CurrentStateT&& value) {
68 SetCurrentState(std::forward<CurrentStateT>(value));
69 return *this;
70 }
72
74
77 inline const InstanceState& GetPreviousState() const { return m_previousState; }
78 inline bool PreviousStateHasBeenSet() const { return m_previousStateHasBeenSet; }
79 template <typename PreviousStateT = InstanceState>
80 void SetPreviousState(PreviousStateT&& value) {
81 m_previousStateHasBeenSet = true;
82 m_previousState = std::forward<PreviousStateT>(value);
83 }
84 template <typename PreviousStateT = InstanceState>
85 InstanceStateChange& WithPreviousState(PreviousStateT&& value) {
86 SetPreviousState(std::forward<PreviousStateT>(value));
87 return *this;
88 }
90 private:
91 Aws::String m_instanceId;
92
93 InstanceState m_currentState;
94
95 InstanceState m_previousState;
96 bool m_instanceIdHasBeenSet = false;
97 bool m_currentStateHasBeenSet = false;
98 bool m_previousStateHasBeenSet = false;
99};
100
101} // namespace Model
102} // namespace EC2
103} // namespace Aws
InstanceStateChange & WithCurrentState(CurrentStateT &&value)
InstanceStateChange & WithPreviousState(PreviousStateT &&value)
AWS_EC2_API InstanceStateChange(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetCurrentState(CurrentStateT &&value)
AWS_EC2_API InstanceStateChange & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const InstanceState & GetPreviousState() const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
InstanceStateChange & WithInstanceId(InstanceIdT &&value)
void SetInstanceId(InstanceIdT &&value)
const Aws::String & GetInstanceId() const
AWS_EC2_API InstanceStateChange()=default
const InstanceState & GetCurrentState() const
void SetPreviousState(PreviousStateT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream