/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ApplicationAutoScaling::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; DescribeScalableTargetsRequest::DescribeScalableTargetsRequest() : m_serviceNamespace(ServiceNamespace::NOT_SET), m_serviceNamespaceHasBeenSet(false), m_resourceIdsHasBeenSet(false), m_scalableDimension(ScalableDimension::NOT_SET), m_scalableDimensionHasBeenSet(false), m_maxResults(0), m_maxResultsHasBeenSet(false), m_nextTokenHasBeenSet(false) { } Aws::String DescribeScalableTargetsRequest::SerializePayload() const { JsonValue payload; if(m_serviceNamespaceHasBeenSet) { payload.WithString("ServiceNamespace", ServiceNamespaceMapper::GetNameForServiceNamespace(m_serviceNamespace)); } if(m_resourceIdsHasBeenSet) { Aws::Utils::Array resourceIdsJsonList(m_resourceIds.size()); for(unsigned resourceIdsIndex = 0; resourceIdsIndex < resourceIdsJsonList.GetLength(); ++resourceIdsIndex) { resourceIdsJsonList[resourceIdsIndex].AsString(m_resourceIds[resourceIdsIndex]); } payload.WithArray("ResourceIds", std::move(resourceIdsJsonList)); } if(m_scalableDimensionHasBeenSet) { payload.WithString("ScalableDimension", ScalableDimensionMapper::GetNameForScalableDimension(m_scalableDimension)); } if(m_maxResultsHasBeenSet) { payload.WithInteger("MaxResults", m_maxResults); } if(m_nextTokenHasBeenSet) { payload.WithString("NextToken", m_nextToken); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection DescribeScalableTargetsRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleFrontendService.DescribeScalableTargets")); return headers; }