AWS SDK for C++  1.9.72
AWS SDK for C++
InstanceStateChange.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19  class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace EC2
23 {
24 namespace Model
25 {
26 
33  {
34  public:
38 
39  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40  void OutputToStream(Aws::OStream& oStream, const char* location) const;
41 
42 
46  inline const InstanceState& GetCurrentState() const{ return m_currentState; }
47 
51  inline bool CurrentStateHasBeenSet() const { return m_currentStateHasBeenSet; }
52 
56  inline void SetCurrentState(const InstanceState& value) { m_currentStateHasBeenSet = true; m_currentState = value; }
57 
61  inline void SetCurrentState(InstanceState&& value) { m_currentStateHasBeenSet = true; m_currentState = std::move(value); }
62 
66  inline InstanceStateChange& WithCurrentState(const InstanceState& value) { SetCurrentState(value); return *this;}
67 
71  inline InstanceStateChange& WithCurrentState(InstanceState&& value) { SetCurrentState(std::move(value)); return *this;}
72 
73 
77  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
78 
82  inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
83 
87  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
88 
92  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
93 
97  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
98 
102  inline InstanceStateChange& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
103 
107  inline InstanceStateChange& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
108 
112  inline InstanceStateChange& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
113 
114 
118  inline const InstanceState& GetPreviousState() const{ return m_previousState; }
119 
123  inline bool PreviousStateHasBeenSet() const { return m_previousStateHasBeenSet; }
124 
128  inline void SetPreviousState(const InstanceState& value) { m_previousStateHasBeenSet = true; m_previousState = value; }
129 
133  inline void SetPreviousState(InstanceState&& value) { m_previousStateHasBeenSet = true; m_previousState = std::move(value); }
134 
138  inline InstanceStateChange& WithPreviousState(const InstanceState& value) { SetPreviousState(value); return *this;}
139 
143  inline InstanceStateChange& WithPreviousState(InstanceState&& value) { SetPreviousState(std::move(value)); return *this;}
144 
145  private:
146 
147  InstanceState m_currentState;
148  bool m_currentStateHasBeenSet;
149 
150  Aws::String m_instanceId;
151  bool m_instanceIdHasBeenSet;
152 
153  InstanceState m_previousState;
154  bool m_previousStateHasBeenSet;
155  };
156 
157 } // namespace Model
158 } // namespace EC2
159 } // namespace Aws
Aws::EC2::Model::InstanceStateChange::WithInstanceId
InstanceStateChange & WithInstanceId(const char *value)
Definition: InstanceStateChange.h:112
Aws::EC2::Model::InstanceStateChange::InstanceStateChange
InstanceStateChange()
Aws::EC2::Model::InstanceStateChange::InstanceIdHasBeenSet
bool InstanceIdHasBeenSet() const
Definition: InstanceStateChange.h:82
Aws::EC2::Model::InstanceStateChange::WithInstanceId
InstanceStateChange & WithInstanceId(Aws::String &&value)
Definition: InstanceStateChange.h:107
Aws::EC2::Model::InstanceStateChange::SetInstanceId
void SetInstanceId(Aws::String &&value)
Definition: InstanceStateChange.h:92
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::InstanceStateChange::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::InstanceStateChange::SetCurrentState
void SetCurrentState(const InstanceState &value)
Definition: InstanceStateChange.h:56
Aws::EC2::Model::InstanceStateChange::PreviousStateHasBeenSet
bool PreviousStateHasBeenSet() const
Definition: InstanceStateChange.h:123
AWSStreamFwd.h
Aws::EC2::Model::InstanceStateChange::WithCurrentState
InstanceStateChange & WithCurrentState(const InstanceState &value)
Definition: InstanceStateChange.h:66
Aws::EC2::Model::InstanceState
Definition: InstanceState.h:32
Aws::EC2::Model::InstanceStateChange::operator=
InstanceStateChange & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::InstanceStateChange::SetPreviousState
void SetPreviousState(const InstanceState &value)
Definition: InstanceStateChange.h:128
Aws::EC2::Model::InstanceStateChange::WithInstanceId
InstanceStateChange & WithInstanceId(const Aws::String &value)
Definition: InstanceStateChange.h:102
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::InstanceStateChange::WithPreviousState
InstanceStateChange & WithPreviousState(const InstanceState &value)
Definition: InstanceStateChange.h:138
Aws::EC2::Model::InstanceStateChange::SetInstanceId
void SetInstanceId(const Aws::String &value)
Definition: InstanceStateChange.h:87
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::InstanceStateChange
Definition: InstanceStateChange.h:33
Aws::EC2::Model::InstanceStateChange::CurrentStateHasBeenSet
bool CurrentStateHasBeenSet() const
Definition: InstanceStateChange.h:51
Aws::EC2::Model::InstanceStateChange::InstanceStateChange
InstanceStateChange(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::InstanceStateChange::SetInstanceId
void SetInstanceId(const char *value)
Definition: InstanceStateChange.h:97
Aws::EC2::Model::InstanceStateChange::SetPreviousState
void SetPreviousState(InstanceState &&value)
Definition: InstanceStateChange.h:133
Aws::EC2::Model::InstanceStateChange::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::InstanceStateChange::GetCurrentState
const InstanceState & GetCurrentState() const
Definition: InstanceStateChange.h:46
Aws::EC2::Model::InstanceStateChange::WithPreviousState
InstanceStateChange & WithPreviousState(InstanceState &&value)
Definition: InstanceStateChange.h:143
AWSString.h
Aws::EC2::Model::InstanceStateChange::GetInstanceId
const Aws::String & GetInstanceId() const
Definition: InstanceStateChange.h:77
Aws::EC2::Model::InstanceStateChange::SetCurrentState
void SetCurrentState(InstanceState &&value)
Definition: InstanceStateChange.h:61
Aws::EC2::Model::InstanceStateChange::GetPreviousState
const InstanceState & GetPreviousState() const
Definition: InstanceStateChange.h:118
Aws
Definition: AccessManagementClient.h:15
InstanceState.h
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
index
int index
Definition: cJSON.h:181
EC2_EXPORTS.h
Aws::EC2::Model::InstanceStateChange::WithCurrentState
InstanceStateChange & WithCurrentState(InstanceState &&value)
Definition: InstanceStateChange.h:71