/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::IoTEvents::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateDetectorModelRequest::CreateDetectorModelRequest() : m_detectorModelNameHasBeenSet(false), m_detectorModelDefinitionHasBeenSet(false), m_detectorModelDescriptionHasBeenSet(false), m_keyHasBeenSet(false), m_roleArnHasBeenSet(false), m_tagsHasBeenSet(false), m_evaluationMethod(EvaluationMethod::NOT_SET), m_evaluationMethodHasBeenSet(false) { } Aws::String CreateDetectorModelRequest::SerializePayload() const { JsonValue payload; if(m_detectorModelNameHasBeenSet) { payload.WithString("detectorModelName", m_detectorModelName); } if(m_detectorModelDefinitionHasBeenSet) { payload.WithObject("detectorModelDefinition", m_detectorModelDefinition.Jsonize()); } if(m_detectorModelDescriptionHasBeenSet) { payload.WithString("detectorModelDescription", m_detectorModelDescription); } if(m_keyHasBeenSet) { payload.WithString("key", m_key); } if(m_roleArnHasBeenSet) { payload.WithString("roleArn", m_roleArn); } 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)); } if(m_evaluationMethodHasBeenSet) { payload.WithString("evaluationMethod", EvaluationMethodMapper::GetNameForEvaluationMethod(m_evaluationMethod)); } return payload.View().WriteReadable(); }