/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ECS::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; DescribeServicesRequest::DescribeServicesRequest() : m_clusterHasBeenSet(false), m_servicesHasBeenSet(false), m_includeHasBeenSet(false) { } Aws::String DescribeServicesRequest::SerializePayload() const { JsonValue payload; if(m_clusterHasBeenSet) { payload.WithString("cluster", m_cluster); } if(m_servicesHasBeenSet) { Aws::Utils::Array servicesJsonList(m_services.size()); for(unsigned servicesIndex = 0; servicesIndex < servicesJsonList.GetLength(); ++servicesIndex) { servicesJsonList[servicesIndex].AsString(m_services[servicesIndex]); } payload.WithArray("services", std::move(servicesJsonList)); } if(m_includeHasBeenSet) { Aws::Utils::Array includeJsonList(m_include.size()); for(unsigned includeIndex = 0; includeIndex < includeJsonList.GetLength(); ++includeIndex) { includeJsonList[includeIndex].AsString(ServiceFieldMapper::GetNameForServiceField(m_include[includeIndex])); } payload.WithArray("include", std::move(includeJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection DescribeServicesRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonEC2ContainerServiceV20141113.DescribeServices")); return headers; }