/** * 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 MigrationHub { namespace Model { namespace ApplicationStatusMapper { static const int NOT_STARTED_HASH = HashingUtils::HashString("NOT_STARTED"); static const int IN_PROGRESS_HASH = HashingUtils::HashString("IN_PROGRESS"); static const int COMPLETED_HASH = HashingUtils::HashString("COMPLETED"); ApplicationStatus GetApplicationStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == NOT_STARTED_HASH) { return ApplicationStatus::NOT_STARTED; } else if (hashCode == IN_PROGRESS_HASH) { return ApplicationStatus::IN_PROGRESS; } else if (hashCode == COMPLETED_HASH) { return ApplicationStatus::COMPLETED; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ApplicationStatus::NOT_SET; } Aws::String GetNameForApplicationStatus(ApplicationStatus enumValue) { switch(enumValue) { case ApplicationStatus::NOT_STARTED: return "NOT_STARTED"; case ApplicationStatus::IN_PROGRESS: return "IN_PROGRESS"; case ApplicationStatus::COMPLETED: return "COMPLETED"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ApplicationStatusMapper } // namespace Model } // namespace MigrationHub } // namespace Aws