1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/backup/model/UpdateBackupPlanResult.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 #include <aws/core/AmazonWebServiceResult.h> 9 #include <aws/core/utils/StringUtils.h> 10 #include <aws/core/utils/UnreferencedParam.h> 11 12 #include <utility> 13 14 using namespace Aws::Backup::Model; 15 using namespace Aws::Utils::Json; 16 using namespace Aws::Utils; 17 using namespace Aws; 18 UpdateBackupPlanResult()19UpdateBackupPlanResult::UpdateBackupPlanResult() 20 { 21 } 22 UpdateBackupPlanResult(const Aws::AmazonWebServiceResult<JsonValue> & result)23UpdateBackupPlanResult::UpdateBackupPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result) 24 { 25 *this = result; 26 } 27 operator =(const Aws::AmazonWebServiceResult<JsonValue> & result)28UpdateBackupPlanResult& UpdateBackupPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result) 29 { 30 JsonView jsonValue = result.GetPayload().View(); 31 if(jsonValue.ValueExists("BackupPlanId")) 32 { 33 m_backupPlanId = jsonValue.GetString("BackupPlanId"); 34 35 } 36 37 if(jsonValue.ValueExists("BackupPlanArn")) 38 { 39 m_backupPlanArn = jsonValue.GetString("BackupPlanArn"); 40 41 } 42 43 if(jsonValue.ValueExists("CreationDate")) 44 { 45 m_creationDate = jsonValue.GetDouble("CreationDate"); 46 47 } 48 49 if(jsonValue.ValueExists("VersionId")) 50 { 51 m_versionId = jsonValue.GetString("VersionId"); 52 53 } 54 55 if(jsonValue.ValueExists("AdvancedBackupSettings")) 56 { 57 Array<JsonView> advancedBackupSettingsJsonList = jsonValue.GetArray("AdvancedBackupSettings"); 58 for(unsigned advancedBackupSettingsIndex = 0; advancedBackupSettingsIndex < advancedBackupSettingsJsonList.GetLength(); ++advancedBackupSettingsIndex) 59 { 60 m_advancedBackupSettings.push_back(advancedBackupSettingsJsonList[advancedBackupSettingsIndex].AsObject()); 61 } 62 } 63 64 65 66 return *this; 67 } 68