69 lines
1.4 KiB
C++
69 lines
1.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/dlm/model/CreateLifecyclePolicyRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::DLM::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
CreateLifecyclePolicyRequest::CreateLifecyclePolicyRequest() :
|
|
m_executionRoleArnHasBeenSet(false),
|
|
m_descriptionHasBeenSet(false),
|
|
m_state(SettablePolicyStateValues::NOT_SET),
|
|
m_stateHasBeenSet(false),
|
|
m_policyDetailsHasBeenSet(false),
|
|
m_tagsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String CreateLifecyclePolicyRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_executionRoleArnHasBeenSet)
|
|
{
|
|
payload.WithString("ExecutionRoleArn", m_executionRoleArn);
|
|
|
|
}
|
|
|
|
if(m_descriptionHasBeenSet)
|
|
{
|
|
payload.WithString("Description", m_description);
|
|
|
|
}
|
|
|
|
if(m_stateHasBeenSet)
|
|
{
|
|
payload.WithString("State", SettablePolicyStateValuesMapper::GetNameForSettablePolicyStateValues(m_state));
|
|
}
|
|
|
|
if(m_policyDetailsHasBeenSet)
|
|
{
|
|
payload.WithObject("PolicyDetails", m_policyDetails.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_tagsHasBeenSet)
|
|
{
|
|
JsonValue tagsJsonMap;
|
|
for(auto& tagsItem : m_tags)
|
|
{
|
|
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
|
|
}
|
|
payload.WithObject("Tags", std::move(tagsJsonMap));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
|
|
|
|
|