/** * 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 IoTAnalytics { namespace Model { namespace DatasetStatusMapper { static const int CREATING_HASH = HashingUtils::HashString("CREATING"); static const int ACTIVE_HASH = HashingUtils::HashString("ACTIVE"); static const int DELETING_HASH = HashingUtils::HashString("DELETING"); DatasetStatus GetDatasetStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == CREATING_HASH) { return DatasetStatus::CREATING; } else if (hashCode == ACTIVE_HASH) { return DatasetStatus::ACTIVE; } else if (hashCode == DELETING_HASH) { return DatasetStatus::DELETING; } 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::CREATING: return "CREATING"; case DatasetStatus::ACTIVE: return "ACTIVE"; case DatasetStatus::DELETING: return "DELETING"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace DatasetStatusMapper } // namespace Model } // namespace IoTAnalytics } // namespace Aws