/** * 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 { CollectiveConstant::CollectiveConstant() : m_valueListHasBeenSet(false) { } CollectiveConstant::CollectiveConstant(JsonView jsonValue) : m_valueListHasBeenSet(false) { *this = jsonValue; } CollectiveConstant& CollectiveConstant::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("ValueList")) { Aws::Utils::Array valueListJsonList = jsonValue.GetArray("ValueList"); for(unsigned valueListIndex = 0; valueListIndex < valueListJsonList.GetLength(); ++valueListIndex) { m_valueList.push_back(valueListJsonList[valueListIndex].AsString()); } m_valueListHasBeenSet = true; } return *this; } JsonValue CollectiveConstant::Jsonize() const { JsonValue payload; if(m_valueListHasBeenSet) { Aws::Utils::Array valueListJsonList(m_valueList.size()); for(unsigned valueListIndex = 0; valueListIndex < valueListJsonList.GetLength(); ++valueListIndex) { valueListJsonList[valueListIndex].AsString(m_valueList[valueListIndex]); } payload.WithArray("ValueList", std::move(valueListJsonList)); } return payload; } } // namespace Model } // namespace QuickSight } // namespace Aws