/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ManagedBlockchain::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateNetworkRequest::CreateNetworkRequest() : m_clientRequestToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientRequestTokenHasBeenSet(true), m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_framework(Framework::NOT_SET), m_frameworkHasBeenSet(false), m_frameworkVersionHasBeenSet(false), m_frameworkConfigurationHasBeenSet(false), m_votingPolicyHasBeenSet(false), m_memberConfigurationHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateNetworkRequest::SerializePayload() const { JsonValue payload; if(m_clientRequestTokenHasBeenSet) { payload.WithString("ClientRequestToken", m_clientRequestToken); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_frameworkHasBeenSet) { payload.WithString("Framework", FrameworkMapper::GetNameForFramework(m_framework)); } if(m_frameworkVersionHasBeenSet) { payload.WithString("FrameworkVersion", m_frameworkVersion); } if(m_frameworkConfigurationHasBeenSet) { payload.WithObject("FrameworkConfiguration", m_frameworkConfiguration.Jsonize()); } if(m_votingPolicyHasBeenSet) { payload.WithObject("VotingPolicy", m_votingPolicy.Jsonize()); } if(m_memberConfigurationHasBeenSet) { payload.WithObject("MemberConfiguration", m_memberConfiguration.Jsonize()); } 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(); }