This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-backup/source/model/DescribeBackupJobResult.cpp

149 lines
3.1 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeBackupJobResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeBackupJobResult::DescribeBackupJobResult() :
m_state(BackupJobState::NOT_SET),
m_backupSizeInBytes(0),
m_bytesTransferred(0)
{
}
DescribeBackupJobResult::DescribeBackupJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_state(BackupJobState::NOT_SET),
m_backupSizeInBytes(0),
m_bytesTransferred(0)
{
*this = result;
}
DescribeBackupJobResult& DescribeBackupJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("AccountId"))
{
m_accountId = jsonValue.GetString("AccountId");
}
if(jsonValue.ValueExists("BackupJobId"))
{
m_backupJobId = jsonValue.GetString("BackupJobId");
}
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
}
if(jsonValue.ValueExists("RecoveryPointArn"))
{
m_recoveryPointArn = jsonValue.GetString("RecoveryPointArn");
}
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
if(jsonValue.ValueExists("CompletionDate"))
{
m_completionDate = jsonValue.GetDouble("CompletionDate");
}
if(jsonValue.ValueExists("State"))
{
m_state = BackupJobStateMapper::GetBackupJobStateForName(jsonValue.GetString("State"));
}
if(jsonValue.ValueExists("StatusMessage"))
{
m_statusMessage = jsonValue.GetString("StatusMessage");
}
if(jsonValue.ValueExists("PercentDone"))
{
m_percentDone = jsonValue.GetString("PercentDone");
}
if(jsonValue.ValueExists("BackupSizeInBytes"))
{
m_backupSizeInBytes = jsonValue.GetInt64("BackupSizeInBytes");
}
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
}
if(jsonValue.ValueExists("CreatedBy"))
{
m_createdBy = jsonValue.GetObject("CreatedBy");
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
}
if(jsonValue.ValueExists("BytesTransferred"))
{
m_bytesTransferred = jsonValue.GetInt64("BytesTransferred");
}
if(jsonValue.ValueExists("ExpectedCompletionDate"))
{
m_expectedCompletionDate = jsonValue.GetDouble("ExpectedCompletionDate");
}
if(jsonValue.ValueExists("StartBy"))
{
m_startBy = jsonValue.GetDouble("StartBy");
}
return *this;
}