/** * 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 ConnectParticipant { namespace Model { namespace ScanDirectionMapper { static const int FORWARD_HASH = HashingUtils::HashString("FORWARD"); static const int BACKWARD_HASH = HashingUtils::HashString("BACKWARD"); ScanDirection GetScanDirectionForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == FORWARD_HASH) { return ScanDirection::FORWARD; } else if (hashCode == BACKWARD_HASH) { return ScanDirection::BACKWARD; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ScanDirection::NOT_SET; } Aws::String GetNameForScanDirection(ScanDirection enumValue) { switch(enumValue) { case ScanDirection::FORWARD: return "FORWARD"; case ScanDirection::BACKWARD: return "BACKWARD"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ScanDirectionMapper } // namespace Model } // namespace ConnectParticipant } // namespace Aws