/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ResourceExplorer2::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; ListIndexesRequest::ListIndexesRequest() : m_maxResults(0), m_maxResultsHasBeenSet(false), m_nextTokenHasBeenSet(false), m_regionsHasBeenSet(false), m_type(IndexType::NOT_SET), m_typeHasBeenSet(false) { } Aws::String ListIndexesRequest::SerializePayload() const { JsonValue payload; 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_typeHasBeenSet) { payload.WithString("Type", IndexTypeMapper::GetNameForIndexType(m_type)); } return payload.View().WriteReadable(); }