/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Personalize::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateDatasetGroupRequest::CreateDatasetGroupRequest() : m_nameHasBeenSet(false), m_roleArnHasBeenSet(false), m_kmsKeyArnHasBeenSet(false), m_domain(Domain::NOT_SET), m_domainHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateDatasetGroupRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_roleArnHasBeenSet) { payload.WithString("roleArn", m_roleArn); } if(m_kmsKeyArnHasBeenSet) { payload.WithString("kmsKeyArn", m_kmsKeyArn); } if(m_domainHasBeenSet) { payload.WithString("domain", DomainMapper::GetNameForDomain(m_domain)); } 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 CreateDatasetGroupRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonPersonalize.CreateDatasetGroup")); return headers; }