/** * 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 SageMaker { namespace Model { namespace EndpointStatusMapper { static const int OutOfService_HASH = HashingUtils::HashString("OutOfService"); static const int Creating_HASH = HashingUtils::HashString("Creating"); static const int Updating_HASH = HashingUtils::HashString("Updating"); static const int SystemUpdating_HASH = HashingUtils::HashString("SystemUpdating"); static const int RollingBack_HASH = HashingUtils::HashString("RollingBack"); static const int InService_HASH = HashingUtils::HashString("InService"); static const int Deleting_HASH = HashingUtils::HashString("Deleting"); static const int Failed_HASH = HashingUtils::HashString("Failed"); static const int UpdateRollbackFailed_HASH = HashingUtils::HashString("UpdateRollbackFailed"); EndpointStatus GetEndpointStatusForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == OutOfService_HASH) { return EndpointStatus::OutOfService; } else if (hashCode == Creating_HASH) { return EndpointStatus::Creating; } else if (hashCode == Updating_HASH) { return EndpointStatus::Updating; } else if (hashCode == SystemUpdating_HASH) { return EndpointStatus::SystemUpdating; } else if (hashCode == RollingBack_HASH) { return EndpointStatus::RollingBack; } else if (hashCode == InService_HASH) { return EndpointStatus::InService; } else if (hashCode == Deleting_HASH) { return EndpointStatus::Deleting; } else if (hashCode == Failed_HASH) { return EndpointStatus::Failed; } else if (hashCode == UpdateRollbackFailed_HASH) { return EndpointStatus::UpdateRollbackFailed; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return EndpointStatus::NOT_SET; } Aws::String GetNameForEndpointStatus(EndpointStatus enumValue) { switch(enumValue) { case EndpointStatus::OutOfService: return "OutOfService"; case EndpointStatus::Creating: return "Creating"; case EndpointStatus::Updating: return "Updating"; case EndpointStatus::SystemUpdating: return "SystemUpdating"; case EndpointStatus::RollingBack: return "RollingBack"; case EndpointStatus::InService: return "InService"; case EndpointStatus::Deleting: return "Deleting"; case EndpointStatus::Failed: return "Failed"; case EndpointStatus::UpdateRollbackFailed: return "UpdateRollbackFailed"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace EndpointStatusMapper } // namespace Model } // namespace SageMaker } // namespace Aws