/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::VPCLattice::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateTargetGroupRequest::CreateTargetGroupRequest() : m_clientToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientTokenHasBeenSet(true), m_configHasBeenSet(false), m_nameHasBeenSet(false), m_tagsHasBeenSet(false), m_type(TargetGroupType::NOT_SET), m_typeHasBeenSet(false) { } Aws::String CreateTargetGroupRequest::SerializePayload() const { JsonValue payload; if(m_clientTokenHasBeenSet) { payload.WithString("clientToken", m_clientToken); } if(m_configHasBeenSet) { payload.WithObject("config", m_config.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)); } if(m_typeHasBeenSet) { payload.WithString("type", TargetGroupTypeMapper::GetNameForTargetGroupType(m_type)); } return payload.View().WriteReadable(); }