/** * 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 Lightsail { namespace Model { namespace OriginProtocolPolicyEnumMapper { static const int http_only_HASH = HashingUtils::HashString("http-only"); static const int https_only_HASH = HashingUtils::HashString("https-only"); OriginProtocolPolicyEnum GetOriginProtocolPolicyEnumForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == http_only_HASH) { return OriginProtocolPolicyEnum::http_only; } else if (hashCode == https_only_HASH) { return OriginProtocolPolicyEnum::https_only; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return OriginProtocolPolicyEnum::NOT_SET; } Aws::String GetNameForOriginProtocolPolicyEnum(OriginProtocolPolicyEnum enumValue) { switch(enumValue) { case OriginProtocolPolicyEnum::http_only: return "http-only"; case OriginProtocolPolicyEnum::https_only: return "https-only"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace OriginProtocolPolicyEnumMapper } // namespace Model } // namespace Lightsail } // namespace Aws