/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::NetworkFirewall::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateFirewallPolicyRequest::CreateFirewallPolicyRequest() : m_firewallPolicyNameHasBeenSet(false), m_firewallPolicyHasBeenSet(false), m_descriptionHasBeenSet(false), m_tagsHasBeenSet(false), m_dryRun(false), m_dryRunHasBeenSet(false), m_encryptionConfigurationHasBeenSet(false) { } Aws::String CreateFirewallPolicyRequest::SerializePayload() const { JsonValue payload; if(m_firewallPolicyNameHasBeenSet) { payload.WithString("FirewallPolicyName", m_firewallPolicyName); } if(m_firewallPolicyHasBeenSet) { payload.WithObject("FirewallPolicy", m_firewallPolicy.Jsonize()); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_tagsHasBeenSet) { Aws::Utils::Array tagsJsonList(m_tags.size()); for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex) { tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize()); } payload.WithArray("Tags", std::move(tagsJsonList)); } if(m_dryRunHasBeenSet) { payload.WithBool("DryRun", m_dryRun); } if(m_encryptionConfigurationHasBeenSet) { payload.WithObject("EncryptionConfiguration", m_encryptionConfiguration.Jsonize()); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection CreateFirewallPolicyRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "NetworkFirewall_20201112.CreateFirewallPolicy")); return headers; }