/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::SecurityLake::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; ListLogSourcesRequest::ListLogSourcesRequest() : m_accountsHasBeenSet(false), m_maxResults(0), m_maxResultsHasBeenSet(false), m_nextTokenHasBeenSet(false), m_regionsHasBeenSet(false), m_sourcesHasBeenSet(false) { } Aws::String ListLogSourcesRequest::SerializePayload() const { JsonValue payload; if(m_accountsHasBeenSet) { Aws::Utils::Array accountsJsonList(m_accounts.size()); for(unsigned accountsIndex = 0; accountsIndex < accountsJsonList.GetLength(); ++accountsIndex) { accountsJsonList[accountsIndex].AsString(m_accounts[accountsIndex]); } payload.WithArray("accounts", std::move(accountsJsonList)); } if(m_maxResultsHasBeenSet) { payload.WithInteger("maxResults", m_maxResults); } if(m_nextTokenHasBeenSet) { payload.WithString("nextToken", m_nextToken); } if(m_regionsHasBeenSet) { Aws::Utils::Array regionsJsonList(m_regions.size()); for(unsigned regionsIndex = 0; regionsIndex < regionsJsonList.GetLength(); ++regionsIndex) { regionsJsonList[regionsIndex].AsString(m_regions[regionsIndex]); } payload.WithArray("regions", std::move(regionsJsonList)); } if(m_sourcesHasBeenSet) { Aws::Utils::Array sourcesJsonList(m_sources.size()); for(unsigned sourcesIndex = 0; sourcesIndex < sourcesJsonList.GetLength(); ++sourcesIndex) { sourcesJsonList[sourcesIndex].AsObject(m_sources[sourcesIndex].Jsonize()); } payload.WithArray("sources", std::move(sourcesJsonList)); } return payload.View().WriteReadable(); }