56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/gamelift/model/StopFleetActionsRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::GameLift::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
StopFleetActionsRequest::StopFleetActionsRequest() :
|
|
m_fleetIdHasBeenSet(false),
|
|
m_actionsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String StopFleetActionsRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_fleetIdHasBeenSet)
|
|
{
|
|
payload.WithString("FleetId", m_fleetId);
|
|
|
|
}
|
|
|
|
if(m_actionsHasBeenSet)
|
|
{
|
|
Array<JsonValue> actionsJsonList(m_actions.size());
|
|
for(unsigned actionsIndex = 0; actionsIndex < actionsJsonList.GetLength(); ++actionsIndex)
|
|
{
|
|
actionsJsonList[actionsIndex].AsString(FleetActionMapper::GetNameForFleetAction(m_actions[actionsIndex]));
|
|
}
|
|
payload.WithArray("Actions", std::move(actionsJsonList));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection StopFleetActionsRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "GameLift.StopFleetActions"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|