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

Describes the status of an instance.

See Also:

AWS * API Reference

*/ class InstanceStatus { public: AWS_EC2_API InstanceStatus(); AWS_EC2_API InstanceStatus(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API InstanceStatus& 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 Availability Zone of the instance.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone of the instance.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone of the instance.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone of the instance.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone of the instance.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone of the instance.

*/ inline InstanceStatus& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone of the instance.

*/ inline InstanceStatus& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone of the instance.

*/ inline InstanceStatus& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; } /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; } /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline InstanceStatus& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline InstanceStatus& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline InstanceStatus& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;} /** *

Any scheduled events associated with the instance.

*/ inline const Aws::Vector& GetEvents() const{ return m_events; } /** *

Any scheduled events associated with the instance.

*/ inline bool EventsHasBeenSet() const { return m_eventsHasBeenSet; } /** *

Any scheduled events associated with the instance.

*/ inline void SetEvents(const Aws::Vector& value) { m_eventsHasBeenSet = true; m_events = value; } /** *

Any scheduled events associated with the instance.

*/ inline void SetEvents(Aws::Vector&& value) { m_eventsHasBeenSet = true; m_events = std::move(value); } /** *

Any scheduled events associated with the instance.

*/ inline InstanceStatus& WithEvents(const Aws::Vector& value) { SetEvents(value); return *this;} /** *

Any scheduled events associated with the instance.

*/ inline InstanceStatus& WithEvents(Aws::Vector&& value) { SetEvents(std::move(value)); return *this;} /** *

Any scheduled events associated with the instance.

*/ inline InstanceStatus& AddEvents(const InstanceStatusEvent& value) { m_eventsHasBeenSet = true; m_events.push_back(value); return *this; } /** *

Any scheduled events associated with the instance.

*/ inline InstanceStatus& AddEvents(InstanceStatusEvent&& value) { m_eventsHasBeenSet = true; m_events.push_back(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 InstanceStatus& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

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

The ID of the instance.

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

The intended state of the instance. DescribeInstanceStatus requires * that an instance be in the running state.

*/ inline const InstanceState& GetInstanceState() const{ return m_instanceState; } /** *

The intended state of the instance. DescribeInstanceStatus requires * that an instance be in the running state.

*/ inline bool InstanceStateHasBeenSet() const { return m_instanceStateHasBeenSet; } /** *

The intended state of the instance. DescribeInstanceStatus requires * that an instance be in the running state.

*/ inline void SetInstanceState(const InstanceState& value) { m_instanceStateHasBeenSet = true; m_instanceState = value; } /** *

The intended state of the instance. DescribeInstanceStatus requires * that an instance be in the running state.

*/ inline void SetInstanceState(InstanceState&& value) { m_instanceStateHasBeenSet = true; m_instanceState = std::move(value); } /** *

The intended state of the instance. DescribeInstanceStatus requires * that an instance be in the running state.

*/ inline InstanceStatus& WithInstanceState(const InstanceState& value) { SetInstanceState(value); return *this;} /** *

The intended state of the instance. DescribeInstanceStatus requires * that an instance be in the running state.

*/ inline InstanceStatus& WithInstanceState(InstanceState&& value) { SetInstanceState(std::move(value)); return *this;} /** *

Reports impaired functionality that stems from issues internal to the * instance, such as impaired reachability.

*/ inline const InstanceStatusSummary& GetInstanceStatus() const{ return m_instanceStatus; } /** *

Reports impaired functionality that stems from issues internal to the * instance, such as impaired reachability.

*/ inline bool InstanceStatusHasBeenSet() const { return m_instanceStatusHasBeenSet; } /** *

Reports impaired functionality that stems from issues internal to the * instance, such as impaired reachability.

*/ inline void SetInstanceStatus(const InstanceStatusSummary& value) { m_instanceStatusHasBeenSet = true; m_instanceStatus = value; } /** *

Reports impaired functionality that stems from issues internal to the * instance, such as impaired reachability.

*/ inline void SetInstanceStatus(InstanceStatusSummary&& value) { m_instanceStatusHasBeenSet = true; m_instanceStatus = std::move(value); } /** *

Reports impaired functionality that stems from issues internal to the * instance, such as impaired reachability.

*/ inline InstanceStatus& WithInstanceStatus(const InstanceStatusSummary& value) { SetInstanceStatus(value); return *this;} /** *

Reports impaired functionality that stems from issues internal to the * instance, such as impaired reachability.

*/ inline InstanceStatus& WithInstanceStatus(InstanceStatusSummary&& value) { SetInstanceStatus(std::move(value)); return *this;} /** *

Reports impaired functionality that stems from issues related to the systems * that support an instance, such as hardware failures and network connectivity * problems.

*/ inline const InstanceStatusSummary& GetSystemStatus() const{ return m_systemStatus; } /** *

Reports impaired functionality that stems from issues related to the systems * that support an instance, such as hardware failures and network connectivity * problems.

*/ inline bool SystemStatusHasBeenSet() const { return m_systemStatusHasBeenSet; } /** *

Reports impaired functionality that stems from issues related to the systems * that support an instance, such as hardware failures and network connectivity * problems.

*/ inline void SetSystemStatus(const InstanceStatusSummary& value) { m_systemStatusHasBeenSet = true; m_systemStatus = value; } /** *

Reports impaired functionality that stems from issues related to the systems * that support an instance, such as hardware failures and network connectivity * problems.

*/ inline void SetSystemStatus(InstanceStatusSummary&& value) { m_systemStatusHasBeenSet = true; m_systemStatus = std::move(value); } /** *

Reports impaired functionality that stems from issues related to the systems * that support an instance, such as hardware failures and network connectivity * problems.

*/ inline InstanceStatus& WithSystemStatus(const InstanceStatusSummary& value) { SetSystemStatus(value); return *this;} /** *

Reports impaired functionality that stems from issues related to the systems * that support an instance, such as hardware failures and network connectivity * problems.

*/ inline InstanceStatus& WithSystemStatus(InstanceStatusSummary&& value) { SetSystemStatus(std::move(value)); return *this;} private: Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; Aws::String m_outpostArn; bool m_outpostArnHasBeenSet = false; Aws::Vector m_events; bool m_eventsHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; InstanceState m_instanceState; bool m_instanceStateHasBeenSet = false; InstanceStatusSummary m_instanceStatus; bool m_instanceStatusHasBeenSet = false; InstanceStatusSummary m_systemStatus; bool m_systemStatusHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws