/** * 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; CreateRuleRequest::CreateRuleRequest() : m_actionHasBeenSet(false), m_clientToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientTokenHasBeenSet(true), m_listenerIdentifierHasBeenSet(false), m_matchHasBeenSet(false), m_nameHasBeenSet(false), m_priority(0), m_priorityHasBeenSet(false), m_serviceIdentifierHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateRuleRequest::SerializePayload() const { JsonValue payload; if(m_actionHasBeenSet) { payload.WithObject("action", m_action.Jsonize()); } if(m_clientTokenHasBeenSet) { payload.WithString("clientToken", m_clientToken); } if(m_matchHasBeenSet) { payload.WithObject("match", m_match.Jsonize()); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_priorityHasBeenSet) { payload.WithInteger("priority", m_priority); } 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(); }