/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include using namespace Aws::Greengrass::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateFunctionDefinitionRequest::CreateFunctionDefinitionRequest() : m_amznClientTokenHasBeenSet(false), m_initialVersionHasBeenSet(false), m_nameHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateFunctionDefinitionRequest::SerializePayload() const { JsonValue payload; if(m_initialVersionHasBeenSet) { payload.WithObject("InitialVersion", m_initialVersion.Jsonize()); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } 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 CreateFunctionDefinitionRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; Aws::StringStream ss; if(m_amznClientTokenHasBeenSet) { ss << m_amznClientToken; headers.emplace("x-amzn-client-token", ss.str()); ss.str(""); } return headers; }