/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Proton::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateEnvironmentTemplateRequest::CreateEnvironmentTemplateRequest() : m_descriptionHasBeenSet(false), m_displayNameHasBeenSet(false), m_encryptionKeyHasBeenSet(false), m_nameHasBeenSet(false), m_provisioning(Provisioning::NOT_SET), m_provisioningHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateEnvironmentTemplateRequest::SerializePayload() const { JsonValue payload; if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_displayNameHasBeenSet) { payload.WithString("displayName", m_displayName); } if(m_encryptionKeyHasBeenSet) { payload.WithString("encryptionKey", m_encryptionKey); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_provisioningHasBeenSet) { payload.WithString("provisioning", ProvisioningMapper::GetNameForProvisioning(m_provisioning)); } 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 CreateEnvironmentTemplateRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AwsProton20200720.CreateEnvironmentTemplate")); return headers; }