71 lines
1.4 KiB
C++
71 lines
1.4 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/eventbridge/model/RemoveTargetsRequest.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::EventBridge::Model;
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
RemoveTargetsRequest::RemoveTargetsRequest() :
|
|||
|
|
m_ruleHasBeenSet(false),
|
|||
|
|
m_eventBusNameHasBeenSet(false),
|
|||
|
|
m_idsHasBeenSet(false),
|
|||
|
|
m_force(false),
|
|||
|
|
m_forceHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::String RemoveTargetsRequest::SerializePayload() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_ruleHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("Rule", m_rule);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_eventBusNameHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("EventBusName", m_eventBusName);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_idsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> idsJsonList(m_ids.size());
|
|||
|
|
for(unsigned idsIndex = 0; idsIndex < idsJsonList.GetLength(); ++idsIndex)
|
|||
|
|
{
|
|||
|
|
idsJsonList[idsIndex].AsString(m_ids[idsIndex]);
|
|||
|
|
}
|
|||
|
|
payload.WithArray("Ids", std::move(idsJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_forceHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithBool("Force", m_force);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload.View().WriteReadable();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::Http::HeaderValueCollection RemoveTargetsRequest::GetRequestSpecificHeaders() const
|
|||
|
|
{
|
|||
|
|
Aws::Http::HeaderValueCollection headers;
|
|||
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSEvents.RemoveTargets"));
|
|||
|
|
return headers;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|