/** * 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 VoiceID { namespace Model { namespace DomainStatusMapper { static const int ACTIVE_HASH = HashingUtils::HashString("ACTIVE"); static const int PENDING_HASH = HashingUtils::HashString("PENDING"); static const int SUSPENDED_HASH = HashingUtils::HashString("SUSPENDED"); DomainStatus GetDomainStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == ACTIVE_HASH) { return DomainStatus::ACTIVE; } else if (hashCode == PENDING_HASH) { return DomainStatus::PENDING; } else if (hashCode == SUSPENDED_HASH) { return DomainStatus::SUSPENDED; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return DomainStatus::NOT_SET; } Aws::String GetNameForDomainStatus(DomainStatus enumValue) { switch(enumValue) { case DomainStatus::ACTIVE: return "ACTIVE"; case DomainStatus::PENDING: return "PENDING"; case DomainStatus::SUSPENDED: return "SUSPENDED"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace DomainStatusMapper } // namespace Model } // namespace VoiceID } // namespace Aws