/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include using namespace Aws::IoT::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListOTAUpdatesResult::ListOTAUpdatesResult() { } ListOTAUpdatesResult::ListOTAUpdatesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListOTAUpdatesResult& ListOTAUpdatesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("otaUpdates")) { Array otaUpdatesJsonList = jsonValue.GetArray("otaUpdates"); for(unsigned otaUpdatesIndex = 0; otaUpdatesIndex < otaUpdatesJsonList.GetLength(); ++otaUpdatesIndex) { m_otaUpdates.push_back(otaUpdatesJsonList[otaUpdatesIndex].AsObject()); } } if(jsonValue.ValueExists("nextToken")) { m_nextToken = jsonValue.GetString("nextToken"); } return *this; }