/** * 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; ListLocationsRequest::ListLocationsRequest() : m_filtersHasBeenSet(false), m_limit(0), m_limitHasBeenSet(false), m_nextTokenHasBeenSet(false) { } Aws::String ListLocationsRequest::SerializePayload() const { JsonValue payload; if(m_filtersHasBeenSet) { Aws::Utils::Array filtersJsonList(m_filters.size()); for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex) { filtersJsonList[filtersIndex].AsString(LocationFilterMapper::GetNameForLocationFilter(m_filters[filtersIndex])); } payload.WithArray("Filters", std::move(filtersJsonList)); } if(m_limitHasBeenSet) { payload.WithInteger("Limit", m_limit); } if(m_nextTokenHasBeenSet) { payload.WithString("NextToken", m_nextToken); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection ListLocationsRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "GameLift.ListLocations")); return headers; }