/** * 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 EKS { namespace Model { namespace ClusterStatusMapper { static const int CREATING_HASH = HashingUtils::HashString("CREATING"); static const int ACTIVE_HASH = HashingUtils::HashString("ACTIVE"); static const int DELETING_HASH = HashingUtils::HashString("DELETING"); static const int FAILED_HASH = HashingUtils::HashString("FAILED"); static const int UPDATING_HASH = HashingUtils::HashString("UPDATING"); static const int PENDING_HASH = HashingUtils::HashString("PENDING"); ClusterStatus GetClusterStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == CREATING_HASH) { return ClusterStatus::CREATING; } else if (hashCode == ACTIVE_HASH) { return ClusterStatus::ACTIVE; } else if (hashCode == DELETING_HASH) { return ClusterStatus::DELETING; } else if (hashCode == FAILED_HASH) { return ClusterStatus::FAILED; } else if (hashCode == UPDATING_HASH) { return ClusterStatus::UPDATING; } else if (hashCode == PENDING_HASH) { return ClusterStatus::PENDING; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ClusterStatus::NOT_SET; } Aws::String GetNameForClusterStatus(ClusterStatus enumValue) { switch(enumValue) { case ClusterStatus::CREATING: return "CREATING"; case ClusterStatus::ACTIVE: return "ACTIVE"; case ClusterStatus::DELETING: return "DELETING"; case ClusterStatus::FAILED: return "FAILED"; case ClusterStatus::UPDATING: return "UPDATING"; case ClusterStatus::PENDING: return "PENDING"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ClusterStatusMapper } // namespace Model } // namespace EKS } // namespace Aws