/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Comprehend::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateDatasetRequest::CreateDatasetRequest() : m_flywheelArnHasBeenSet(false), m_datasetNameHasBeenSet(false), m_datasetType(DatasetType::NOT_SET), m_datasetTypeHasBeenSet(false), m_descriptionHasBeenSet(false), m_inputDataConfigHasBeenSet(false), m_clientRequestToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientRequestTokenHasBeenSet(true), m_tagsHasBeenSet(false) { } Aws::String CreateDatasetRequest::SerializePayload() const { JsonValue payload; if(m_flywheelArnHasBeenSet) { payload.WithString("FlywheelArn", m_flywheelArn); } if(m_datasetNameHasBeenSet) { payload.WithString("DatasetName", m_datasetName); } if(m_datasetTypeHasBeenSet) { payload.WithString("DatasetType", DatasetTypeMapper::GetNameForDatasetType(m_datasetType)); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_inputDataConfigHasBeenSet) { payload.WithObject("InputDataConfig", m_inputDataConfig.Jsonize()); } if(m_clientRequestTokenHasBeenSet) { payload.WithString("ClientRequestToken", m_clientRequestToken); } 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 CreateDatasetRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Comprehend_20171127.CreateDataset")); return headers; }