/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::CloudWatchLogs::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; PutDestinationRequest::PutDestinationRequest() : m_destinationNameHasBeenSet(false), m_targetArnHasBeenSet(false), m_roleArnHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String PutDestinationRequest::SerializePayload() const { JsonValue payload; if(m_destinationNameHasBeenSet) { payload.WithString("destinationName", m_destinationName); } if(m_targetArnHasBeenSet) { payload.WithString("targetArn", m_targetArn); } if(m_roleArnHasBeenSet) { payload.WithString("roleArn", m_roleArn); } if(m_tagsHasBeenSet) { JsonValue tagsJsonMap; for(auto& tagsItem : m_tags) { tagsJsonMap.WithString(tagsItem.first, tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection PutDestinationRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Logs_20140328.PutDestination")); return headers; }