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

An error corresponding to the unsuccessful processing of a single metric data * query.

See Also:

AWS * API Reference

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

The query identifier.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The query identifier.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The query identifier.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The query identifier.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The query identifier.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The query identifier.

*/ inline MetricDataError& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The query identifier.

*/ inline MetricDataError& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The query identifier.

*/ inline MetricDataError& WithId(const char* value) { SetId(value); return *this;} /** *

The query error code. Can be one of:

  • * INTERNAL_FAILURE – Amazon SES has failed to process one of the * queries.

  • ACCESS_DENIED – You have insufficient * access to retrieve metrics based on the given query.

*/ inline const QueryErrorCode& GetCode() const{ return m_code; } /** *

The query error code. Can be one of:

  • * INTERNAL_FAILURE – Amazon SES has failed to process one of the * queries.

  • ACCESS_DENIED – You have insufficient * access to retrieve metrics based on the given query.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The query error code. Can be one of:

  • * INTERNAL_FAILURE – Amazon SES has failed to process one of the * queries.

  • ACCESS_DENIED – You have insufficient * access to retrieve metrics based on the given query.

*/ inline void SetCode(const QueryErrorCode& value) { m_codeHasBeenSet = true; m_code = value; } /** *

The query error code. Can be one of:

  • * INTERNAL_FAILURE – Amazon SES has failed to process one of the * queries.

  • ACCESS_DENIED – You have insufficient * access to retrieve metrics based on the given query.

*/ inline void SetCode(QueryErrorCode&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } /** *

The query error code. Can be one of:

  • * INTERNAL_FAILURE – Amazon SES has failed to process one of the * queries.

  • ACCESS_DENIED – You have insufficient * access to retrieve metrics based on the given query.

*/ inline MetricDataError& WithCode(const QueryErrorCode& value) { SetCode(value); return *this;} /** *

The query error code. Can be one of:

  • * INTERNAL_FAILURE – Amazon SES has failed to process one of the * queries.

  • ACCESS_DENIED – You have insufficient * access to retrieve metrics based on the given query.

*/ inline MetricDataError& WithCode(QueryErrorCode&& value) { SetCode(std::move(value)); return *this;} /** *

The error message associated with the current query error.

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

The error message associated with the current query error.

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

The error message associated with the current query error.

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

The error message associated with the current query error.

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

The error message associated with the current query error.

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

The error message associated with the current query error.

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

The error message associated with the current query error.

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

The error message associated with the current query error.

*/ inline MetricDataError& WithMessage(const char* value) { SetMessage(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; QueryErrorCode m_code; bool m_codeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace SESV2 } // namespace Aws