/** * 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::ECS::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListClustersResult::ListClustersResult() { } ListClustersResult::ListClustersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListClustersResult& ListClustersResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("clusterArns")) { Aws::Utils::Array clusterArnsJsonList = jsonValue.GetArray("clusterArns"); for(unsigned clusterArnsIndex = 0; clusterArnsIndex < clusterArnsJsonList.GetLength(); ++clusterArnsIndex) { m_clusterArns.push_back(clusterArnsJsonList[clusterArnsIndex].AsString()); } } if(jsonValue.ValueExists("nextToken")) { m_nextToken = jsonValue.GetString("nextToken"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }