/** * 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 CodeArtifact { namespace Model { namespace DomainStatusMapper { static const int Active_HASH = HashingUtils::HashString("Active"); static const int Deleted_HASH = HashingUtils::HashString("Deleted"); DomainStatus GetDomainStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == Active_HASH) { return DomainStatus::Active; } else if (hashCode == Deleted_HASH) { return DomainStatus::Deleted; } 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::Deleted: return "Deleted"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace DomainStatusMapper } // namespace Model } // namespace CodeArtifact } // namespace Aws