AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
InstanceStateChange.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/model/InstanceState.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Xml
18{
19 class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2
23{
24namespace Model
25{
26
33 {
34 public:
35 AWS_EC2_API InstanceStateChange() = default;
36 AWS_EC2_API InstanceStateChange(const Aws::Utils::Xml::XmlNode& xmlNode);
38
39 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
41
42
44
47 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
48 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
49 template<typename InstanceIdT = Aws::String>
50 void SetInstanceId(InstanceIdT&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::forward<InstanceIdT>(value); }
51 template<typename InstanceIdT = Aws::String>
52 InstanceStateChange& WithInstanceId(InstanceIdT&& value) { SetInstanceId(std::forward<InstanceIdT>(value)); return *this;}
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) { m_currentStateHasBeenSet = true; m_currentState = std::forward<CurrentStateT>(value); }
63 template<typename CurrentStateT = InstanceState>
64 InstanceStateChange& WithCurrentState(CurrentStateT&& value) { SetCurrentState(std::forward<CurrentStateT>(value)); return *this;}
66
68
71 inline const InstanceState& GetPreviousState() const { return m_previousState; }
72 inline bool PreviousStateHasBeenSet() const { return m_previousStateHasBeenSet; }
73 template<typename PreviousStateT = InstanceState>
74 void SetPreviousState(PreviousStateT&& value) { m_previousStateHasBeenSet = true; m_previousState = std::forward<PreviousStateT>(value); }
75 template<typename PreviousStateT = InstanceState>
76 InstanceStateChange& WithPreviousState(PreviousStateT&& value) { SetPreviousState(std::forward<PreviousStateT>(value)); return *this;}
78 private:
79
80 Aws::String m_instanceId;
81 bool m_instanceIdHasBeenSet = false;
82
83 InstanceState m_currentState;
84 bool m_currentStateHasBeenSet = false;
85
86 InstanceState m_previousState;
87 bool m_previousStateHasBeenSet = false;
88 };
89
90} // namespace Model
91} // namespace EC2
92} // 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