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

Describes the virtual private server (or instance) * status.

See Also:

AWS * API Reference

*/ class InstanceState { public: AWS_LIGHTSAIL_API InstanceState(); AWS_LIGHTSAIL_API InstanceState(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API InstanceState& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The status code for the instance.

*/ inline int GetCode() const{ return m_code; } /** *

The status code for the instance.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The status code for the instance.

*/ inline void SetCode(int value) { m_codeHasBeenSet = true; m_code = value; } /** *

The status code for the instance.

*/ inline InstanceState& WithCode(int value) { SetCode(value); return *this;} /** *

The state of the instance (e.g., running or * pending).

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The state of the instance (e.g., running or * pending).

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The state of the instance (e.g., running or * pending).

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The state of the instance (e.g., running or * pending).

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The state of the instance (e.g., running or * pending).

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The state of the instance (e.g., running or * pending).

*/ inline InstanceState& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The state of the instance (e.g., running or * pending).

*/ inline InstanceState& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The state of the instance (e.g., running or * pending).

*/ inline InstanceState& WithName(const char* value) { SetName(value); return *this;} private: int m_code; bool m_codeHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws