1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/accessanalyzer/model/UpdateArchiveRuleRequest.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 9 #include <utility> 10 11 using namespace Aws::AccessAnalyzer::Model; 12 using namespace Aws::Utils::Json; 13 using namespace Aws::Utils; 14 UpdateArchiveRuleRequest()15UpdateArchiveRuleRequest::UpdateArchiveRuleRequest() : 16 m_analyzerNameHasBeenSet(false), 17 m_clientToken(Aws::Utils::UUID::RandomUUID()), 18 m_clientTokenHasBeenSet(true), 19 m_filterHasBeenSet(false), 20 m_ruleNameHasBeenSet(false) 21 { 22 } 23 SerializePayload() const24Aws::String UpdateArchiveRuleRequest::SerializePayload() const 25 { 26 JsonValue payload; 27 28 if(m_clientTokenHasBeenSet) 29 { 30 payload.WithString("clientToken", m_clientToken); 31 32 } 33 34 if(m_filterHasBeenSet) 35 { 36 JsonValue filterJsonMap; 37 for(auto& filterItem : m_filter) 38 { 39 filterJsonMap.WithObject(filterItem.first, filterItem.second.Jsonize()); 40 } 41 payload.WithObject("filter", std::move(filterJsonMap)); 42 43 } 44 45 return payload.View().WriteReadable(); 46 } 47 48 49 50 51