/** * 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 Glue { namespace Model { PartitionValueList::PartitionValueList() : m_valuesHasBeenSet(false) { } PartitionValueList::PartitionValueList(JsonView jsonValue) : m_valuesHasBeenSet(false) { *this = jsonValue; } PartitionValueList& PartitionValueList::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Values")) { Aws::Utils::Array valuesJsonList = jsonValue.GetArray("Values"); for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex) { m_values.push_back(valuesJsonList[valuesIndex].AsString()); } m_valuesHasBeenSet = true; } return *this; } JsonValue PartitionValueList::Jsonize() const { JsonValue payload; if(m_valuesHasBeenSet) { Aws::Utils::Array valuesJsonList(m_values.size()); for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex) { valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]); } payload.WithArray("Values", std::move(valuesJsonList)); } return payload; } } // namespace Model } // namespace Glue } // namespace Aws