/** * 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::Greengrass::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; CreateSoftwareUpdateJobResult::CreateSoftwareUpdateJobResult() { } CreateSoftwareUpdateJobResult::CreateSoftwareUpdateJobResult(const Aws::AmazonWebServiceResult& result) { *this = result; } CreateSoftwareUpdateJobResult& CreateSoftwareUpdateJobResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("IotJobArn")) { m_iotJobArn = jsonValue.GetString("IotJobArn"); } if(jsonValue.ValueExists("IotJobId")) { m_iotJobId = jsonValue.GetString("IotJobId"); } if(jsonValue.ValueExists("PlatformSoftwareVersion")) { m_platformSoftwareVersion = jsonValue.GetString("PlatformSoftwareVersion"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }