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-servicecatalog/source/model/ChangeAction.cpp

78 lines
2.1 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/servicecatalog/model/ChangeAction.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 ServiceCatalog
{
namespace Model
{
namespace ChangeActionMapper
{
static const int ADD_HASH = HashingUtils::HashString("ADD");
static const int MODIFY_HASH = HashingUtils::HashString("MODIFY");
static const int REMOVE_HASH = HashingUtils::HashString("REMOVE");
ChangeAction GetChangeActionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ADD_HASH)
{
return ChangeAction::ADD;
}
else if (hashCode == MODIFY_HASH)
{
return ChangeAction::MODIFY;
}
else if (hashCode == REMOVE_HASH)
{
return ChangeAction::REMOVE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ChangeAction>(hashCode);
}
return ChangeAction::NOT_SET;
}
Aws::String GetNameForChangeAction(ChangeAction enumValue)
{
switch(enumValue)
{
case ChangeAction::ADD:
return "ADD";
case ChangeAction::MODIFY:
return "MODIFY";
case ChangeAction::REMOVE:
return "REMOVE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ChangeActionMapper
} // namespace Model
} // namespace ServiceCatalog
} // namespace Aws