/** * 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; GetBackupPlanResult::GetBackupPlanResult() { } GetBackupPlanResult::GetBackupPlanResult(const Aws::AmazonWebServiceResult& result) { *this = result; } GetBackupPlanResult& GetBackupPlanResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("BackupPlan")) { m_backupPlan = jsonValue.GetObject("BackupPlan"); } if(jsonValue.ValueExists("BackupPlanId")) { m_backupPlanId = jsonValue.GetString("BackupPlanId"); } if(jsonValue.ValueExists("BackupPlanArn")) { m_backupPlanArn = jsonValue.GetString("BackupPlanArn"); } if(jsonValue.ValueExists("VersionId")) { m_versionId = jsonValue.GetString("VersionId"); } if(jsonValue.ValueExists("CreatorRequestId")) { m_creatorRequestId = jsonValue.GetString("CreatorRequestId"); } if(jsonValue.ValueExists("CreationDate")) { m_creationDate = jsonValue.GetDouble("CreationDate"); } if(jsonValue.ValueExists("DeletionDate")) { m_deletionDate = jsonValue.GetDouble("DeletionDate"); } if(jsonValue.ValueExists("LastExecutionDate")) { m_lastExecutionDate = jsonValue.GetDouble("LastExecutionDate"); } if(jsonValue.ValueExists("AdvancedBackupSettings")) { Aws::Utils::Array advancedBackupSettingsJsonList = jsonValue.GetArray("AdvancedBackupSettings"); for(unsigned advancedBackupSettingsIndex = 0; advancedBackupSettingsIndex < advancedBackupSettingsJsonList.GetLength(); ++advancedBackupSettingsIndex) { m_advancedBackupSettings.push_back(advancedBackupSettingsJsonList[advancedBackupSettingsIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }