/** * 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 SMS { namespace Model { namespace ConnectorStatusMapper { static const int HEALTHY_HASH = HashingUtils::HashString("HEALTHY"); static const int UNHEALTHY_HASH = HashingUtils::HashString("UNHEALTHY"); ConnectorStatus GetConnectorStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == HEALTHY_HASH) { return ConnectorStatus::HEALTHY; } else if (hashCode == UNHEALTHY_HASH) { return ConnectorStatus::UNHEALTHY; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ConnectorStatus::NOT_SET; } Aws::String GetNameForConnectorStatus(ConnectorStatus enumValue) { switch(enumValue) { case ConnectorStatus::HEALTHY: return "HEALTHY"; case ConnectorStatus::UNHEALTHY: return "UNHEALTHY"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ConnectorStatusMapper } // namespace Model } // namespace SMS } // namespace Aws