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

Describes an error that occurred while processing a document in a batch. The * operation returns on BatchItemError object for each document that * contained an error.

See Also:

AWS * API Reference

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

The zero-based index of the document in the input list.

*/ inline int GetIndex() const{ return m_index; } /** *

The zero-based index of the document in the input list.

*/ inline bool IndexHasBeenSet() const { return m_indexHasBeenSet; } /** *

The zero-based index of the document in the input list.

*/ inline void SetIndex(int value) { m_indexHasBeenSet = true; m_index = value; } /** *

The zero-based index of the document in the input list.

*/ inline BatchItemError& WithIndex(int value) { SetIndex(value); return *this;} /** *

The numeric error code of the error.

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

The numeric error code of the error.

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

The numeric error code of the error.

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

The numeric error code of the error.

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

The numeric error code of the error.

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

The numeric error code of the error.

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

The numeric error code of the error.

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

The numeric error code of the error.

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

A text description of the error.

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

A text description of the error.

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

A text description of the error.

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

A text description of the error.

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

A text description of the error.

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

A text description of the error.

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

A text description of the error.

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

A text description of the error.

*/ inline BatchItemError& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} private: int m_index; bool m_indexHasBeenSet = false; Aws::String m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; }; } // namespace Model } // namespace Comprehend } // namespace Aws