/** * 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::Backup::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeFrameworkResult::DescribeFrameworkResult() { } DescribeFrameworkResult::DescribeFrameworkResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DescribeFrameworkResult& DescribeFrameworkResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("FrameworkName")) { m_frameworkName = jsonValue.GetString("FrameworkName"); } if(jsonValue.ValueExists("FrameworkArn")) { m_frameworkArn = jsonValue.GetString("FrameworkArn"); } if(jsonValue.ValueExists("FrameworkDescription")) { m_frameworkDescription = jsonValue.GetString("FrameworkDescription"); } if(jsonValue.ValueExists("FrameworkControls")) { Aws::Utils::Array frameworkControlsJsonList = jsonValue.GetArray("FrameworkControls"); for(unsigned frameworkControlsIndex = 0; frameworkControlsIndex < frameworkControlsJsonList.GetLength(); ++frameworkControlsIndex) { m_frameworkControls.push_back(frameworkControlsJsonList[frameworkControlsIndex].AsObject()); } } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetDouble("CreationTime"); } if(jsonValue.ValueExists("DeploymentStatus")) { m_deploymentStatus = jsonValue.GetString("DeploymentStatus"); } if(jsonValue.ValueExists("FrameworkStatus")) { m_frameworkStatus = jsonValue.GetString("FrameworkStatus"); } if(jsonValue.ValueExists("IdempotencyToken")) { m_idempotencyToken = jsonValue.GetString("IdempotencyToken"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }