/** * 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 MTurk { namespace Model { namespace NotificationTransportMapper { static const int Email_HASH = HashingUtils::HashString("Email"); static const int SQS_HASH = HashingUtils::HashString("SQS"); static const int SNS_HASH = HashingUtils::HashString("SNS"); NotificationTransport GetNotificationTransportForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == Email_HASH) { return NotificationTransport::Email; } else if (hashCode == SQS_HASH) { return NotificationTransport::SQS; } else if (hashCode == SNS_HASH) { return NotificationTransport::SNS; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return NotificationTransport::NOT_SET; } Aws::String GetNameForNotificationTransport(NotificationTransport enumValue) { switch(enumValue) { case NotificationTransport::Email: return "Email"; case NotificationTransport::SQS: return "SQS"; case NotificationTransport::SNS: return "SNS"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace NotificationTransportMapper } // namespace Model } // namespace MTurk } // namespace Aws