/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace EMR { namespace Model { /** *

A tuple that provides information about an error that caused a cluster to * terminate.

See Also:

AWS * API Reference

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

The name or code associated with the error.

*/ inline const Aws::String& GetErrorCode() const{ return m_errorCode; } /** *

The name or code associated with the error.

*/ inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; } /** *

The name or code associated with the error.

*/ inline void SetErrorCode(const Aws::String& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; } /** *

The name or code associated with the error.

*/ inline void SetErrorCode(Aws::String&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); } /** *

The name or code associated with the error.

*/ inline void SetErrorCode(const char* value) { m_errorCodeHasBeenSet = true; m_errorCode.assign(value); } /** *

The name or code associated with the error.

*/ inline ErrorDetail& WithErrorCode(const Aws::String& value) { SetErrorCode(value); return *this;} /** *

The name or code associated with the error.

*/ inline ErrorDetail& WithErrorCode(Aws::String&& value) { SetErrorCode(std::move(value)); return *this;} /** *

The name or code associated with the error.

*/ inline ErrorDetail& WithErrorCode(const char* value) { SetErrorCode(value); return *this;} /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline const Aws::Vector>& GetErrorData() const{ return m_errorData; } /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline bool ErrorDataHasBeenSet() const { return m_errorDataHasBeenSet; } /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline void SetErrorData(const Aws::Vector>& value) { m_errorDataHasBeenSet = true; m_errorData = value; } /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline void SetErrorData(Aws::Vector>&& value) { m_errorDataHasBeenSet = true; m_errorData = std::move(value); } /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline ErrorDetail& WithErrorData(const Aws::Vector>& value) { SetErrorData(value); return *this;} /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline ErrorDetail& WithErrorData(Aws::Vector>&& value) { SetErrorData(std::move(value)); return *this;} /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline ErrorDetail& AddErrorData(const Aws::Map& value) { m_errorDataHasBeenSet = true; m_errorData.push_back(value); return *this; } /** *

A list of key value pairs that provides contextual information about why an * error occured.

*/ inline ErrorDetail& AddErrorData(Aws::Map&& value) { m_errorDataHasBeenSet = true; m_errorData.push_back(std::move(value)); return *this; } /** *

A message that describes the error.

*/ inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; } /** *

A message that describes the error.

*/ inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; } /** *

A message that describes the error.

*/ inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; } /** *

A message that describes the error.

*/ inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); } /** *

A message that describes the error.

*/ inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); } /** *

A message that describes the error.

*/ inline ErrorDetail& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;} /** *

A message that describes the error.

*/ inline ErrorDetail& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;} /** *

A message that describes the error.

*/ inline ErrorDetail& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} private: Aws::String m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::Vector> m_errorData; bool m_errorDataHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws