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

A two-part error structure that can occur in ListGroupResources * or SearchResources operations on CloudFront stack-based queries. * The error occurs if the CloudFront stack on which the query is based either does * not exist, or has a status that renders the stack inactive. A * QueryError occurrence does not necessarily mean that Resource * Groups could not complete the operation, but the resulting group might have no * member resources.

See Also:

AWS * API Reference

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

Specifies the error code that was raised.

*/ inline const QueryErrorCode& GetErrorCode() const{ return m_errorCode; } /** *

Specifies the error code that was raised.

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

Specifies the error code that was raised.

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

Specifies the error code that was raised.

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

Specifies the error code that was raised.

*/ inline QueryError& WithErrorCode(const QueryErrorCode& value) { SetErrorCode(value); return *this;} /** *

Specifies the error code that was raised.

*/ inline QueryError& WithErrorCode(QueryErrorCode&& value) { SetErrorCode(std::move(value)); return *this;} /** *

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

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

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

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

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

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

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

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

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

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

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

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

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

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

A message that explains the ErrorCode value. Messages might * state that the specified CloudFront stack does not exist (or no longer exists). * For CLOUDFORMATION_STACK_INACTIVE, the message typically states * that the CloudFront stack has a status that is not (or no longer) active, such * as CREATE_FAILED.

*/ inline QueryError& WithMessage(const char* value) { SetMessage(value); return *this;} private: QueryErrorCode m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace ResourceGroups } // namespace Aws