/** * 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 MainframeModernization { namespace Model { namespace DataSetTaskLifecycleMapper { static const int Creating_HASH = HashingUtils::HashString("Creating"); static const int Running_HASH = HashingUtils::HashString("Running"); static const int Completed_HASH = HashingUtils::HashString("Completed"); DataSetTaskLifecycle GetDataSetTaskLifecycleForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == Creating_HASH) { return DataSetTaskLifecycle::Creating; } else if (hashCode == Running_HASH) { return DataSetTaskLifecycle::Running; } else if (hashCode == Completed_HASH) { return DataSetTaskLifecycle::Completed; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return DataSetTaskLifecycle::NOT_SET; } Aws::String GetNameForDataSetTaskLifecycle(DataSetTaskLifecycle enumValue) { switch(enumValue) { case DataSetTaskLifecycle::Creating: return "Creating"; case DataSetTaskLifecycle::Running: return "Running"; case DataSetTaskLifecycle::Completed: return "Completed"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace DataSetTaskLifecycleMapper } // namespace Model } // namespace MainframeModernization } // namespace Aws