/** * 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 LexModelsV2 { namespace Model { IntentLevelSlotResolutionTestResults::IntentLevelSlotResolutionTestResults() : m_itemsHasBeenSet(false) { } IntentLevelSlotResolutionTestResults::IntentLevelSlotResolutionTestResults(JsonView jsonValue) : m_itemsHasBeenSet(false) { *this = jsonValue; } IntentLevelSlotResolutionTestResults& IntentLevelSlotResolutionTestResults::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("items")) { Aws::Utils::Array itemsJsonList = jsonValue.GetArray("items"); for(unsigned itemsIndex = 0; itemsIndex < itemsJsonList.GetLength(); ++itemsIndex) { m_items.push_back(itemsJsonList[itemsIndex].AsObject()); } m_itemsHasBeenSet = true; } return *this; } JsonValue IntentLevelSlotResolutionTestResults::Jsonize() const { JsonValue payload; if(m_itemsHasBeenSet) { Aws::Utils::Array itemsJsonList(m_items.size()); for(unsigned itemsIndex = 0; itemsIndex < itemsJsonList.GetLength(); ++itemsIndex) { itemsJsonList[itemsIndex].AsObject(m_items[itemsIndex].Jsonize()); } payload.WithArray("items", std::move(itemsJsonList)); } return payload; } } // namespace Model } // namespace LexModelsV2 } // namespace Aws