/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::RAM::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreatePermissionRequest::CreatePermissionRequest() : m_nameHasBeenSet(false), m_resourceTypeHasBeenSet(false), m_policyTemplateHasBeenSet(false), m_clientTokenHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreatePermissionRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_resourceTypeHasBeenSet) { payload.WithString("resourceType", m_resourceType); } if(m_policyTemplateHasBeenSet) { payload.WithString("policyTemplate", m_policyTemplate); } if(m_clientTokenHasBeenSet) { payload.WithString("clientToken", m_clientToken); } 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(); }