/** * 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 SageMakerGeospatial { namespace Model { namespace ComparisonOperatorMapper { static const int EQUALS_HASH = HashingUtils::HashString("EQUALS"); static const int NOT_EQUALS_HASH = HashingUtils::HashString("NOT_EQUALS"); static const int STARTS_WITH_HASH = HashingUtils::HashString("STARTS_WITH"); ComparisonOperator GetComparisonOperatorForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == EQUALS_HASH) { return ComparisonOperator::EQUALS; } else if (hashCode == NOT_EQUALS_HASH) { return ComparisonOperator::NOT_EQUALS; } else if (hashCode == STARTS_WITH_HASH) { return ComparisonOperator::STARTS_WITH; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return ComparisonOperator::NOT_SET; } Aws::String GetNameForComparisonOperator(ComparisonOperator enumValue) { switch(enumValue) { case ComparisonOperator::EQUALS: return "EQUALS"; case ComparisonOperator::NOT_EQUALS: return "NOT_EQUALS"; case ComparisonOperator::STARTS_WITH: return "STARTS_WITH"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace ComparisonOperatorMapper } // namespace Model } // namespace SageMakerGeospatial } // namespace Aws