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

Describes an AppSync error.

See Also:

AWS * API Reference

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

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline const Aws::String& GetErrorType() const{ return m_errorType; } /** *

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline bool ErrorTypeHasBeenSet() const { return m_errorTypeHasBeenSet; } /** *

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline void SetErrorType(const Aws::String& value) { m_errorTypeHasBeenSet = true; m_errorType = value; } /** *

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline void SetErrorType(Aws::String&& value) { m_errorTypeHasBeenSet = true; m_errorType = std::move(value); } /** *

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline void SetErrorType(const char* value) { m_errorTypeHasBeenSet = true; m_errorType.assign(value); } /** *

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline CodeError& WithErrorType(const Aws::String& value) { SetErrorType(value); return *this;} /** *

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline CodeError& WithErrorType(Aws::String&& value) { SetErrorType(std::move(value)); return *this;} /** *

The type of code error.

Examples include, but aren't limited to: * LINT_ERROR, PARSER_ERROR.

*/ inline CodeError& WithErrorType(const char* value) { SetErrorType(value); return *this;} /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline CodeError& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline CodeError& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

A user presentable error.

Examples include, but aren't limited to: * Parsing error: Unterminated string literal.

*/ inline CodeError& WithValue(const char* value) { SetValue(value); return *this;} /** *

The line, column, and span location of the error in the code.

*/ inline const CodeErrorLocation& GetLocation() const{ return m_location; } /** *

The line, column, and span location of the error in the code.

*/ inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; } /** *

The line, column, and span location of the error in the code.

*/ inline void SetLocation(const CodeErrorLocation& value) { m_locationHasBeenSet = true; m_location = value; } /** *

The line, column, and span location of the error in the code.

*/ inline void SetLocation(CodeErrorLocation&& value) { m_locationHasBeenSet = true; m_location = std::move(value); } /** *

The line, column, and span location of the error in the code.

*/ inline CodeError& WithLocation(const CodeErrorLocation& value) { SetLocation(value); return *this;} /** *

The line, column, and span location of the error in the code.

*/ inline CodeError& WithLocation(CodeErrorLocation&& value) { SetLocation(std::move(value)); return *this;} private: Aws::String m_errorType; bool m_errorTypeHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; CodeErrorLocation m_location; bool m_locationHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws