/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include #include using namespace Aws::GroundStation::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListSatellitesResult::ListSatellitesResult() { } ListSatellitesResult::ListSatellitesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListSatellitesResult& ListSatellitesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("nextToken")) { m_nextToken = jsonValue.GetString("nextToken"); } if(jsonValue.ValueExists("satellites")) { Aws::Utils::Array satellitesJsonList = jsonValue.GetArray("satellites"); for(unsigned satellitesIndex = 0; satellitesIndex < satellitesJsonList.GetLength(); ++satellitesIndex) { m_satellites.push_back(satellitesJsonList[satellitesIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }