103 lines
2.3 KiB
C++
103 lines
2.3 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/datasync/model/CreateTaskRequest.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::DataSync::Model;
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
CreateTaskRequest::CreateTaskRequest() :
|
|||
|
|
m_sourceLocationArnHasBeenSet(false),
|
|||
|
|
m_destinationLocationArnHasBeenSet(false),
|
|||
|
|
m_cloudWatchLogGroupArnHasBeenSet(false),
|
|||
|
|
m_nameHasBeenSet(false),
|
|||
|
|
m_optionsHasBeenSet(false),
|
|||
|
|
m_excludesHasBeenSet(false),
|
|||
|
|
m_scheduleHasBeenSet(false),
|
|||
|
|
m_tagsHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::String CreateTaskRequest::SerializePayload() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_sourceLocationArnHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("SourceLocationArn", m_sourceLocationArn);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_destinationLocationArnHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("DestinationLocationArn", m_destinationLocationArn);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_cloudWatchLogGroupArnHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("CloudWatchLogGroupArn", m_cloudWatchLogGroupArn);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_nameHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("Name", m_name);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
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_tagsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> tagsJsonList(m_tags.size());
|
|||
|
|
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
|
|||
|
|
{
|
|||
|
|
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
|
|||
|
|
}
|
|||
|
|
payload.WithArray("Tags", std::move(tagsJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload.View().WriteReadable();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::Http::HeaderValueCollection CreateTaskRequest::GetRequestSpecificHeaders() const
|
|||
|
|
{
|
|||
|
|
Aws::Http::HeaderValueCollection headers;
|
|||
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "FmrsService.CreateTask"));
|
|||
|
|
return headers;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|