56 lines
1.4 KiB
C++
56 lines
1.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/ecs/model/SubmitAttachmentStateChangesRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::ECS::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
SubmitAttachmentStateChangesRequest::SubmitAttachmentStateChangesRequest() :
|
|
m_clusterHasBeenSet(false),
|
|
m_attachmentsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String SubmitAttachmentStateChangesRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_clusterHasBeenSet)
|
|
{
|
|
payload.WithString("cluster", m_cluster);
|
|
|
|
}
|
|
|
|
if(m_attachmentsHasBeenSet)
|
|
{
|
|
Array<JsonValue> attachmentsJsonList(m_attachments.size());
|
|
for(unsigned attachmentsIndex = 0; attachmentsIndex < attachmentsJsonList.GetLength(); ++attachmentsIndex)
|
|
{
|
|
attachmentsJsonList[attachmentsIndex].AsObject(m_attachments[attachmentsIndex].Jsonize());
|
|
}
|
|
payload.WithArray("attachments", std::move(attachmentsJsonList));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection SubmitAttachmentStateChangesRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonEC2ContainerServiceV20141113.SubmitAttachmentStateChanges"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|