AWS SDK for C++  0.12.9
AWS SDK for C++
InstanceStateChange.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace EC2
31 {
32 namespace Model
33 {
34 
39  {
40  public:
43  InstanceStateChange& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
51  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
52 
56  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
57 
61  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
62 
66  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
67 
71  inline InstanceStateChange& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
72 
76  inline InstanceStateChange& WithInstanceId(Aws::String&& value) { SetInstanceId(value); return *this;}
77 
81  inline InstanceStateChange& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
82 
86  inline const InstanceState& GetCurrentState() const{ return m_currentState; }
87 
91  inline void SetCurrentState(const InstanceState& value) { m_currentStateHasBeenSet = true; m_currentState = value; }
92 
96  inline void SetCurrentState(InstanceState&& value) { m_currentStateHasBeenSet = true; m_currentState = value; }
97 
101  inline InstanceStateChange& WithCurrentState(const InstanceState& value) { SetCurrentState(value); return *this;}
102 
106  inline InstanceStateChange& WithCurrentState(InstanceState&& value) { SetCurrentState(value); return *this;}
107 
111  inline const InstanceState& GetPreviousState() const{ return m_previousState; }
112 
116  inline void SetPreviousState(const InstanceState& value) { m_previousStateHasBeenSet = true; m_previousState = value; }
117 
121  inline void SetPreviousState(InstanceState&& value) { m_previousStateHasBeenSet = true; m_previousState = value; }
122 
126  inline InstanceStateChange& WithPreviousState(const InstanceState& value) { SetPreviousState(value); return *this;}
127 
131  inline InstanceStateChange& WithPreviousState(InstanceState&& value) { SetPreviousState(value); return *this;}
132 
133  private:
134  Aws::String m_instanceId;
135  bool m_instanceIdHasBeenSet;
136  InstanceState m_currentState;
137  bool m_currentStateHasBeenSet;
138  InstanceState m_previousState;
139  bool m_previousStateHasBeenSet;
140  };
141 
142 } // namespace Model
143 } // namespace EC2
144 } // namespace Aws
void SetInstanceId(Aws::String &&value)
InstanceStateChange & WithCurrentState(InstanceState &&value)
InstanceStateChange & WithCurrentState(const InstanceState &value)
void SetCurrentState(const InstanceState &value)
InstanceStateChange & WithInstanceId(const char *value)
void SetCurrentState(InstanceState &&value)
InstanceStateChange & WithInstanceId(const Aws::String &value)
InstanceStateChange & WithPreviousState(InstanceState &&value)
InstanceStateChange & WithInstanceId(Aws::String &&value)
const InstanceState & GetPreviousState() const
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const InstanceState & GetCurrentState() const
InstanceStateChange & WithPreviousState(const InstanceState &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetInstanceId(const Aws::String &value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
const Aws::String & GetInstanceId() const
void SetPreviousState(const InstanceState &value)
JSON (JavaScript Object Notation).
void SetPreviousState(InstanceState &&value)