/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include using namespace Aws::Utils; namespace Aws { namespace Account { namespace Model { namespace ValidationExceptionReasonMapper { static const int invalidRegionOptTarget_HASH = HashingUtils::HashString("invalidRegionOptTarget"); static const int fieldValidationFailed_HASH = HashingUtils::HashString("fieldValidationFailed"); ValidationExceptionReason GetValidationExceptionReasonForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == invalidRegionOptTarget_HASH) { return ValidationExceptionReason::invalidRegionOptTarget; } else if (hashCode == fieldValidationFailed_HASH) { return ValidationExceptionReason::fieldValidationFailed; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ValidationExceptionReason::NOT_SET; } Aws::String GetNameForValidationExceptionReason(ValidationExceptionReason enumValue) { switch(enumValue) { case ValidationExceptionReason::invalidRegionOptTarget: return "invalidRegionOptTarget"; case ValidationExceptionReason::fieldValidationFailed: return "fieldValidationFailed"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ValidationExceptionReasonMapper } // namespace Model } // namespace Account } // namespace Aws