84 lines
1.7 KiB
C++
84 lines
1.7 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/datasync/model/UpdateTaskRequest.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::DataSync::Model;
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
UpdateTaskRequest::UpdateTaskRequest() :
|
|||
|
|
m_taskArnHasBeenSet(false),
|
|||
|
|
m_optionsHasBeenSet(false),
|
|||
|
|
m_excludesHasBeenSet(false),
|
|||
|
|
m_scheduleHasBeenSet(false),
|
|||
|
|
m_nameHasBeenSet(false),
|
|||
|
|
m_cloudWatchLogGroupArnHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::String UpdateTaskRequest::SerializePayload() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_taskArnHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("TaskArn", m_taskArn);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_optionsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithObject("Options", m_options.Jsonize());
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_excludesHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> excludesJsonList(m_excludes.size());
|
|||
|
|
for(unsigned excludesIndex = 0; excludesIndex < excludesJsonList.GetLength(); ++excludesIndex)
|
|||
|
|
{
|
|||
|
|
excludesJsonList[excludesIndex].AsObject(m_excludes[excludesIndex].Jsonize());
|
|||
|
|
}
|
|||
|
|
payload.WithArray("Excludes", std::move(excludesJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_scheduleHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithObject("Schedule", m_schedule.Jsonize());
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_nameHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("Name", m_name);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_cloudWatchLogGroupArnHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("CloudWatchLogGroupArn", m_cloudWatchLogGroupArn);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload.View().WriteReadable();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::Http::HeaderValueCollection UpdateTaskRequest::GetRequestSpecificHeaders() const
|
|||
|
|
{
|
|||
|
|
Aws::Http::HeaderValueCollection headers;
|
|||
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "FmrsService.UpdateTask"));
|
|||
|
|
return headers;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|