/** * 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 LicenseManagerLinuxSubscriptions { namespace Model { namespace StatusMapper { static const int InProgress_HASH = HashingUtils::HashString("InProgress"); static const int Completed_HASH = HashingUtils::HashString("Completed"); static const int Successful_HASH = HashingUtils::HashString("Successful"); static const int Failed_HASH = HashingUtils::HashString("Failed"); Status GetStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == InProgress_HASH) { return Status::InProgress; } else if (hashCode == Completed_HASH) { return Status::Completed; } else if (hashCode == Successful_HASH) { return Status::Successful; } else if (hashCode == Failed_HASH) { return Status::Failed; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return Status::NOT_SET; } Aws::String GetNameForStatus(Status enumValue) { switch(enumValue) { case Status::InProgress: return "InProgress"; case Status::Completed: return "Completed"; case Status::Successful: return "Successful"; case Status::Failed: return "Failed"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace StatusMapper } // namespace Model } // namespace LicenseManagerLinuxSubscriptions } // namespace Aws