This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-glue/source/model/StartJobRunRequest.cpp

108 lines
2.2 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/glue/model/StartJobRunRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Glue::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
StartJobRunRequest::StartJobRunRequest() :
m_jobNameHasBeenSet(false),
m_jobRunIdHasBeenSet(false),
m_argumentsHasBeenSet(false),
m_timeout(0),
m_timeoutHasBeenSet(false),
m_maxCapacity(0.0),
m_maxCapacityHasBeenSet(false),
m_securityConfigurationHasBeenSet(false),
m_notificationPropertyHasBeenSet(false),
m_workerType(WorkerType::NOT_SET),
m_workerTypeHasBeenSet(false),
m_numberOfWorkers(0),
m_numberOfWorkersHasBeenSet(false)
{
}
Aws::String StartJobRunRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobNameHasBeenSet)
{
payload.WithString("JobName", m_jobName);
}
if(m_jobRunIdHasBeenSet)
{
payload.WithString("JobRunId", m_jobRunId);
}
if(m_argumentsHasBeenSet)
{
JsonValue argumentsJsonMap;
for(auto& argumentsItem : m_arguments)
{
argumentsJsonMap.WithString(argumentsItem.first, argumentsItem.second);
}
payload.WithObject("Arguments", std::move(argumentsJsonMap));
}
if(m_timeoutHasBeenSet)
{
payload.WithInteger("Timeout", m_timeout);
}
if(m_maxCapacityHasBeenSet)
{
payload.WithDouble("MaxCapacity", m_maxCapacity);
}
if(m_securityConfigurationHasBeenSet)
{
payload.WithString("SecurityConfiguration", m_securityConfiguration);
}
if(m_notificationPropertyHasBeenSet)
{
payload.WithObject("NotificationProperty", m_notificationProperty.Jsonize());
}
if(m_workerTypeHasBeenSet)
{
payload.WithString("WorkerType", WorkerTypeMapper::GetNameForWorkerType(m_workerType));
}
if(m_numberOfWorkersHasBeenSet)
{
payload.WithInteger("NumberOfWorkers", m_numberOfWorkers);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection StartJobRunRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSGlue.StartJobRun"));
return headers;
}