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

An error that explains why an action did not succeed.

See * Also:

AWS * API Reference

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

Service Quotas returns the following error values:

  • * DEPENDENCY_ACCESS_DENIED_ERROR - The caller does not have the * required permissions to complete the action. To resolve the error, you must have * permission to access the service or quota.

  • * DEPENDENCY_THROTTLING_ERROR - The service is throttling Service * Quotas.

  • DEPENDENCY_SERVICE_ERROR - The service * is not available.

  • * SERVICE_QUOTA_NOT_AVAILABLE_ERROR - There was an error in Service * Quotas.

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

Service Quotas returns the following error values:

  • * DEPENDENCY_ACCESS_DENIED_ERROR - The caller does not have the * required permissions to complete the action. To resolve the error, you must have * permission to access the service or quota.

  • * DEPENDENCY_THROTTLING_ERROR - The service is throttling Service * Quotas.

  • DEPENDENCY_SERVICE_ERROR - The service * is not available.

  • * SERVICE_QUOTA_NOT_AVAILABLE_ERROR - There was an error in Service * Quotas.

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

Service Quotas returns the following error values:

  • * DEPENDENCY_ACCESS_DENIED_ERROR - The caller does not have the * required permissions to complete the action. To resolve the error, you must have * permission to access the service or quota.

  • * DEPENDENCY_THROTTLING_ERROR - The service is throttling Service * Quotas.

  • DEPENDENCY_SERVICE_ERROR - The service * is not available.

  • * SERVICE_QUOTA_NOT_AVAILABLE_ERROR - There was an error in Service * Quotas.

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

Service Quotas returns the following error values:

  • * DEPENDENCY_ACCESS_DENIED_ERROR - The caller does not have the * required permissions to complete the action. To resolve the error, you must have * permission to access the service or quota.

  • * DEPENDENCY_THROTTLING_ERROR - The service is throttling Service * Quotas.

  • DEPENDENCY_SERVICE_ERROR - The service * is not available.

  • * SERVICE_QUOTA_NOT_AVAILABLE_ERROR - There was an error in Service * Quotas.

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

Service Quotas returns the following error values:

  • * DEPENDENCY_ACCESS_DENIED_ERROR - The caller does not have the * required permissions to complete the action. To resolve the error, you must have * permission to access the service or quota.

  • * DEPENDENCY_THROTTLING_ERROR - The service is throttling Service * Quotas.

  • DEPENDENCY_SERVICE_ERROR - The service * is not available.

  • * SERVICE_QUOTA_NOT_AVAILABLE_ERROR - There was an error in Service * Quotas.

*/ inline ErrorReason& WithErrorCode(const ErrorCode& value) { SetErrorCode(value); return *this;} /** *

Service Quotas returns the following error values:

  • * DEPENDENCY_ACCESS_DENIED_ERROR - The caller does not have the * required permissions to complete the action. To resolve the error, you must have * permission to access the service or quota.

  • * DEPENDENCY_THROTTLING_ERROR - The service is throttling Service * Quotas.

  • DEPENDENCY_SERVICE_ERROR - The service * is not available.

  • * SERVICE_QUOTA_NOT_AVAILABLE_ERROR - There was an error in Service * Quotas.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

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

The error message.

*/ inline ErrorReason& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} private: ErrorCode m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; }; } // namespace Model } // namespace ServiceQuotas } // namespace Aws