/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes an instance state change.

See Also:

AWS * API Reference

*/ class InstanceStateChange { public: AWS_EC2_API InstanceStateChange(); AWS_EC2_API InstanceStateChange(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API InstanceStateChange& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The current state of the instance.

*/ inline const InstanceState& GetCurrentState() const{ return m_currentState; } /** *

The current state of the instance.

*/ inline bool CurrentStateHasBeenSet() const { return m_currentStateHasBeenSet; } /** *

The current state of the instance.

*/ inline void SetCurrentState(const InstanceState& value) { m_currentStateHasBeenSet = true; m_currentState = value; } /** *

The current state of the instance.

*/ inline void SetCurrentState(InstanceState&& value) { m_currentStateHasBeenSet = true; m_currentState = std::move(value); } /** *

The current state of the instance.

*/ inline InstanceStateChange& WithCurrentState(const InstanceState& value) { SetCurrentState(value); return *this;} /** *

The current state of the instance.

*/ inline InstanceStateChange& WithCurrentState(InstanceState&& value) { SetCurrentState(std::move(value)); return *this;} /** *

The ID of the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance.

*/ inline InstanceStateChange& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

*/ inline InstanceStateChange& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance.

*/ inline InstanceStateChange& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The previous state of the instance.

*/ inline const InstanceState& GetPreviousState() const{ return m_previousState; } /** *

The previous state of the instance.

*/ inline bool PreviousStateHasBeenSet() const { return m_previousStateHasBeenSet; } /** *

The previous state of the instance.

*/ inline void SetPreviousState(const InstanceState& value) { m_previousStateHasBeenSet = true; m_previousState = value; } /** *

The previous state of the instance.

*/ inline void SetPreviousState(InstanceState&& value) { m_previousStateHasBeenSet = true; m_previousState = std::move(value); } /** *

The previous state of the instance.

*/ inline InstanceStateChange& WithPreviousState(const InstanceState& value) { SetPreviousState(value); return *this;} /** *

The previous state of the instance.

*/ inline InstanceStateChange& WithPreviousState(InstanceState&& value) { SetPreviousState(std::move(value)); return *this;} private: InstanceState m_currentState; bool m_currentStateHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; InstanceState m_previousState; bool m_previousStateHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws