/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/sagemaker/model/AppSortKey.h> #include <aws/core/utils/HashingUtils.h> #include <aws/core/Globals.h> #include <aws/core/utils/EnumParseOverflowContainer.h> using namespace Aws::Utils; namespace Aws { namespace SageMaker { namespace Model { namespace AppSortKeyMapper { static const int CreationTime_HASH = HashingUtils::HashString("CreationTime"); AppSortKey GetAppSortKeyForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == CreationTime_HASH) { return AppSortKey::CreationTime; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast<AppSortKey>(hashCode); } return AppSortKey::NOT_SET; } Aws::String GetNameForAppSortKey(AppSortKey enumValue) { switch(enumValue) { case AppSortKey::CreationTime: return "CreationTime"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue)); } return {}; } } } // namespace AppSortKeyMapper } // namespace Model } // namespace SageMaker } // namespace Aws