/** * 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 EC2 { namespace Model { namespace UnlimitedSupportedInstanceFamilyMapper { static const int t2_HASH = HashingUtils::HashString("t2"); static const int t3_HASH = HashingUtils::HashString("t3"); static const int t3a_HASH = HashingUtils::HashString("t3a"); UnlimitedSupportedInstanceFamily GetUnlimitedSupportedInstanceFamilyForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == t2_HASH) { return UnlimitedSupportedInstanceFamily::t2; } else if (hashCode == t3_HASH) { return UnlimitedSupportedInstanceFamily::t3; } else if (hashCode == t3a_HASH) { return UnlimitedSupportedInstanceFamily::t3a; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return UnlimitedSupportedInstanceFamily::NOT_SET; } Aws::String GetNameForUnlimitedSupportedInstanceFamily(UnlimitedSupportedInstanceFamily enumValue) { switch(enumValue) { case UnlimitedSupportedInstanceFamily::t2: return "t2"; case UnlimitedSupportedInstanceFamily::t3: return "t3"; case UnlimitedSupportedInstanceFamily::t3a: return "t3a"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace UnlimitedSupportedInstanceFamilyMapper } // namespace Model } // namespace EC2 } // namespace Aws