/** * 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 MediaLive { namespace Model { namespace M3u8NielsenId3BehaviorMapper { static const int NO_PASSTHROUGH_HASH = HashingUtils::HashString("NO_PASSTHROUGH"); static const int PASSTHROUGH_HASH = HashingUtils::HashString("PASSTHROUGH"); M3u8NielsenId3Behavior GetM3u8NielsenId3BehaviorForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == NO_PASSTHROUGH_HASH) { return M3u8NielsenId3Behavior::NO_PASSTHROUGH; } else if (hashCode == PASSTHROUGH_HASH) { return M3u8NielsenId3Behavior::PASSTHROUGH; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return M3u8NielsenId3Behavior::NOT_SET; } Aws::String GetNameForM3u8NielsenId3Behavior(M3u8NielsenId3Behavior enumValue) { switch(enumValue) { case M3u8NielsenId3Behavior::NO_PASSTHROUGH: return "NO_PASSTHROUGH"; case M3u8NielsenId3Behavior::PASSTHROUGH: return "PASSTHROUGH"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace M3u8NielsenId3BehaviorMapper } // namespace Model } // namespace MediaLive } // namespace Aws