/** * 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 DeviceFarm { namespace Model { namespace UploadCategoryMapper { static const int CURATED_HASH = HashingUtils::HashString("CURATED"); static const int PRIVATE__HASH = HashingUtils::HashString("PRIVATE"); UploadCategory GetUploadCategoryForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == CURATED_HASH) { return UploadCategory::CURATED; } else if (hashCode == PRIVATE__HASH) { return UploadCategory::PRIVATE_; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return UploadCategory::NOT_SET; } Aws::String GetNameForUploadCategory(UploadCategory enumValue) { switch(enumValue) { case UploadCategory::CURATED: return "CURATED"; case UploadCategory::PRIVATE_: return "PRIVATE"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace UploadCategoryMapper } // namespace Model } // namespace DeviceFarm } // namespace Aws