/** * 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 SSM { namespace Model { namespace ComplianceStatusMapper { static const int COMPLIANT_HASH = HashingUtils::HashString("COMPLIANT"); static const int NON_COMPLIANT_HASH = HashingUtils::HashString("NON_COMPLIANT"); ComplianceStatus GetComplianceStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == COMPLIANT_HASH) { return ComplianceStatus::COMPLIANT; } else if (hashCode == NON_COMPLIANT_HASH) { return ComplianceStatus::NON_COMPLIANT; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ComplianceStatus::NOT_SET; } Aws::String GetNameForComplianceStatus(ComplianceStatus enumValue) { switch(enumValue) { case ComplianceStatus::COMPLIANT: return "COMPLIANT"; case ComplianceStatus::NON_COMPLIANT: return "NON_COMPLIANT"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ComplianceStatusMapper } // namespace Model } // namespace SSM } // namespace Aws