/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace QuickSight { namespace Model { FieldFolder::FieldFolder() : m_descriptionHasBeenSet(false), m_columnsHasBeenSet(false) { } FieldFolder::FieldFolder(JsonView jsonValue) : m_descriptionHasBeenSet(false), m_columnsHasBeenSet(false) { *this = jsonValue; } FieldFolder& FieldFolder::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("description")) { m_description = jsonValue.GetString("description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("columns")) { Aws::Utils::Array columnsJsonList = jsonValue.GetArray("columns"); for(unsigned columnsIndex = 0; columnsIndex < columnsJsonList.GetLength(); ++columnsIndex) { m_columns.push_back(columnsJsonList[columnsIndex].AsString()); } m_columnsHasBeenSet = true; } return *this; } JsonValue FieldFolder::Jsonize() const { JsonValue payload; if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_columnsHasBeenSet) { Aws::Utils::Array columnsJsonList(m_columns.size()); for(unsigned columnsIndex = 0; columnsIndex < columnsJsonList.GetLength(); ++columnsIndex) { columnsJsonList[columnsIndex].AsString(m_columns[columnsIndex]); } payload.WithArray("columns", std::move(columnsJsonList)); } return payload; } } // namespace Model } // namespace QuickSight } // namespace Aws