/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::FraudDetector::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateModelRequest::CreateModelRequest() : m_modelIdHasBeenSet(false), m_modelType(ModelTypeEnum::NOT_SET), m_modelTypeHasBeenSet(false), m_descriptionHasBeenSet(false), m_eventTypeNameHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateModelRequest::SerializePayload() const { JsonValue payload; if(m_modelIdHasBeenSet) { payload.WithString("modelId", m_modelId); } if(m_modelTypeHasBeenSet) { payload.WithString("modelType", ModelTypeEnumMapper::GetNameForModelTypeEnum(m_modelType)); } if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_eventTypeNameHasBeenSet) { payload.WithString("eventTypeName", m_eventTypeName); } 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 CreateModelRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSHawksNestServiceFacade.CreateModel")); return headers; }