/** * 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 Rekognition { namespace Model { ValidationData::ValidationData() : m_assetsHasBeenSet(false) { } ValidationData::ValidationData(JsonView jsonValue) : m_assetsHasBeenSet(false) { *this = jsonValue; } ValidationData& ValidationData::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Assets")) { Aws::Utils::Array assetsJsonList = jsonValue.GetArray("Assets"); for(unsigned assetsIndex = 0; assetsIndex < assetsJsonList.GetLength(); ++assetsIndex) { m_assets.push_back(assetsJsonList[assetsIndex].AsObject()); } m_assetsHasBeenSet = true; } return *this; } JsonValue ValidationData::Jsonize() const { JsonValue payload; if(m_assetsHasBeenSet) { Aws::Utils::Array assetsJsonList(m_assets.size()); for(unsigned assetsIndex = 0; assetsIndex < assetsJsonList.GetLength(); ++assetsIndex) { assetsJsonList[assetsIndex].AsObject(m_assets[assetsIndex].Jsonize()); } payload.WithArray("Assets", std::move(assetsJsonList)); } return payload; } } // namespace Model } // namespace Rekognition } // namespace Aws