/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::DirectoryService::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateMicrosoftADRequest::CreateMicrosoftADRequest() : m_nameHasBeenSet(false), m_shortNameHasBeenSet(false), m_passwordHasBeenSet(false), m_descriptionHasBeenSet(false), m_vpcSettingsHasBeenSet(false), m_edition(DirectoryEdition::NOT_SET), m_editionHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateMicrosoftADRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_shortNameHasBeenSet) { payload.WithString("ShortName", m_shortName); } if(m_passwordHasBeenSet) { payload.WithString("Password", m_password); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_vpcSettingsHasBeenSet) { payload.WithObject("VpcSettings", m_vpcSettings.Jsonize()); } if(m_editionHasBeenSet) { payload.WithString("Edition", DirectoryEditionMapper::GetNameForDirectoryEdition(m_edition)); } 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)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection CreateMicrosoftADRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "DirectoryService_20150416.CreateMicrosoftAD")); return headers; }