/** * 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 UpdateStatusMapper { static const int InProgress_HASH = HashingUtils::HashString("InProgress"); static const int Failed_HASH = HashingUtils::HashString("Failed"); static const int Cancelled_HASH = HashingUtils::HashString("Cancelled"); static const int Successful_HASH = HashingUtils::HashString("Successful"); UpdateStatus GetUpdateStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == InProgress_HASH) { return UpdateStatus::InProgress; } else if (hashCode == Failed_HASH) { return UpdateStatus::Failed; } else if (hashCode == Cancelled_HASH) { return UpdateStatus::Cancelled; } else if (hashCode == Successful_HASH) { return UpdateStatus::Successful; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return UpdateStatus::NOT_SET; } Aws::String GetNameForUpdateStatus(UpdateStatus enumValue) { switch(enumValue) { case UpdateStatus::InProgress: return "InProgress"; case UpdateStatus::Failed: return "Failed"; case UpdateStatus::Cancelled: return "Cancelled"; case UpdateStatus::Successful: return "Successful"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace UpdateStatusMapper } // namespace Model } // namespace EKS } // namespace Aws