/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::GuardDuty::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; UpdateDetectorRequest::UpdateDetectorRequest() : m_detectorIdHasBeenSet(false), m_enable(false), m_enableHasBeenSet(false), m_findingPublishingFrequency(FindingPublishingFrequency::NOT_SET), m_findingPublishingFrequencyHasBeenSet(false), m_featuresHasBeenSet(false) { } Aws::String UpdateDetectorRequest::SerializePayload() const { JsonValue payload; if(m_enableHasBeenSet) { payload.WithBool("enable", m_enable); } if(m_findingPublishingFrequencyHasBeenSet) { payload.WithString("findingPublishingFrequency", FindingPublishingFrequencyMapper::GetNameForFindingPublishingFrequency(m_findingPublishingFrequency)); } if(m_featuresHasBeenSet) { Aws::Utils::Array featuresJsonList(m_features.size()); for(unsigned featuresIndex = 0; featuresIndex < featuresJsonList.GetLength(); ++featuresIndex) { featuresJsonList[featuresIndex].AsObject(m_features[featuresIndex].Jsonize()); } payload.WithArray("features", std::move(featuresJsonList)); } return payload.View().WriteReadable(); }