/** * 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 WAF { namespace Model { namespace ChangeActionMapper { static const int INSERT_HASH = HashingUtils::HashString("INSERT"); static const int DELETE__HASH = HashingUtils::HashString("DELETE"); ChangeAction GetChangeActionForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == INSERT_HASH) { return ChangeAction::INSERT; } else if (hashCode == DELETE__HASH) { return ChangeAction::DELETE_; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ChangeAction::NOT_SET; } Aws::String GetNameForChangeAction(ChangeAction enumValue) { switch(enumValue) { case ChangeAction::INSERT: return "INSERT"; case ChangeAction::DELETE_: return "DELETE"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ChangeActionMapper } // namespace Model } // namespace WAF } // namespace Aws