This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-iotevents/source/model/CreateDetectorModelRequest.cpp

83 lines
1.8 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/iotevents/model/CreateDetectorModelRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
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)
{
Array<JsonValue> 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();
}