/** * 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; CreateVariableRequest::CreateVariableRequest() : m_nameHasBeenSet(false), m_dataType(DataType::NOT_SET), m_dataTypeHasBeenSet(false), m_dataSource(DataSource::NOT_SET), m_dataSourceHasBeenSet(false), m_defaultValueHasBeenSet(false), m_descriptionHasBeenSet(false), m_variableTypeHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateVariableRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_dataTypeHasBeenSet) { payload.WithString("dataType", DataTypeMapper::GetNameForDataType(m_dataType)); } if(m_dataSourceHasBeenSet) { payload.WithString("dataSource", DataSourceMapper::GetNameForDataSource(m_dataSource)); } if(m_defaultValueHasBeenSet) { payload.WithString("defaultValue", m_defaultValue); } if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_variableTypeHasBeenSet) { payload.WithString("variableType", m_variableType); } 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 CreateVariableRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSHawksNestServiceFacade.CreateVariable")); return headers; }