/** * 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 Personalize { namespace Model { namespace ImportModeMapper { static const int FULL_HASH = HashingUtils::HashString("FULL"); static const int INCREMENTAL_HASH = HashingUtils::HashString("INCREMENTAL"); ImportMode GetImportModeForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == FULL_HASH) { return ImportMode::FULL; } else if (hashCode == INCREMENTAL_HASH) { return ImportMode::INCREMENTAL; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ImportMode::NOT_SET; } Aws::String GetNameForImportMode(ImportMode enumValue) { switch(enumValue) { case ImportMode::FULL: return "FULL"; case ImportMode::INCREMENTAL: return "INCREMENTAL"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ImportModeMapper } // namespace Model } // namespace Personalize } // namespace Aws