/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::OpsWorks::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; DescribeLayersRequest::DescribeLayersRequest() : m_stackIdHasBeenSet(false), m_layerIdsHasBeenSet(false) { } Aws::String DescribeLayersRequest::SerializePayload() const { JsonValue payload; if(m_stackIdHasBeenSet) { payload.WithString("StackId", m_stackId); } if(m_layerIdsHasBeenSet) { Aws::Utils::Array layerIdsJsonList(m_layerIds.size()); for(unsigned layerIdsIndex = 0; layerIdsIndex < layerIdsJsonList.GetLength(); ++layerIdsIndex) { layerIdsJsonList[layerIdsIndex].AsString(m_layerIds[layerIdsIndex]); } payload.WithArray("LayerIds", std::move(layerIdsJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection DescribeLayersRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "OpsWorks_20130218.DescribeLayers")); return headers; }