/** * 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 CloudWatchEvents { namespace Model { namespace ConnectionOAuthHttpMethodMapper { static const int GET__HASH = HashingUtils::HashString("GET"); static const int POST_HASH = HashingUtils::HashString("POST"); static const int PUT_HASH = HashingUtils::HashString("PUT"); ConnectionOAuthHttpMethod GetConnectionOAuthHttpMethodForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == GET__HASH) { return ConnectionOAuthHttpMethod::GET_; } else if (hashCode == POST_HASH) { return ConnectionOAuthHttpMethod::POST; } else if (hashCode == PUT_HASH) { return ConnectionOAuthHttpMethod::PUT; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ConnectionOAuthHttpMethod::NOT_SET; } Aws::String GetNameForConnectionOAuthHttpMethod(ConnectionOAuthHttpMethod enumValue) { switch(enumValue) { case ConnectionOAuthHttpMethod::GET_: return "GET"; case ConnectionOAuthHttpMethod::POST: return "POST"; case ConnectionOAuthHttpMethod::PUT: return "PUT"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ConnectionOAuthHttpMethodMapper } // namespace Model } // namespace CloudWatchEvents } // namespace Aws