/** * 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 DeploymentLifecycleMapper { static const int Deploying_HASH = HashingUtils::HashString("Deploying"); static const int Succeeded_HASH = HashingUtils::HashString("Succeeded"); static const int Failed_HASH = HashingUtils::HashString("Failed"); DeploymentLifecycle GetDeploymentLifecycleForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == Deploying_HASH) { return DeploymentLifecycle::Deploying; } else if (hashCode == Succeeded_HASH) { return DeploymentLifecycle::Succeeded; } else if (hashCode == Failed_HASH) { return DeploymentLifecycle::Failed; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return DeploymentLifecycle::NOT_SET; } Aws::String GetNameForDeploymentLifecycle(DeploymentLifecycle enumValue) { switch(enumValue) { case DeploymentLifecycle::Deploying: return "Deploying"; case DeploymentLifecycle::Succeeded: return "Succeeded"; case DeploymentLifecycle::Failed: return "Failed"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace DeploymentLifecycleMapper } // namespace Model } // namespace MainframeModernization } // namespace Aws