/** * 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 OpsWorks { namespace Model { /** *

Describes an AWS OpsWorks Stacks service error.

See Also:

AWS * API Reference

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

The error ID.

*/ inline const Aws::String& GetServiceErrorId() const{ return m_serviceErrorId; } /** *

The error ID.

*/ inline bool ServiceErrorIdHasBeenSet() const { return m_serviceErrorIdHasBeenSet; } /** *

The error ID.

*/ inline void SetServiceErrorId(const Aws::String& value) { m_serviceErrorIdHasBeenSet = true; m_serviceErrorId = value; } /** *

The error ID.

*/ inline void SetServiceErrorId(Aws::String&& value) { m_serviceErrorIdHasBeenSet = true; m_serviceErrorId = std::move(value); } /** *

The error ID.

*/ inline void SetServiceErrorId(const char* value) { m_serviceErrorIdHasBeenSet = true; m_serviceErrorId.assign(value); } /** *

The error ID.

*/ inline ServiceError& WithServiceErrorId(const Aws::String& value) { SetServiceErrorId(value); return *this;} /** *

The error ID.

*/ inline ServiceError& WithServiceErrorId(Aws::String&& value) { SetServiceErrorId(std::move(value)); return *this;} /** *

The error ID.

*/ inline ServiceError& WithServiceErrorId(const char* value) { SetServiceErrorId(value); return *this;} /** *

The stack ID.

*/ inline const Aws::String& GetStackId() const{ return m_stackId; } /** *

The stack ID.

*/ inline bool StackIdHasBeenSet() const { return m_stackIdHasBeenSet; } /** *

The stack ID.

*/ inline void SetStackId(const Aws::String& value) { m_stackIdHasBeenSet = true; m_stackId = value; } /** *

The stack ID.

*/ inline void SetStackId(Aws::String&& value) { m_stackIdHasBeenSet = true; m_stackId = std::move(value); } /** *

The stack ID.

*/ inline void SetStackId(const char* value) { m_stackIdHasBeenSet = true; m_stackId.assign(value); } /** *

The stack ID.

*/ inline ServiceError& WithStackId(const Aws::String& value) { SetStackId(value); return *this;} /** *

The stack ID.

*/ inline ServiceError& WithStackId(Aws::String&& value) { SetStackId(std::move(value)); return *this;} /** *

The stack ID.

*/ inline ServiceError& WithStackId(const char* value) { SetStackId(value); return *this;} /** *

The instance ID.

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

The instance ID.

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

The instance ID.

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

The instance ID.

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

The instance ID.

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

The instance ID.

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

The instance ID.

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

The instance ID.

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

The error type.

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

The error type.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The error type.

*/ inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The error type.

*/ inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The error type.

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

The error type.

*/ inline ServiceError& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

The error type.

*/ inline ServiceError& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

The error type.

*/ inline ServiceError& WithType(const char* value) { SetType(value); return *this;} /** *

A message that describes the error.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

A message that describes the error.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

A message that describes the error.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

A message that describes the error.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

A message that describes the error.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

A message that describes the error.

*/ inline ServiceError& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

A message that describes the error.

*/ inline ServiceError& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

A message that describes the error.

*/ inline ServiceError& WithMessage(const char* value) { SetMessage(value); return *this;} /** *

When the error occurred.

*/ inline const Aws::String& GetCreatedAt() const{ return m_createdAt; } /** *

When the error occurred.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

When the error occurred.

*/ inline void SetCreatedAt(const Aws::String& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

When the error occurred.

*/ inline void SetCreatedAt(Aws::String&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

When the error occurred.

*/ inline void SetCreatedAt(const char* value) { m_createdAtHasBeenSet = true; m_createdAt.assign(value); } /** *

When the error occurred.

*/ inline ServiceError& WithCreatedAt(const Aws::String& value) { SetCreatedAt(value); return *this;} /** *

When the error occurred.

*/ inline ServiceError& WithCreatedAt(Aws::String&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

When the error occurred.

*/ inline ServiceError& WithCreatedAt(const char* value) { SetCreatedAt(value); return *this;} private: Aws::String m_serviceErrorId; bool m_serviceErrorIdHasBeenSet = false; Aws::String m_stackId; bool m_stackIdHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_type; bool m_typeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; Aws::String m_createdAt; bool m_createdAtHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws