63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/waf/model/UpdateByteMatchSetRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::WAF::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
UpdateByteMatchSetRequest::UpdateByteMatchSetRequest() :
|
|
m_byteMatchSetIdHasBeenSet(false),
|
|
m_changeTokenHasBeenSet(false),
|
|
m_updatesHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String UpdateByteMatchSetRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_byteMatchSetIdHasBeenSet)
|
|
{
|
|
payload.WithString("ByteMatchSetId", m_byteMatchSetId);
|
|
|
|
}
|
|
|
|
if(m_changeTokenHasBeenSet)
|
|
{
|
|
payload.WithString("ChangeToken", m_changeToken);
|
|
|
|
}
|
|
|
|
if(m_updatesHasBeenSet)
|
|
{
|
|
Array<JsonValue> updatesJsonList(m_updates.size());
|
|
for(unsigned updatesIndex = 0; updatesIndex < updatesJsonList.GetLength(); ++updatesIndex)
|
|
{
|
|
updatesJsonList[updatesIndex].AsObject(m_updates[updatesIndex].Jsonize());
|
|
}
|
|
payload.WithArray("Updates", std::move(updatesJsonList));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection UpdateByteMatchSetRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSWAF_20150824.UpdateByteMatchSet"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|