This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-sagemaker/source/model/DomainStatus.cpp

85 lines
2.4 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sagemaker/model/DomainStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SageMaker
{
namespace Model
{
namespace DomainStatusMapper
{
static const int Deleting_HASH = HashingUtils::HashString("Deleting");
static const int Failed_HASH = HashingUtils::HashString("Failed");
static const int InService_HASH = HashingUtils::HashString("InService");
static const int Pending_HASH = HashingUtils::HashString("Pending");
DomainStatus GetDomainStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Deleting_HASH)
{
return DomainStatus::Deleting;
}
else if (hashCode == Failed_HASH)
{
return DomainStatus::Failed;
}
else if (hashCode == InService_HASH)
{
return DomainStatus::InService;
}
else if (hashCode == Pending_HASH)
{
return DomainStatus::Pending;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<DomainStatus>(hashCode);
}
return DomainStatus::NOT_SET;
}
Aws::String GetNameForDomainStatus(DomainStatus enumValue)
{
switch(enumValue)
{
case DomainStatus::Deleting:
return "Deleting";
case DomainStatus::Failed:
return "Failed";
case DomainStatus::InService:
return "InService";
case DomainStatus::Pending:
return "Pending";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace DomainStatusMapper
} // namespace Model
} // namespace SageMaker
} // namespace Aws