/** * 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::RoboMaker::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeRobotApplicationResult::DescribeRobotApplicationResult() { } DescribeRobotApplicationResult::DescribeRobotApplicationResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DescribeRobotApplicationResult& DescribeRobotApplicationResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); } if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); } if(jsonValue.ValueExists("version")) { m_version = jsonValue.GetString("version"); } if(jsonValue.ValueExists("sources")) { Aws::Utils::Array sourcesJsonList = jsonValue.GetArray("sources"); for(unsigned sourcesIndex = 0; sourcesIndex < sourcesJsonList.GetLength(); ++sourcesIndex) { m_sources.push_back(sourcesJsonList[sourcesIndex].AsObject()); } } if(jsonValue.ValueExists("robotSoftwareSuite")) { m_robotSoftwareSuite = jsonValue.GetObject("robotSoftwareSuite"); } if(jsonValue.ValueExists("revisionId")) { m_revisionId = jsonValue.GetString("revisionId"); } if(jsonValue.ValueExists("lastUpdatedAt")) { m_lastUpdatedAt = jsonValue.GetDouble("lastUpdatedAt"); } if(jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for(auto& tagsItem : tagsJsonMap) { m_tags[tagsItem.first] = tagsItem.second.AsString(); } } if(jsonValue.ValueExists("environment")) { m_environment = jsonValue.GetObject("environment"); } if(jsonValue.ValueExists("imageDigest")) { m_imageDigest = jsonValue.GetString("imageDigest"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }