/** * 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 InternetMonitor { namespace Model { namespace HealthEventStatusMapper { static const int ACTIVE_HASH = HashingUtils::HashString("ACTIVE"); static const int RESOLVED_HASH = HashingUtils::HashString("RESOLVED"); HealthEventStatus GetHealthEventStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == ACTIVE_HASH) { return HealthEventStatus::ACTIVE; } else if (hashCode == RESOLVED_HASH) { return HealthEventStatus::RESOLVED; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return HealthEventStatus::NOT_SET; } Aws::String GetNameForHealthEventStatus(HealthEventStatus enumValue) { switch(enumValue) { case HealthEventStatus::ACTIVE: return "ACTIVE"; case HealthEventStatus::RESOLVED: return "RESOLVED"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace HealthEventStatusMapper } // namespace Model } // namespace InternetMonitor } // namespace Aws