/** * 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 LookoutEquipment { namespace Model { namespace DatasetStatusMapper { static const int CREATED_HASH = HashingUtils::HashString("CREATED"); static const int INGESTION_IN_PROGRESS_HASH = HashingUtils::HashString("INGESTION_IN_PROGRESS"); static const int ACTIVE_HASH = HashingUtils::HashString("ACTIVE"); DatasetStatus GetDatasetStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == CREATED_HASH) { return DatasetStatus::CREATED; } else if (hashCode == INGESTION_IN_PROGRESS_HASH) { return DatasetStatus::INGESTION_IN_PROGRESS; } else if (hashCode == ACTIVE_HASH) { return DatasetStatus::ACTIVE; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return DatasetStatus::NOT_SET; } Aws::String GetNameForDatasetStatus(DatasetStatus enumValue) { switch(enumValue) { case DatasetStatus::CREATED: return "CREATED"; case DatasetStatus::INGESTION_IN_PROGRESS: return "INGESTION_IN_PROGRESS"; case DatasetStatus::ACTIVE: return "ACTIVE"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace DatasetStatusMapper } // namespace Model } // namespace LookoutEquipment } // namespace Aws