/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::GameLift::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; StopFleetActionsRequest::StopFleetActionsRequest() : m_fleetIdHasBeenSet(false), m_actionsHasBeenSet(false), m_locationHasBeenSet(false) { } Aws::String StopFleetActionsRequest::SerializePayload() const { JsonValue payload; if(m_fleetIdHasBeenSet) { payload.WithString("FleetId", m_fleetId); } if(m_actionsHasBeenSet) { Aws::Utils::Array 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)); } if(m_locationHasBeenSet) { payload.WithString("Location", m_location); } 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; }