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/GetFindingAggregatorResult.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 #include <aws/core/AmazonWebServiceResult.h> 9 #include <aws/core/utils/StringUtils.h> 10 #include <aws/core/utils/UnreferencedParam.h> 11 12 #include <utility> 13 14 using namespace Aws::SecurityHub::Model; 15 using namespace Aws::Utils::Json; 16 using namespace Aws::Utils; 17 using namespace Aws; 18 GetFindingAggregatorResult()19GetFindingAggregatorResult::GetFindingAggregatorResult() 20 { 21 } 22 GetFindingAggregatorResult(const Aws::AmazonWebServiceResult<JsonValue> & result)23GetFindingAggregatorResult::GetFindingAggregatorResult(const Aws::AmazonWebServiceResult<JsonValue>& result) 24 { 25 *this = result; 26 } 27 operator =(const Aws::AmazonWebServiceResult<JsonValue> & result)28GetFindingAggregatorResult& GetFindingAggregatorResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result) 29 { 30 JsonView jsonValue = result.GetPayload().View(); 31 if(jsonValue.ValueExists("FindingAggregatorArn")) 32 { 33 m_findingAggregatorArn = jsonValue.GetString("FindingAggregatorArn"); 34 35 } 36 37 if(jsonValue.ValueExists("FindingAggregationRegion")) 38 { 39 m_findingAggregationRegion = jsonValue.GetString("FindingAggregationRegion"); 40 41 } 42 43 if(jsonValue.ValueExists("RegionLinkingMode")) 44 { 45 m_regionLinkingMode = jsonValue.GetString("RegionLinkingMode"); 46 47 } 48 49 if(jsonValue.ValueExists("Regions")) 50 { 51 Array<JsonView> regionsJsonList = jsonValue.GetArray("Regions"); 52 for(unsigned regionsIndex = 0; regionsIndex < regionsJsonList.GetLength(); ++regionsIndex) 53 { 54 m_regions.push_back(regionsJsonList[regionsIndex].AsString()); 55 } 56 } 57 58 59 60 return *this; 61 } 62