1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/securityhub/model/UpdateFindingAggregatorRequest.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 9 #include <utility> 10 11 using namespace Aws::SecurityHub::Model; 12 using namespace Aws::Utils::Json; 13 using namespace Aws::Utils; 14 UpdateFindingAggregatorRequest()15UpdateFindingAggregatorRequest::UpdateFindingAggregatorRequest() : 16 m_findingAggregatorArnHasBeenSet(false), 17 m_regionLinkingModeHasBeenSet(false), 18 m_regionsHasBeenSet(false) 19 { 20 } 21 SerializePayload() const22Aws::String UpdateFindingAggregatorRequest::SerializePayload() const 23 { 24 JsonValue payload; 25 26 if(m_findingAggregatorArnHasBeenSet) 27 { 28 payload.WithString("FindingAggregatorArn", m_findingAggregatorArn); 29 30 } 31 32 if(m_regionLinkingModeHasBeenSet) 33 { 34 payload.WithString("RegionLinkingMode", m_regionLinkingMode); 35 36 } 37 38 if(m_regionsHasBeenSet) 39 { 40 Array<JsonValue> regionsJsonList(m_regions.size()); 41 for(unsigned regionsIndex = 0; regionsIndex < regionsJsonList.GetLength(); ++regionsIndex) 42 { 43 regionsJsonList[regionsIndex].AsString(m_regions[regionsIndex]); 44 } 45 payload.WithArray("Regions", std::move(regionsJsonList)); 46 47 } 48 49 return payload.View().WriteReadable(); 50 } 51 52 53 54 55