/** * 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 TimestreamWrite { namespace Model { namespace TableStatusMapper { static const int ACTIVE_HASH = HashingUtils::HashString("ACTIVE"); static const int DELETING_HASH = HashingUtils::HashString("DELETING"); static const int RESTORING_HASH = HashingUtils::HashString("RESTORING"); TableStatus GetTableStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == ACTIVE_HASH) { return TableStatus::ACTIVE; } else if (hashCode == DELETING_HASH) { return TableStatus::DELETING; } else if (hashCode == RESTORING_HASH) { return TableStatus::RESTORING; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return TableStatus::NOT_SET; } Aws::String GetNameForTableStatus(TableStatus enumValue) { switch(enumValue) { case TableStatus::ACTIVE: return "ACTIVE"; case TableStatus::DELETING: return "DELETING"; case TableStatus::RESTORING: return "RESTORING"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace TableStatusMapper } // namespace Model } // namespace TimestreamWrite } // namespace Aws