/** * 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 IoTWireless { namespace Model { namespace ConnectionStatusMapper { static const int Connected_HASH = HashingUtils::HashString("Connected"); static const int Disconnected_HASH = HashingUtils::HashString("Disconnected"); ConnectionStatus GetConnectionStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == Connected_HASH) { return ConnectionStatus::Connected; } else if (hashCode == Disconnected_HASH) { return ConnectionStatus::Disconnected; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ConnectionStatus::NOT_SET; } Aws::String GetNameForConnectionStatus(ConnectionStatus enumValue) { switch(enumValue) { case ConnectionStatus::Connected: return "Connected"; case ConnectionStatus::Disconnected: return "Disconnected"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ConnectionStatusMapper } // namespace Model } // namespace IoTWireless } // namespace Aws