/** * 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 SageMaker { namespace Model { namespace AlgorithmSortByMapper { static const int Name_HASH = HashingUtils::HashString("Name"); static const int CreationTime_HASH = HashingUtils::HashString("CreationTime"); AlgorithmSortBy GetAlgorithmSortByForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == Name_HASH) { return AlgorithmSortBy::Name; } else if (hashCode == CreationTime_HASH) { return AlgorithmSortBy::CreationTime; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return AlgorithmSortBy::NOT_SET; } Aws::String GetNameForAlgorithmSortBy(AlgorithmSortBy enumValue) { switch(enumValue) { case AlgorithmSortBy::Name: return "Name"; case AlgorithmSortBy::CreationTime: return "CreationTime"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace AlgorithmSortByMapper } // namespace Model } // namespace SageMaker } // namespace Aws