feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/BackupEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::Backup;
namespace Aws
{
namespace Backup
{
namespace BackupEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "backup" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace BackupEndpoint
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/backup/BackupErrorMarshaller.h>
#include <aws/backup/BackupErrors.h>
using namespace Aws::Client;
using namespace Aws::Backup;
AWSError<CoreErrors> BackupErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = BackupErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,114 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/backup/BackupErrors.h>
#include <aws/backup/model/ServiceUnavailableException.h>
#include <aws/backup/model/DependencyFailureException.h>
#include <aws/backup/model/ResourceNotFoundException.h>
#include <aws/backup/model/LimitExceededException.h>
#include <aws/backup/model/AlreadyExistsException.h>
#include <aws/backup/model/InvalidParameterValueException.h>
#include <aws/backup/model/MissingParameterValueException.h>
#include <aws/backup/model/InvalidRequestException.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::Backup;
using namespace Aws::Backup::Model;
namespace Aws
{
namespace Backup
{
template<> AWS_BACKUP_API ServiceUnavailableException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::SERVICE_UNAVAILABLE);
return ServiceUnavailableException(this->GetJsonPayload().View());
}
template<> AWS_BACKUP_API DependencyFailureException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::DEPENDENCY_FAILURE);
return DependencyFailureException(this->GetJsonPayload().View());
}
template<> AWS_BACKUP_API ResourceNotFoundException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::RESOURCE_NOT_FOUND);
return ResourceNotFoundException(this->GetJsonPayload().View());
}
template<> AWS_BACKUP_API LimitExceededException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::LIMIT_EXCEEDED);
return LimitExceededException(this->GetJsonPayload().View());
}
template<> AWS_BACKUP_API AlreadyExistsException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::ALREADY_EXISTS);
return AlreadyExistsException(this->GetJsonPayload().View());
}
template<> AWS_BACKUP_API InvalidParameterValueException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::INVALID_PARAMETER_VALUE);
return InvalidParameterValueException(this->GetJsonPayload().View());
}
template<> AWS_BACKUP_API MissingParameterValueException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::MISSING_PARAMETER_VALUE);
return MissingParameterValueException(this->GetJsonPayload().View());
}
template<> AWS_BACKUP_API InvalidRequestException BackupError::GetModeledError()
{
assert(this->GetErrorType() == BackupErrors::INVALID_REQUEST);
return InvalidRequestException(this->GetJsonPayload().View());
}
namespace BackupErrorMapper
{
static const int DEPENDENCY_FAILURE_HASH = HashingUtils::HashString("DependencyFailureException");
static const int LIMIT_EXCEEDED_HASH = HashingUtils::HashString("LimitExceededException");
static const int ALREADY_EXISTS_HASH = HashingUtils::HashString("AlreadyExistsException");
static const int MISSING_PARAMETER_VALUE_HASH = HashingUtils::HashString("MissingParameterValueException");
static const int INVALID_REQUEST_HASH = HashingUtils::HashString("InvalidRequestException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == DEPENDENCY_FAILURE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BackupErrors::DEPENDENCY_FAILURE), false);
}
else if (hashCode == LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BackupErrors::LIMIT_EXCEEDED), true);
}
else if (hashCode == ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BackupErrors::ALREADY_EXISTS), false);
}
else if (hashCode == MISSING_PARAMETER_VALUE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BackupErrors::MISSING_PARAMETER_VALUE), false);
}
else if (hashCode == INVALID_REQUEST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BackupErrors::INVALID_REQUEST), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace BackupErrorMapper
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,134 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/AlreadyExistsException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
AlreadyExistsException::AlreadyExistsException() :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_arnHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
}
AlreadyExistsException::AlreadyExistsException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_arnHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
*this = jsonValue;
}
AlreadyExistsException& AlreadyExistsException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatorRequestId"))
{
m_creatorRequestId = jsonValue.GetString("CreatorRequestId");
m_creatorRequestIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = jsonValue.GetString("Type");
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("Context"))
{
m_context = jsonValue.GetString("Context");
m_contextHasBeenSet = true;
}
return *this;
}
JsonValue AlreadyExistsException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_creatorRequestIdHasBeenSet)
{
payload.WithString("CreatorRequestId", m_creatorRequestId);
}
if(m_arnHasBeenSet)
{
payload.WithString("Arn", m_arn);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", m_type);
}
if(m_contextHasBeenSet)
{
payload.WithString("Context", m_context);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,315 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupJob.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupJob::BackupJob() :
m_accountIdHasBeenSet(false),
m_backupJobIdHasBeenSet(false),
m_backupVaultNameHasBeenSet(false),
m_backupVaultArnHasBeenSet(false),
m_recoveryPointArnHasBeenSet(false),
m_resourceArnHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_completionDateHasBeenSet(false),
m_state(BackupJobState::NOT_SET),
m_stateHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_percentDoneHasBeenSet(false),
m_backupSizeInBytes(0),
m_backupSizeInBytesHasBeenSet(false),
m_iamRoleArnHasBeenSet(false),
m_createdByHasBeenSet(false),
m_expectedCompletionDateHasBeenSet(false),
m_startByHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_bytesTransferred(0),
m_bytesTransferredHasBeenSet(false)
{
}
BackupJob::BackupJob(JsonView jsonValue) :
m_accountIdHasBeenSet(false),
m_backupJobIdHasBeenSet(false),
m_backupVaultNameHasBeenSet(false),
m_backupVaultArnHasBeenSet(false),
m_recoveryPointArnHasBeenSet(false),
m_resourceArnHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_completionDateHasBeenSet(false),
m_state(BackupJobState::NOT_SET),
m_stateHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_percentDoneHasBeenSet(false),
m_backupSizeInBytes(0),
m_backupSizeInBytesHasBeenSet(false),
m_iamRoleArnHasBeenSet(false),
m_createdByHasBeenSet(false),
m_expectedCompletionDateHasBeenSet(false),
m_startByHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_bytesTransferred(0),
m_bytesTransferredHasBeenSet(false)
{
*this = jsonValue;
}
BackupJob& BackupJob::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AccountId"))
{
m_accountId = jsonValue.GetString("AccountId");
m_accountIdHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupJobId"))
{
m_backupJobId = jsonValue.GetString("BackupJobId");
m_backupJobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
m_backupVaultNameHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
m_backupVaultArnHasBeenSet = true;
}
if(jsonValue.ValueExists("RecoveryPointArn"))
{
m_recoveryPointArn = jsonValue.GetString("RecoveryPointArn");
m_recoveryPointArnHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("CompletionDate"))
{
m_completionDate = jsonValue.GetDouble("CompletionDate");
m_completionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = BackupJobStateMapper::GetBackupJobStateForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusMessage"))
{
m_statusMessage = jsonValue.GetString("StatusMessage");
m_statusMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("PercentDone"))
{
m_percentDone = jsonValue.GetString("PercentDone");
m_percentDoneHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupSizeInBytes"))
{
m_backupSizeInBytes = jsonValue.GetInt64("BackupSizeInBytes");
m_backupSizeInBytesHasBeenSet = true;
}
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
m_iamRoleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedBy"))
{
m_createdBy = jsonValue.GetObject("CreatedBy");
m_createdByHasBeenSet = true;
}
if(jsonValue.ValueExists("ExpectedCompletionDate"))
{
m_expectedCompletionDate = jsonValue.GetDouble("ExpectedCompletionDate");
m_expectedCompletionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("StartBy"))
{
m_startBy = jsonValue.GetDouble("StartBy");
m_startByHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("BytesTransferred"))
{
m_bytesTransferred = jsonValue.GetInt64("BytesTransferred");
m_bytesTransferredHasBeenSet = true;
}
return *this;
}
JsonValue BackupJob::Jsonize() const
{
JsonValue payload;
if(m_accountIdHasBeenSet)
{
payload.WithString("AccountId", m_accountId);
}
if(m_backupJobIdHasBeenSet)
{
payload.WithString("BackupJobId", m_backupJobId);
}
if(m_backupVaultNameHasBeenSet)
{
payload.WithString("BackupVaultName", m_backupVaultName);
}
if(m_backupVaultArnHasBeenSet)
{
payload.WithString("BackupVaultArn", m_backupVaultArn);
}
if(m_recoveryPointArnHasBeenSet)
{
payload.WithString("RecoveryPointArn", m_recoveryPointArn);
}
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_completionDateHasBeenSet)
{
payload.WithDouble("CompletionDate", m_completionDate.SecondsWithMSPrecision());
}
if(m_stateHasBeenSet)
{
payload.WithString("State", BackupJobStateMapper::GetNameForBackupJobState(m_state));
}
if(m_statusMessageHasBeenSet)
{
payload.WithString("StatusMessage", m_statusMessage);
}
if(m_percentDoneHasBeenSet)
{
payload.WithString("PercentDone", m_percentDone);
}
if(m_backupSizeInBytesHasBeenSet)
{
payload.WithInt64("BackupSizeInBytes", m_backupSizeInBytes);
}
if(m_iamRoleArnHasBeenSet)
{
payload.WithString("IamRoleArn", m_iamRoleArn);
}
if(m_createdByHasBeenSet)
{
payload.WithObject("CreatedBy", m_createdBy.Jsonize());
}
if(m_expectedCompletionDateHasBeenSet)
{
payload.WithDouble("ExpectedCompletionDate", m_expectedCompletionDate.SecondsWithMSPrecision());
}
if(m_startByHasBeenSet)
{
payload.WithDouble("StartBy", m_startBy.SecondsWithMSPrecision());
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
if(m_bytesTransferredHasBeenSet)
{
payload.WithInt64("BytesTransferred", m_bytesTransferred);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupJobState.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
namespace BackupJobStateMapper
{
static const int CREATED_HASH = HashingUtils::HashString("CREATED");
static const int PENDING_HASH = HashingUtils::HashString("PENDING");
static const int RUNNING_HASH = HashingUtils::HashString("RUNNING");
static const int ABORTING_HASH = HashingUtils::HashString("ABORTING");
static const int ABORTED_HASH = HashingUtils::HashString("ABORTED");
static const int COMPLETED_HASH = HashingUtils::HashString("COMPLETED");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
static const int EXPIRED_HASH = HashingUtils::HashString("EXPIRED");
BackupJobState GetBackupJobStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CREATED_HASH)
{
return BackupJobState::CREATED;
}
else if (hashCode == PENDING_HASH)
{
return BackupJobState::PENDING;
}
else if (hashCode == RUNNING_HASH)
{
return BackupJobState::RUNNING;
}
else if (hashCode == ABORTING_HASH)
{
return BackupJobState::ABORTING;
}
else if (hashCode == ABORTED_HASH)
{
return BackupJobState::ABORTED;
}
else if (hashCode == COMPLETED_HASH)
{
return BackupJobState::COMPLETED;
}
else if (hashCode == FAILED_HASH)
{
return BackupJobState::FAILED;
}
else if (hashCode == EXPIRED_HASH)
{
return BackupJobState::EXPIRED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<BackupJobState>(hashCode);
}
return BackupJobState::NOT_SET;
}
Aws::String GetNameForBackupJobState(BackupJobState enumValue)
{
switch(enumValue)
{
case BackupJobState::CREATED:
return "CREATED";
case BackupJobState::PENDING:
return "PENDING";
case BackupJobState::RUNNING:
return "RUNNING";
case BackupJobState::ABORTING:
return "ABORTING";
case BackupJobState::ABORTED:
return "ABORTED";
case BackupJobState::COMPLETED:
return "COMPLETED";
case BackupJobState::FAILED:
return "FAILED";
case BackupJobState::EXPIRED:
return "EXPIRED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace BackupJobStateMapper
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupPlan.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupPlan::BackupPlan() :
m_backupPlanNameHasBeenSet(false),
m_rulesHasBeenSet(false)
{
}
BackupPlan::BackupPlan(JsonView jsonValue) :
m_backupPlanNameHasBeenSet(false),
m_rulesHasBeenSet(false)
{
*this = jsonValue;
}
BackupPlan& BackupPlan::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("BackupPlanName"))
{
m_backupPlanName = jsonValue.GetString("BackupPlanName");
m_backupPlanNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Rules"))
{
Array<JsonView> rulesJsonList = jsonValue.GetArray("Rules");
for(unsigned rulesIndex = 0; rulesIndex < rulesJsonList.GetLength(); ++rulesIndex)
{
m_rules.push_back(rulesJsonList[rulesIndex].AsObject());
}
m_rulesHasBeenSet = true;
}
return *this;
}
JsonValue BackupPlan::Jsonize() const
{
JsonValue payload;
if(m_backupPlanNameHasBeenSet)
{
payload.WithString("BackupPlanName", m_backupPlanName);
}
if(m_rulesHasBeenSet)
{
Array<JsonValue> rulesJsonList(m_rules.size());
for(unsigned rulesIndex = 0; rulesIndex < rulesJsonList.GetLength(); ++rulesIndex)
{
rulesJsonList[rulesIndex].AsObject(m_rules[rulesIndex].Jsonize());
}
payload.WithArray("Rules", std::move(rulesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupPlanInput.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupPlanInput::BackupPlanInput() :
m_backupPlanNameHasBeenSet(false),
m_rulesHasBeenSet(false)
{
}
BackupPlanInput::BackupPlanInput(JsonView jsonValue) :
m_backupPlanNameHasBeenSet(false),
m_rulesHasBeenSet(false)
{
*this = jsonValue;
}
BackupPlanInput& BackupPlanInput::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("BackupPlanName"))
{
m_backupPlanName = jsonValue.GetString("BackupPlanName");
m_backupPlanNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Rules"))
{
Array<JsonView> rulesJsonList = jsonValue.GetArray("Rules");
for(unsigned rulesIndex = 0; rulesIndex < rulesJsonList.GetLength(); ++rulesIndex)
{
m_rules.push_back(rulesJsonList[rulesIndex].AsObject());
}
m_rulesHasBeenSet = true;
}
return *this;
}
JsonValue BackupPlanInput::Jsonize() const
{
JsonValue payload;
if(m_backupPlanNameHasBeenSet)
{
payload.WithString("BackupPlanName", m_backupPlanName);
}
if(m_rulesHasBeenSet)
{
Array<JsonValue> rulesJsonList(m_rules.size());
for(unsigned rulesIndex = 0; rulesIndex < rulesJsonList.GetLength(); ++rulesIndex)
{
rulesJsonList[rulesIndex].AsObject(m_rules[rulesIndex].Jsonize());
}
payload.WithArray("Rules", std::move(rulesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupPlanTemplatesListMember.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupPlanTemplatesListMember::BackupPlanTemplatesListMember() :
m_backupPlanTemplateIdHasBeenSet(false),
m_backupPlanTemplateNameHasBeenSet(false)
{
}
BackupPlanTemplatesListMember::BackupPlanTemplatesListMember(JsonView jsonValue) :
m_backupPlanTemplateIdHasBeenSet(false),
m_backupPlanTemplateNameHasBeenSet(false)
{
*this = jsonValue;
}
BackupPlanTemplatesListMember& BackupPlanTemplatesListMember::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("BackupPlanTemplateId"))
{
m_backupPlanTemplateId = jsonValue.GetString("BackupPlanTemplateId");
m_backupPlanTemplateIdHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupPlanTemplateName"))
{
m_backupPlanTemplateName = jsonValue.GetString("BackupPlanTemplateName");
m_backupPlanTemplateNameHasBeenSet = true;
}
return *this;
}
JsonValue BackupPlanTemplatesListMember::Jsonize() const
{
JsonValue payload;
if(m_backupPlanTemplateIdHasBeenSet)
{
payload.WithString("BackupPlanTemplateId", m_backupPlanTemplateId);
}
if(m_backupPlanTemplateNameHasBeenSet)
{
payload.WithString("BackupPlanTemplateName", m_backupPlanTemplateName);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,161 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupPlansListMember.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupPlansListMember::BackupPlansListMember() :
m_backupPlanArnHasBeenSet(false),
m_backupPlanIdHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_deletionDateHasBeenSet(false),
m_versionIdHasBeenSet(false),
m_backupPlanNameHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false)
{
}
BackupPlansListMember::BackupPlansListMember(JsonView jsonValue) :
m_backupPlanArnHasBeenSet(false),
m_backupPlanIdHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_deletionDateHasBeenSet(false),
m_versionIdHasBeenSet(false),
m_backupPlanNameHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false)
{
*this = jsonValue;
}
BackupPlansListMember& BackupPlansListMember::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("BackupPlanArn"))
{
m_backupPlanArn = jsonValue.GetString("BackupPlanArn");
m_backupPlanArnHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupPlanId"))
{
m_backupPlanId = jsonValue.GetString("BackupPlanId");
m_backupPlanIdHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("DeletionDate"))
{
m_deletionDate = jsonValue.GetDouble("DeletionDate");
m_deletionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("VersionId"))
{
m_versionId = jsonValue.GetString("VersionId");
m_versionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupPlanName"))
{
m_backupPlanName = jsonValue.GetString("BackupPlanName");
m_backupPlanNameHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatorRequestId"))
{
m_creatorRequestId = jsonValue.GetString("CreatorRequestId");
m_creatorRequestIdHasBeenSet = true;
}
if(jsonValue.ValueExists("LastExecutionDate"))
{
m_lastExecutionDate = jsonValue.GetDouble("LastExecutionDate");
m_lastExecutionDateHasBeenSet = true;
}
return *this;
}
JsonValue BackupPlansListMember::Jsonize() const
{
JsonValue payload;
if(m_backupPlanArnHasBeenSet)
{
payload.WithString("BackupPlanArn", m_backupPlanArn);
}
if(m_backupPlanIdHasBeenSet)
{
payload.WithString("BackupPlanId", m_backupPlanId);
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_deletionDateHasBeenSet)
{
payload.WithDouble("DeletionDate", m_deletionDate.SecondsWithMSPrecision());
}
if(m_versionIdHasBeenSet)
{
payload.WithString("VersionId", m_versionId);
}
if(m_backupPlanNameHasBeenSet)
{
payload.WithString("BackupPlanName", m_backupPlanName);
}
if(m_creatorRequestIdHasBeenSet)
{
payload.WithString("CreatorRequestId", m_creatorRequestId);
}
if(m_lastExecutionDateHasBeenSet)
{
payload.WithDouble("LastExecutionDate", m_lastExecutionDate.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,199 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupRule::BackupRule() :
m_ruleNameHasBeenSet(false),
m_targetBackupVaultNameHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_startWindowMinutes(0),
m_startWindowMinutesHasBeenSet(false),
m_completionWindowMinutes(0),
m_completionWindowMinutesHasBeenSet(false),
m_lifecycleHasBeenSet(false),
m_recoveryPointTagsHasBeenSet(false),
m_ruleIdHasBeenSet(false),
m_copyActionsHasBeenSet(false)
{
}
BackupRule::BackupRule(JsonView jsonValue) :
m_ruleNameHasBeenSet(false),
m_targetBackupVaultNameHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_startWindowMinutes(0),
m_startWindowMinutesHasBeenSet(false),
m_completionWindowMinutes(0),
m_completionWindowMinutesHasBeenSet(false),
m_lifecycleHasBeenSet(false),
m_recoveryPointTagsHasBeenSet(false),
m_ruleIdHasBeenSet(false),
m_copyActionsHasBeenSet(false)
{
*this = jsonValue;
}
BackupRule& BackupRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("RuleName"))
{
m_ruleName = jsonValue.GetString("RuleName");
m_ruleNameHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetBackupVaultName"))
{
m_targetBackupVaultName = jsonValue.GetString("TargetBackupVaultName");
m_targetBackupVaultNameHasBeenSet = true;
}
if(jsonValue.ValueExists("ScheduleExpression"))
{
m_scheduleExpression = jsonValue.GetString("ScheduleExpression");
m_scheduleExpressionHasBeenSet = true;
}
if(jsonValue.ValueExists("StartWindowMinutes"))
{
m_startWindowMinutes = jsonValue.GetInt64("StartWindowMinutes");
m_startWindowMinutesHasBeenSet = true;
}
if(jsonValue.ValueExists("CompletionWindowMinutes"))
{
m_completionWindowMinutes = jsonValue.GetInt64("CompletionWindowMinutes");
m_completionWindowMinutesHasBeenSet = true;
}
if(jsonValue.ValueExists("Lifecycle"))
{
m_lifecycle = jsonValue.GetObject("Lifecycle");
m_lifecycleHasBeenSet = true;
}
if(jsonValue.ValueExists("RecoveryPointTags"))
{
Aws::Map<Aws::String, JsonView> recoveryPointTagsJsonMap = jsonValue.GetObject("RecoveryPointTags").GetAllObjects();
for(auto& recoveryPointTagsItem : recoveryPointTagsJsonMap)
{
m_recoveryPointTags[recoveryPointTagsItem.first] = recoveryPointTagsItem.second.AsString();
}
m_recoveryPointTagsHasBeenSet = true;
}
if(jsonValue.ValueExists("RuleId"))
{
m_ruleId = jsonValue.GetString("RuleId");
m_ruleIdHasBeenSet = true;
}
if(jsonValue.ValueExists("CopyActions"))
{
Array<JsonView> copyActionsJsonList = jsonValue.GetArray("CopyActions");
for(unsigned copyActionsIndex = 0; copyActionsIndex < copyActionsJsonList.GetLength(); ++copyActionsIndex)
{
m_copyActions.push_back(copyActionsJsonList[copyActionsIndex].AsObject());
}
m_copyActionsHasBeenSet = true;
}
return *this;
}
JsonValue BackupRule::Jsonize() const
{
JsonValue payload;
if(m_ruleNameHasBeenSet)
{
payload.WithString("RuleName", m_ruleName);
}
if(m_targetBackupVaultNameHasBeenSet)
{
payload.WithString("TargetBackupVaultName", m_targetBackupVaultName);
}
if(m_scheduleExpressionHasBeenSet)
{
payload.WithString("ScheduleExpression", m_scheduleExpression);
}
if(m_startWindowMinutesHasBeenSet)
{
payload.WithInt64("StartWindowMinutes", m_startWindowMinutes);
}
if(m_completionWindowMinutesHasBeenSet)
{
payload.WithInt64("CompletionWindowMinutes", m_completionWindowMinutes);
}
if(m_lifecycleHasBeenSet)
{
payload.WithObject("Lifecycle", m_lifecycle.Jsonize());
}
if(m_recoveryPointTagsHasBeenSet)
{
JsonValue recoveryPointTagsJsonMap;
for(auto& recoveryPointTagsItem : m_recoveryPointTags)
{
recoveryPointTagsJsonMap.WithString(recoveryPointTagsItem.first, recoveryPointTagsItem.second);
}
payload.WithObject("RecoveryPointTags", std::move(recoveryPointTagsJsonMap));
}
if(m_ruleIdHasBeenSet)
{
payload.WithString("RuleId", m_ruleId);
}
if(m_copyActionsHasBeenSet)
{
Array<JsonValue> copyActionsJsonList(m_copyActions.size());
for(unsigned copyActionsIndex = 0; copyActionsIndex < copyActionsJsonList.GetLength(); ++copyActionsIndex)
{
copyActionsJsonList[copyActionsIndex].AsObject(m_copyActions[copyActionsIndex].Jsonize());
}
payload.WithArray("CopyActions", std::move(copyActionsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,184 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupRuleInput.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupRuleInput::BackupRuleInput() :
m_ruleNameHasBeenSet(false),
m_targetBackupVaultNameHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_startWindowMinutes(0),
m_startWindowMinutesHasBeenSet(false),
m_completionWindowMinutes(0),
m_completionWindowMinutesHasBeenSet(false),
m_lifecycleHasBeenSet(false),
m_recoveryPointTagsHasBeenSet(false),
m_copyActionsHasBeenSet(false)
{
}
BackupRuleInput::BackupRuleInput(JsonView jsonValue) :
m_ruleNameHasBeenSet(false),
m_targetBackupVaultNameHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_startWindowMinutes(0),
m_startWindowMinutesHasBeenSet(false),
m_completionWindowMinutes(0),
m_completionWindowMinutesHasBeenSet(false),
m_lifecycleHasBeenSet(false),
m_recoveryPointTagsHasBeenSet(false),
m_copyActionsHasBeenSet(false)
{
*this = jsonValue;
}
BackupRuleInput& BackupRuleInput::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("RuleName"))
{
m_ruleName = jsonValue.GetString("RuleName");
m_ruleNameHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetBackupVaultName"))
{
m_targetBackupVaultName = jsonValue.GetString("TargetBackupVaultName");
m_targetBackupVaultNameHasBeenSet = true;
}
if(jsonValue.ValueExists("ScheduleExpression"))
{
m_scheduleExpression = jsonValue.GetString("ScheduleExpression");
m_scheduleExpressionHasBeenSet = true;
}
if(jsonValue.ValueExists("StartWindowMinutes"))
{
m_startWindowMinutes = jsonValue.GetInt64("StartWindowMinutes");
m_startWindowMinutesHasBeenSet = true;
}
if(jsonValue.ValueExists("CompletionWindowMinutes"))
{
m_completionWindowMinutes = jsonValue.GetInt64("CompletionWindowMinutes");
m_completionWindowMinutesHasBeenSet = true;
}
if(jsonValue.ValueExists("Lifecycle"))
{
m_lifecycle = jsonValue.GetObject("Lifecycle");
m_lifecycleHasBeenSet = true;
}
if(jsonValue.ValueExists("RecoveryPointTags"))
{
Aws::Map<Aws::String, JsonView> recoveryPointTagsJsonMap = jsonValue.GetObject("RecoveryPointTags").GetAllObjects();
for(auto& recoveryPointTagsItem : recoveryPointTagsJsonMap)
{
m_recoveryPointTags[recoveryPointTagsItem.first] = recoveryPointTagsItem.second.AsString();
}
m_recoveryPointTagsHasBeenSet = true;
}
if(jsonValue.ValueExists("CopyActions"))
{
Array<JsonView> copyActionsJsonList = jsonValue.GetArray("CopyActions");
for(unsigned copyActionsIndex = 0; copyActionsIndex < copyActionsJsonList.GetLength(); ++copyActionsIndex)
{
m_copyActions.push_back(copyActionsJsonList[copyActionsIndex].AsObject());
}
m_copyActionsHasBeenSet = true;
}
return *this;
}
JsonValue BackupRuleInput::Jsonize() const
{
JsonValue payload;
if(m_ruleNameHasBeenSet)
{
payload.WithString("RuleName", m_ruleName);
}
if(m_targetBackupVaultNameHasBeenSet)
{
payload.WithString("TargetBackupVaultName", m_targetBackupVaultName);
}
if(m_scheduleExpressionHasBeenSet)
{
payload.WithString("ScheduleExpression", m_scheduleExpression);
}
if(m_startWindowMinutesHasBeenSet)
{
payload.WithInt64("StartWindowMinutes", m_startWindowMinutes);
}
if(m_completionWindowMinutesHasBeenSet)
{
payload.WithInt64("CompletionWindowMinutes", m_completionWindowMinutes);
}
if(m_lifecycleHasBeenSet)
{
payload.WithObject("Lifecycle", m_lifecycle.Jsonize());
}
if(m_recoveryPointTagsHasBeenSet)
{
JsonValue recoveryPointTagsJsonMap;
for(auto& recoveryPointTagsItem : m_recoveryPointTags)
{
recoveryPointTagsJsonMap.WithString(recoveryPointTagsItem.first, recoveryPointTagsItem.second);
}
payload.WithObject("RecoveryPointTags", std::move(recoveryPointTagsJsonMap));
}
if(m_copyActionsHasBeenSet)
{
Array<JsonValue> copyActionsJsonList(m_copyActions.size());
for(unsigned copyActionsIndex = 0; copyActionsIndex < copyActionsJsonList.GetLength(); ++copyActionsIndex)
{
copyActionsJsonList[copyActionsIndex].AsObject(m_copyActions[copyActionsIndex].Jsonize());
}
payload.WithArray("CopyActions", std::move(copyActionsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,120 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupSelection.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupSelection::BackupSelection() :
m_selectionNameHasBeenSet(false),
m_iamRoleArnHasBeenSet(false),
m_resourcesHasBeenSet(false),
m_listOfTagsHasBeenSet(false)
{
}
BackupSelection::BackupSelection(JsonView jsonValue) :
m_selectionNameHasBeenSet(false),
m_iamRoleArnHasBeenSet(false),
m_resourcesHasBeenSet(false),
m_listOfTagsHasBeenSet(false)
{
*this = jsonValue;
}
BackupSelection& BackupSelection::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("SelectionName"))
{
m_selectionName = jsonValue.GetString("SelectionName");
m_selectionNameHasBeenSet = true;
}
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
m_iamRoleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("Resources"))
{
Array<JsonView> resourcesJsonList = jsonValue.GetArray("Resources");
for(unsigned resourcesIndex = 0; resourcesIndex < resourcesJsonList.GetLength(); ++resourcesIndex)
{
m_resources.push_back(resourcesJsonList[resourcesIndex].AsString());
}
m_resourcesHasBeenSet = true;
}
if(jsonValue.ValueExists("ListOfTags"))
{
Array<JsonView> listOfTagsJsonList = jsonValue.GetArray("ListOfTags");
for(unsigned listOfTagsIndex = 0; listOfTagsIndex < listOfTagsJsonList.GetLength(); ++listOfTagsIndex)
{
m_listOfTags.push_back(listOfTagsJsonList[listOfTagsIndex].AsObject());
}
m_listOfTagsHasBeenSet = true;
}
return *this;
}
JsonValue BackupSelection::Jsonize() const
{
JsonValue payload;
if(m_selectionNameHasBeenSet)
{
payload.WithString("SelectionName", m_selectionName);
}
if(m_iamRoleArnHasBeenSet)
{
payload.WithString("IamRoleArn", m_iamRoleArn);
}
if(m_resourcesHasBeenSet)
{
Array<JsonValue> resourcesJsonList(m_resources.size());
for(unsigned resourcesIndex = 0; resourcesIndex < resourcesJsonList.GetLength(); ++resourcesIndex)
{
resourcesJsonList[resourcesIndex].AsString(m_resources[resourcesIndex]);
}
payload.WithArray("Resources", std::move(resourcesJsonList));
}
if(m_listOfTagsHasBeenSet)
{
Array<JsonValue> listOfTagsJsonList(m_listOfTags.size());
for(unsigned listOfTagsIndex = 0; listOfTagsIndex < listOfTagsJsonList.GetLength(); ++listOfTagsIndex)
{
listOfTagsJsonList[listOfTagsIndex].AsObject(m_listOfTags[listOfTagsIndex].Jsonize());
}
payload.WithArray("ListOfTags", std::move(listOfTagsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,133 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupSelectionsListMember.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupSelectionsListMember::BackupSelectionsListMember() :
m_selectionIdHasBeenSet(false),
m_selectionNameHasBeenSet(false),
m_backupPlanIdHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_iamRoleArnHasBeenSet(false)
{
}
BackupSelectionsListMember::BackupSelectionsListMember(JsonView jsonValue) :
m_selectionIdHasBeenSet(false),
m_selectionNameHasBeenSet(false),
m_backupPlanIdHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_iamRoleArnHasBeenSet(false)
{
*this = jsonValue;
}
BackupSelectionsListMember& BackupSelectionsListMember::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("SelectionId"))
{
m_selectionId = jsonValue.GetString("SelectionId");
m_selectionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("SelectionName"))
{
m_selectionName = jsonValue.GetString("SelectionName");
m_selectionNameHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupPlanId"))
{
m_backupPlanId = jsonValue.GetString("BackupPlanId");
m_backupPlanIdHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatorRequestId"))
{
m_creatorRequestId = jsonValue.GetString("CreatorRequestId");
m_creatorRequestIdHasBeenSet = true;
}
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
m_iamRoleArnHasBeenSet = true;
}
return *this;
}
JsonValue BackupSelectionsListMember::Jsonize() const
{
JsonValue payload;
if(m_selectionIdHasBeenSet)
{
payload.WithString("SelectionId", m_selectionId);
}
if(m_selectionNameHasBeenSet)
{
payload.WithString("SelectionName", m_selectionName);
}
if(m_backupPlanIdHasBeenSet)
{
payload.WithString("BackupPlanId", m_backupPlanId);
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_creatorRequestIdHasBeenSet)
{
payload.WithString("CreatorRequestId", m_creatorRequestId);
}
if(m_iamRoleArnHasBeenSet)
{
payload.WithString("IamRoleArn", m_iamRoleArn);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,161 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupVaultEvent.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
namespace BackupVaultEventMapper
{
static const int BACKUP_JOB_STARTED_HASH = HashingUtils::HashString("BACKUP_JOB_STARTED");
static const int BACKUP_JOB_COMPLETED_HASH = HashingUtils::HashString("BACKUP_JOB_COMPLETED");
static const int BACKUP_JOB_SUCCESSFUL_HASH = HashingUtils::HashString("BACKUP_JOB_SUCCESSFUL");
static const int BACKUP_JOB_FAILED_HASH = HashingUtils::HashString("BACKUP_JOB_FAILED");
static const int BACKUP_JOB_EXPIRED_HASH = HashingUtils::HashString("BACKUP_JOB_EXPIRED");
static const int RESTORE_JOB_STARTED_HASH = HashingUtils::HashString("RESTORE_JOB_STARTED");
static const int RESTORE_JOB_COMPLETED_HASH = HashingUtils::HashString("RESTORE_JOB_COMPLETED");
static const int RESTORE_JOB_SUCCESSFUL_HASH = HashingUtils::HashString("RESTORE_JOB_SUCCESSFUL");
static const int RESTORE_JOB_FAILED_HASH = HashingUtils::HashString("RESTORE_JOB_FAILED");
static const int COPY_JOB_STARTED_HASH = HashingUtils::HashString("COPY_JOB_STARTED");
static const int COPY_JOB_SUCCESSFUL_HASH = HashingUtils::HashString("COPY_JOB_SUCCESSFUL");
static const int COPY_JOB_FAILED_HASH = HashingUtils::HashString("COPY_JOB_FAILED");
static const int RECOVERY_POINT_MODIFIED_HASH = HashingUtils::HashString("RECOVERY_POINT_MODIFIED");
static const int BACKUP_PLAN_CREATED_HASH = HashingUtils::HashString("BACKUP_PLAN_CREATED");
static const int BACKUP_PLAN_MODIFIED_HASH = HashingUtils::HashString("BACKUP_PLAN_MODIFIED");
BackupVaultEvent GetBackupVaultEventForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == BACKUP_JOB_STARTED_HASH)
{
return BackupVaultEvent::BACKUP_JOB_STARTED;
}
else if (hashCode == BACKUP_JOB_COMPLETED_HASH)
{
return BackupVaultEvent::BACKUP_JOB_COMPLETED;
}
else if (hashCode == BACKUP_JOB_SUCCESSFUL_HASH)
{
return BackupVaultEvent::BACKUP_JOB_SUCCESSFUL;
}
else if (hashCode == BACKUP_JOB_FAILED_HASH)
{
return BackupVaultEvent::BACKUP_JOB_FAILED;
}
else if (hashCode == BACKUP_JOB_EXPIRED_HASH)
{
return BackupVaultEvent::BACKUP_JOB_EXPIRED;
}
else if (hashCode == RESTORE_JOB_STARTED_HASH)
{
return BackupVaultEvent::RESTORE_JOB_STARTED;
}
else if (hashCode == RESTORE_JOB_COMPLETED_HASH)
{
return BackupVaultEvent::RESTORE_JOB_COMPLETED;
}
else if (hashCode == RESTORE_JOB_SUCCESSFUL_HASH)
{
return BackupVaultEvent::RESTORE_JOB_SUCCESSFUL;
}
else if (hashCode == RESTORE_JOB_FAILED_HASH)
{
return BackupVaultEvent::RESTORE_JOB_FAILED;
}
else if (hashCode == COPY_JOB_STARTED_HASH)
{
return BackupVaultEvent::COPY_JOB_STARTED;
}
else if (hashCode == COPY_JOB_SUCCESSFUL_HASH)
{
return BackupVaultEvent::COPY_JOB_SUCCESSFUL;
}
else if (hashCode == COPY_JOB_FAILED_HASH)
{
return BackupVaultEvent::COPY_JOB_FAILED;
}
else if (hashCode == RECOVERY_POINT_MODIFIED_HASH)
{
return BackupVaultEvent::RECOVERY_POINT_MODIFIED;
}
else if (hashCode == BACKUP_PLAN_CREATED_HASH)
{
return BackupVaultEvent::BACKUP_PLAN_CREATED;
}
else if (hashCode == BACKUP_PLAN_MODIFIED_HASH)
{
return BackupVaultEvent::BACKUP_PLAN_MODIFIED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<BackupVaultEvent>(hashCode);
}
return BackupVaultEvent::NOT_SET;
}
Aws::String GetNameForBackupVaultEvent(BackupVaultEvent enumValue)
{
switch(enumValue)
{
case BackupVaultEvent::BACKUP_JOB_STARTED:
return "BACKUP_JOB_STARTED";
case BackupVaultEvent::BACKUP_JOB_COMPLETED:
return "BACKUP_JOB_COMPLETED";
case BackupVaultEvent::BACKUP_JOB_SUCCESSFUL:
return "BACKUP_JOB_SUCCESSFUL";
case BackupVaultEvent::BACKUP_JOB_FAILED:
return "BACKUP_JOB_FAILED";
case BackupVaultEvent::BACKUP_JOB_EXPIRED:
return "BACKUP_JOB_EXPIRED";
case BackupVaultEvent::RESTORE_JOB_STARTED:
return "RESTORE_JOB_STARTED";
case BackupVaultEvent::RESTORE_JOB_COMPLETED:
return "RESTORE_JOB_COMPLETED";
case BackupVaultEvent::RESTORE_JOB_SUCCESSFUL:
return "RESTORE_JOB_SUCCESSFUL";
case BackupVaultEvent::RESTORE_JOB_FAILED:
return "RESTORE_JOB_FAILED";
case BackupVaultEvent::COPY_JOB_STARTED:
return "COPY_JOB_STARTED";
case BackupVaultEvent::COPY_JOB_SUCCESSFUL:
return "COPY_JOB_SUCCESSFUL";
case BackupVaultEvent::COPY_JOB_FAILED:
return "COPY_JOB_FAILED";
case BackupVaultEvent::RECOVERY_POINT_MODIFIED:
return "RECOVERY_POINT_MODIFIED";
case BackupVaultEvent::BACKUP_PLAN_CREATED:
return "BACKUP_PLAN_CREATED";
case BackupVaultEvent::BACKUP_PLAN_MODIFIED:
return "BACKUP_PLAN_MODIFIED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace BackupVaultEventMapper
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,135 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/BackupVaultListMember.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
BackupVaultListMember::BackupVaultListMember() :
m_backupVaultNameHasBeenSet(false),
m_backupVaultArnHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_encryptionKeyArnHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_numberOfRecoveryPoints(0),
m_numberOfRecoveryPointsHasBeenSet(false)
{
}
BackupVaultListMember::BackupVaultListMember(JsonView jsonValue) :
m_backupVaultNameHasBeenSet(false),
m_backupVaultArnHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_encryptionKeyArnHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false),
m_numberOfRecoveryPoints(0),
m_numberOfRecoveryPointsHasBeenSet(false)
{
*this = jsonValue;
}
BackupVaultListMember& BackupVaultListMember::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
m_backupVaultNameHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
m_backupVaultArnHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("EncryptionKeyArn"))
{
m_encryptionKeyArn = jsonValue.GetString("EncryptionKeyArn");
m_encryptionKeyArnHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatorRequestId"))
{
m_creatorRequestId = jsonValue.GetString("CreatorRequestId");
m_creatorRequestIdHasBeenSet = true;
}
if(jsonValue.ValueExists("NumberOfRecoveryPoints"))
{
m_numberOfRecoveryPoints = jsonValue.GetInt64("NumberOfRecoveryPoints");
m_numberOfRecoveryPointsHasBeenSet = true;
}
return *this;
}
JsonValue BackupVaultListMember::Jsonize() const
{
JsonValue payload;
if(m_backupVaultNameHasBeenSet)
{
payload.WithString("BackupVaultName", m_backupVaultName);
}
if(m_backupVaultArnHasBeenSet)
{
payload.WithString("BackupVaultArn", m_backupVaultArn);
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_encryptionKeyArnHasBeenSet)
{
payload.WithString("EncryptionKeyArn", m_encryptionKeyArn);
}
if(m_creatorRequestIdHasBeenSet)
{
payload.WithString("CreatorRequestId", m_creatorRequestId);
}
if(m_numberOfRecoveryPointsHasBeenSet)
{
payload.WithInt64("NumberOfRecoveryPoints", m_numberOfRecoveryPoints);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CalculatedLifecycle.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
CalculatedLifecycle::CalculatedLifecycle() :
m_moveToColdStorageAtHasBeenSet(false),
m_deleteAtHasBeenSet(false)
{
}
CalculatedLifecycle::CalculatedLifecycle(JsonView jsonValue) :
m_moveToColdStorageAtHasBeenSet(false),
m_deleteAtHasBeenSet(false)
{
*this = jsonValue;
}
CalculatedLifecycle& CalculatedLifecycle::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("MoveToColdStorageAt"))
{
m_moveToColdStorageAt = jsonValue.GetDouble("MoveToColdStorageAt");
m_moveToColdStorageAtHasBeenSet = true;
}
if(jsonValue.ValueExists("DeleteAt"))
{
m_deleteAt = jsonValue.GetDouble("DeleteAt");
m_deleteAtHasBeenSet = true;
}
return *this;
}
JsonValue CalculatedLifecycle::Jsonize() const
{
JsonValue payload;
if(m_moveToColdStorageAtHasBeenSet)
{
payload.WithDouble("MoveToColdStorageAt", m_moveToColdStorageAt.SecondsWithMSPrecision());
}
if(m_deleteAtHasBeenSet)
{
payload.WithDouble("DeleteAt", m_deleteAt.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/Condition.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
Condition::Condition() :
m_conditionType(ConditionType::NOT_SET),
m_conditionTypeHasBeenSet(false),
m_conditionKeyHasBeenSet(false),
m_conditionValueHasBeenSet(false)
{
}
Condition::Condition(JsonView jsonValue) :
m_conditionType(ConditionType::NOT_SET),
m_conditionTypeHasBeenSet(false),
m_conditionKeyHasBeenSet(false),
m_conditionValueHasBeenSet(false)
{
*this = jsonValue;
}
Condition& Condition::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ConditionType"))
{
m_conditionType = ConditionTypeMapper::GetConditionTypeForName(jsonValue.GetString("ConditionType"));
m_conditionTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ConditionKey"))
{
m_conditionKey = jsonValue.GetString("ConditionKey");
m_conditionKeyHasBeenSet = true;
}
if(jsonValue.ValueExists("ConditionValue"))
{
m_conditionValue = jsonValue.GetString("ConditionValue");
m_conditionValueHasBeenSet = true;
}
return *this;
}
JsonValue Condition::Jsonize() const
{
JsonValue payload;
if(m_conditionTypeHasBeenSet)
{
payload.WithString("ConditionType", ConditionTypeMapper::GetNameForConditionType(m_conditionType));
}
if(m_conditionKeyHasBeenSet)
{
payload.WithString("ConditionKey", m_conditionKey);
}
if(m_conditionValueHasBeenSet)
{
payload.WithString("ConditionValue", m_conditionValue);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ConditionType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
namespace ConditionTypeMapper
{
static const int STRINGEQUALS_HASH = HashingUtils::HashString("STRINGEQUALS");
ConditionType GetConditionTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == STRINGEQUALS_HASH)
{
return ConditionType::STRINGEQUALS;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ConditionType>(hashCode);
}
return ConditionType::NOT_SET;
}
Aws::String GetNameForConditionType(ConditionType enumValue)
{
switch(enumValue)
{
case ConditionType::STRINGEQUALS:
return "STRINGEQUALS";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ConditionTypeMapper
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CopyAction.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
CopyAction::CopyAction() :
m_lifecycleHasBeenSet(false),
m_destinationBackupVaultArnHasBeenSet(false)
{
}
CopyAction::CopyAction(JsonView jsonValue) :
m_lifecycleHasBeenSet(false),
m_destinationBackupVaultArnHasBeenSet(false)
{
*this = jsonValue;
}
CopyAction& CopyAction::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Lifecycle"))
{
m_lifecycle = jsonValue.GetObject("Lifecycle");
m_lifecycleHasBeenSet = true;
}
if(jsonValue.ValueExists("DestinationBackupVaultArn"))
{
m_destinationBackupVaultArn = jsonValue.GetString("DestinationBackupVaultArn");
m_destinationBackupVaultArnHasBeenSet = true;
}
return *this;
}
JsonValue CopyAction::Jsonize() const
{
JsonValue payload;
if(m_lifecycleHasBeenSet)
{
payload.WithObject("Lifecycle", m_lifecycle.Jsonize());
}
if(m_destinationBackupVaultArnHasBeenSet)
{
payload.WithString("DestinationBackupVaultArn", m_destinationBackupVaultArn);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,270 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CopyJob.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
CopyJob::CopyJob() :
m_accountIdHasBeenSet(false),
m_copyJobIdHasBeenSet(false),
m_sourceBackupVaultArnHasBeenSet(false),
m_sourceRecoveryPointArnHasBeenSet(false),
m_destinationBackupVaultArnHasBeenSet(false),
m_destinationRecoveryPointArnHasBeenSet(false),
m_resourceArnHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_completionDateHasBeenSet(false),
m_state(CopyJobState::NOT_SET),
m_stateHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_backupSizeInBytes(0),
m_backupSizeInBytesHasBeenSet(false),
m_iamRoleArnHasBeenSet(false),
m_createdByHasBeenSet(false),
m_resourceTypeHasBeenSet(false)
{
}
CopyJob::CopyJob(JsonView jsonValue) :
m_accountIdHasBeenSet(false),
m_copyJobIdHasBeenSet(false),
m_sourceBackupVaultArnHasBeenSet(false),
m_sourceRecoveryPointArnHasBeenSet(false),
m_destinationBackupVaultArnHasBeenSet(false),
m_destinationRecoveryPointArnHasBeenSet(false),
m_resourceArnHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_completionDateHasBeenSet(false),
m_state(CopyJobState::NOT_SET),
m_stateHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_backupSizeInBytes(0),
m_backupSizeInBytesHasBeenSet(false),
m_iamRoleArnHasBeenSet(false),
m_createdByHasBeenSet(false),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
CopyJob& CopyJob::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AccountId"))
{
m_accountId = jsonValue.GetString("AccountId");
m_accountIdHasBeenSet = true;
}
if(jsonValue.ValueExists("CopyJobId"))
{
m_copyJobId = jsonValue.GetString("CopyJobId");
m_copyJobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("SourceBackupVaultArn"))
{
m_sourceBackupVaultArn = jsonValue.GetString("SourceBackupVaultArn");
m_sourceBackupVaultArnHasBeenSet = true;
}
if(jsonValue.ValueExists("SourceRecoveryPointArn"))
{
m_sourceRecoveryPointArn = jsonValue.GetString("SourceRecoveryPointArn");
m_sourceRecoveryPointArnHasBeenSet = true;
}
if(jsonValue.ValueExists("DestinationBackupVaultArn"))
{
m_destinationBackupVaultArn = jsonValue.GetString("DestinationBackupVaultArn");
m_destinationBackupVaultArnHasBeenSet = true;
}
if(jsonValue.ValueExists("DestinationRecoveryPointArn"))
{
m_destinationRecoveryPointArn = jsonValue.GetString("DestinationRecoveryPointArn");
m_destinationRecoveryPointArnHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("CompletionDate"))
{
m_completionDate = jsonValue.GetDouble("CompletionDate");
m_completionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = CopyJobStateMapper::GetCopyJobStateForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusMessage"))
{
m_statusMessage = jsonValue.GetString("StatusMessage");
m_statusMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("BackupSizeInBytes"))
{
m_backupSizeInBytes = jsonValue.GetInt64("BackupSizeInBytes");
m_backupSizeInBytesHasBeenSet = true;
}
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
m_iamRoleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedBy"))
{
m_createdBy = jsonValue.GetObject("CreatedBy");
m_createdByHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue CopyJob::Jsonize() const
{
JsonValue payload;
if(m_accountIdHasBeenSet)
{
payload.WithString("AccountId", m_accountId);
}
if(m_copyJobIdHasBeenSet)
{
payload.WithString("CopyJobId", m_copyJobId);
}
if(m_sourceBackupVaultArnHasBeenSet)
{
payload.WithString("SourceBackupVaultArn", m_sourceBackupVaultArn);
}
if(m_sourceRecoveryPointArnHasBeenSet)
{
payload.WithString("SourceRecoveryPointArn", m_sourceRecoveryPointArn);
}
if(m_destinationBackupVaultArnHasBeenSet)
{
payload.WithString("DestinationBackupVaultArn", m_destinationBackupVaultArn);
}
if(m_destinationRecoveryPointArnHasBeenSet)
{
payload.WithString("DestinationRecoveryPointArn", m_destinationRecoveryPointArn);
}
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_completionDateHasBeenSet)
{
payload.WithDouble("CompletionDate", m_completionDate.SecondsWithMSPrecision());
}
if(m_stateHasBeenSet)
{
payload.WithString("State", CopyJobStateMapper::GetNameForCopyJobState(m_state));
}
if(m_statusMessageHasBeenSet)
{
payload.WithString("StatusMessage", m_statusMessage);
}
if(m_backupSizeInBytesHasBeenSet)
{
payload.WithInt64("BackupSizeInBytes", m_backupSizeInBytes);
}
if(m_iamRoleArnHasBeenSet)
{
payload.WithString("IamRoleArn", m_iamRoleArn);
}
if(m_createdByHasBeenSet)
{
payload.WithObject("CreatedBy", m_createdBy.Jsonize());
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CopyJobState.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
namespace CopyJobStateMapper
{
static const int CREATED_HASH = HashingUtils::HashString("CREATED");
static const int RUNNING_HASH = HashingUtils::HashString("RUNNING");
static const int COMPLETED_HASH = HashingUtils::HashString("COMPLETED");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
CopyJobState GetCopyJobStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CREATED_HASH)
{
return CopyJobState::CREATED;
}
else if (hashCode == RUNNING_HASH)
{
return CopyJobState::RUNNING;
}
else if (hashCode == COMPLETED_HASH)
{
return CopyJobState::COMPLETED;
}
else if (hashCode == FAILED_HASH)
{
return CopyJobState::FAILED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CopyJobState>(hashCode);
}
return CopyJobState::NOT_SET;
}
Aws::String GetNameForCopyJobState(CopyJobState enumValue)
{
switch(enumValue)
{
case CopyJobState::CREATED:
return "CREATED";
case CopyJobState::RUNNING:
return "RUNNING";
case CopyJobState::COMPLETED:
return "COMPLETED";
case CopyJobState::FAILED:
return "FAILED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CopyJobStateMapper
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,54 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CreateBackupPlanRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateBackupPlanRequest::CreateBackupPlanRequest() :
m_backupPlanHasBeenSet(false),
m_backupPlanTagsHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false)
{
}
Aws::String CreateBackupPlanRequest::SerializePayload() const
{
JsonValue payload;
if(m_backupPlanHasBeenSet)
{
payload.WithObject("BackupPlan", m_backupPlan.Jsonize());
}
if(m_backupPlanTagsHasBeenSet)
{
JsonValue backupPlanTagsJsonMap;
for(auto& backupPlanTagsItem : m_backupPlanTags)
{
backupPlanTagsJsonMap.WithString(backupPlanTagsItem.first, backupPlanTagsItem.second);
}
payload.WithObject("BackupPlanTags", std::move(backupPlanTagsJsonMap));
}
if(m_creatorRequestIdHasBeenSet)
{
payload.WithString("CreatorRequestId", m_creatorRequestId);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CreateBackupPlanResult.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;
CreateBackupPlanResult::CreateBackupPlanResult()
{
}
CreateBackupPlanResult::CreateBackupPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateBackupPlanResult& CreateBackupPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupPlanId"))
{
m_backupPlanId = jsonValue.GetString("BackupPlanId");
}
if(jsonValue.ValueExists("BackupPlanArn"))
{
m_backupPlanArn = jsonValue.GetString("BackupPlanArn");
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
if(jsonValue.ValueExists("VersionId"))
{
m_versionId = jsonValue.GetString("VersionId");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CreateBackupSelectionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateBackupSelectionRequest::CreateBackupSelectionRequest() :
m_backupPlanIdHasBeenSet(false),
m_backupSelectionHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false)
{
}
Aws::String CreateBackupSelectionRequest::SerializePayload() const
{
JsonValue payload;
if(m_backupSelectionHasBeenSet)
{
payload.WithObject("BackupSelection", m_backupSelection.Jsonize());
}
if(m_creatorRequestIdHasBeenSet)
{
payload.WithString("CreatorRequestId", m_creatorRequestId);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CreateBackupSelectionResult.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;
CreateBackupSelectionResult::CreateBackupSelectionResult()
{
}
CreateBackupSelectionResult::CreateBackupSelectionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateBackupSelectionResult& CreateBackupSelectionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("SelectionId"))
{
m_selectionId = jsonValue.GetString("SelectionId");
}
if(jsonValue.ValueExists("BackupPlanId"))
{
m_backupPlanId = jsonValue.GetString("BackupPlanId");
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CreateBackupVaultRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateBackupVaultRequest::CreateBackupVaultRequest() :
m_backupVaultNameHasBeenSet(false),
m_backupVaultTagsHasBeenSet(false),
m_encryptionKeyArnHasBeenSet(false),
m_creatorRequestIdHasBeenSet(false)
{
}
Aws::String CreateBackupVaultRequest::SerializePayload() const
{
JsonValue payload;
if(m_backupVaultTagsHasBeenSet)
{
JsonValue backupVaultTagsJsonMap;
for(auto& backupVaultTagsItem : m_backupVaultTags)
{
backupVaultTagsJsonMap.WithString(backupVaultTagsItem.first, backupVaultTagsItem.second);
}
payload.WithObject("BackupVaultTags", std::move(backupVaultTagsJsonMap));
}
if(m_encryptionKeyArnHasBeenSet)
{
payload.WithString("EncryptionKeyArn", m_encryptionKeyArn);
}
if(m_creatorRequestIdHasBeenSet)
{
payload.WithString("CreatorRequestId", m_creatorRequestId);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/CreateBackupVaultResult.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;
CreateBackupVaultResult::CreateBackupVaultResult()
{
}
CreateBackupVaultResult::CreateBackupVaultResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateBackupVaultResult& CreateBackupVaultResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DeleteBackupPlanRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteBackupPlanRequest::DeleteBackupPlanRequest() :
m_backupPlanIdHasBeenSet(false)
{
}
Aws::String DeleteBackupPlanRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DeleteBackupPlanResult.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;
DeleteBackupPlanResult::DeleteBackupPlanResult()
{
}
DeleteBackupPlanResult::DeleteBackupPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteBackupPlanResult& DeleteBackupPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupPlanId"))
{
m_backupPlanId = jsonValue.GetString("BackupPlanId");
}
if(jsonValue.ValueExists("BackupPlanArn"))
{
m_backupPlanArn = jsonValue.GetString("BackupPlanArn");
}
if(jsonValue.ValueExists("DeletionDate"))
{
m_deletionDate = jsonValue.GetDouble("DeletionDate");
}
if(jsonValue.ValueExists("VersionId"))
{
m_versionId = jsonValue.GetString("VersionId");
}
return *this;
}

View File

@@ -0,0 +1,28 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DeleteBackupSelectionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteBackupSelectionRequest::DeleteBackupSelectionRequest() :
m_backupPlanIdHasBeenSet(false),
m_selectionIdHasBeenSet(false)
{
}
Aws::String DeleteBackupSelectionRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DeleteBackupVaultAccessPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteBackupVaultAccessPolicyRequest::DeleteBackupVaultAccessPolicyRequest() :
m_backupVaultNameHasBeenSet(false)
{
}
Aws::String DeleteBackupVaultAccessPolicyRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DeleteBackupVaultNotificationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteBackupVaultNotificationsRequest::DeleteBackupVaultNotificationsRequest() :
m_backupVaultNameHasBeenSet(false)
{
}
Aws::String DeleteBackupVaultNotificationsRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DeleteBackupVaultRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteBackupVaultRequest::DeleteBackupVaultRequest() :
m_backupVaultNameHasBeenSet(false)
{
}
Aws::String DeleteBackupVaultRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,28 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DeleteRecoveryPointRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteRecoveryPointRequest::DeleteRecoveryPointRequest() :
m_backupVaultNameHasBeenSet(false),
m_recoveryPointArnHasBeenSet(false)
{
}
Aws::String DeleteRecoveryPointRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DependencyFailureException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
DependencyFailureException::DependencyFailureException() :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
}
DependencyFailureException::DependencyFailureException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
*this = jsonValue;
}
DependencyFailureException& DependencyFailureException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = jsonValue.GetString("Type");
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("Context"))
{
m_context = jsonValue.GetString("Context");
m_contextHasBeenSet = true;
}
return *this;
}
JsonValue DependencyFailureException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", m_type);
}
if(m_contextHasBeenSet)
{
payload.WithString("Context", m_context);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeBackupJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeBackupJobRequest::DescribeBackupJobRequest() :
m_backupJobIdHasBeenSet(false)
{
}
Aws::String DescribeBackupJobRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,148 @@
/**
* 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;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeBackupVaultRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeBackupVaultRequest::DescribeBackupVaultRequest() :
m_backupVaultNameHasBeenSet(false)
{
}
Aws::String DescribeBackupVaultRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeBackupVaultResult.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;
DescribeBackupVaultResult::DescribeBackupVaultResult() :
m_numberOfRecoveryPoints(0)
{
}
DescribeBackupVaultResult::DescribeBackupVaultResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_numberOfRecoveryPoints(0)
{
*this = result;
}
DescribeBackupVaultResult& DescribeBackupVaultResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
}
if(jsonValue.ValueExists("EncryptionKeyArn"))
{
m_encryptionKeyArn = jsonValue.GetString("EncryptionKeyArn");
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
if(jsonValue.ValueExists("CreatorRequestId"))
{
m_creatorRequestId = jsonValue.GetString("CreatorRequestId");
}
if(jsonValue.ValueExists("NumberOfRecoveryPoints"))
{
m_numberOfRecoveryPoints = jsonValue.GetInt64("NumberOfRecoveryPoints");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeCopyJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeCopyJobRequest::DescribeCopyJobRequest() :
m_copyJobIdHasBeenSet(false)
{
}
Aws::String DescribeCopyJobRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeCopyJobResult.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;
DescribeCopyJobResult::DescribeCopyJobResult()
{
}
DescribeCopyJobResult::DescribeCopyJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeCopyJobResult& DescribeCopyJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("CopyJob"))
{
m_copyJob = jsonValue.GetObject("CopyJob");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeProtectedResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeProtectedResourceRequest::DescribeProtectedResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String DescribeProtectedResourceRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeProtectedResourceResult.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;
DescribeProtectedResourceResult::DescribeProtectedResourceResult()
{
}
DescribeProtectedResourceResult::DescribeProtectedResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeProtectedResourceResult& DescribeProtectedResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
}
if(jsonValue.ValueExists("LastBackupTime"))
{
m_lastBackupTime = jsonValue.GetDouble("LastBackupTime");
}
return *this;
}

View File

@@ -0,0 +1,28 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeRecoveryPointRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeRecoveryPointRequest::DescribeRecoveryPointRequest() :
m_backupVaultNameHasBeenSet(false),
m_recoveryPointArnHasBeenSet(false)
{
}
Aws::String DescribeRecoveryPointRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,144 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeRecoveryPointResult.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;
DescribeRecoveryPointResult::DescribeRecoveryPointResult() :
m_status(RecoveryPointStatus::NOT_SET),
m_backupSizeInBytes(0),
m_isEncrypted(false),
m_storageClass(StorageClass::NOT_SET)
{
}
DescribeRecoveryPointResult::DescribeRecoveryPointResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_status(RecoveryPointStatus::NOT_SET),
m_backupSizeInBytes(0),
m_isEncrypted(false),
m_storageClass(StorageClass::NOT_SET)
{
*this = result;
}
DescribeRecoveryPointResult& DescribeRecoveryPointResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("RecoveryPointArn"))
{
m_recoveryPointArn = jsonValue.GetString("RecoveryPointArn");
}
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
}
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
}
if(jsonValue.ValueExists("CreatedBy"))
{
m_createdBy = jsonValue.GetObject("CreatedBy");
}
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
}
if(jsonValue.ValueExists("Status"))
{
m_status = RecoveryPointStatusMapper::GetRecoveryPointStatusForName(jsonValue.GetString("Status"));
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
if(jsonValue.ValueExists("CompletionDate"))
{
m_completionDate = jsonValue.GetDouble("CompletionDate");
}
if(jsonValue.ValueExists("BackupSizeInBytes"))
{
m_backupSizeInBytes = jsonValue.GetInt64("BackupSizeInBytes");
}
if(jsonValue.ValueExists("CalculatedLifecycle"))
{
m_calculatedLifecycle = jsonValue.GetObject("CalculatedLifecycle");
}
if(jsonValue.ValueExists("Lifecycle"))
{
m_lifecycle = jsonValue.GetObject("Lifecycle");
}
if(jsonValue.ValueExists("EncryptionKeyArn"))
{
m_encryptionKeyArn = jsonValue.GetString("EncryptionKeyArn");
}
if(jsonValue.ValueExists("IsEncrypted"))
{
m_isEncrypted = jsonValue.GetBool("IsEncrypted");
}
if(jsonValue.ValueExists("StorageClass"))
{
m_storageClass = StorageClassMapper::GetStorageClassForName(jsonValue.GetString("StorageClass"));
}
if(jsonValue.ValueExists("LastRestoreTime"))
{
m_lastRestoreTime = jsonValue.GetDouble("LastRestoreTime");
}
return *this;
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeRegionSettingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeRegionSettingsRequest::DescribeRegionSettingsRequest()
{
}
Aws::String DescribeRegionSettingsRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeRegionSettingsResult.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;
DescribeRegionSettingsResult::DescribeRegionSettingsResult()
{
}
DescribeRegionSettingsResult::DescribeRegionSettingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeRegionSettingsResult& DescribeRegionSettingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceTypeOptInPreference"))
{
Aws::Map<Aws::String, JsonView> resourceTypeOptInPreferenceJsonMap = jsonValue.GetObject("ResourceTypeOptInPreference").GetAllObjects();
for(auto& resourceTypeOptInPreferenceItem : resourceTypeOptInPreferenceJsonMap)
{
m_resourceTypeOptInPreference[resourceTypeOptInPreferenceItem.first] = resourceTypeOptInPreferenceItem.second.AsBool();
}
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeRestoreJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeRestoreJobRequest::DescribeRestoreJobRequest() :
m_restoreJobIdHasBeenSet(false)
{
}
Aws::String DescribeRestoreJobRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,118 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/DescribeRestoreJobResult.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;
DescribeRestoreJobResult::DescribeRestoreJobResult() :
m_status(RestoreJobStatus::NOT_SET),
m_backupSizeInBytes(0),
m_expectedCompletionTimeMinutes(0)
{
}
DescribeRestoreJobResult::DescribeRestoreJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_status(RestoreJobStatus::NOT_SET),
m_backupSizeInBytes(0),
m_expectedCompletionTimeMinutes(0)
{
*this = result;
}
DescribeRestoreJobResult& DescribeRestoreJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("AccountId"))
{
m_accountId = jsonValue.GetString("AccountId");
}
if(jsonValue.ValueExists("RestoreJobId"))
{
m_restoreJobId = jsonValue.GetString("RestoreJobId");
}
if(jsonValue.ValueExists("RecoveryPointArn"))
{
m_recoveryPointArn = jsonValue.GetString("RecoveryPointArn");
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
if(jsonValue.ValueExists("CompletionDate"))
{
m_completionDate = jsonValue.GetDouble("CompletionDate");
}
if(jsonValue.ValueExists("Status"))
{
m_status = RestoreJobStatusMapper::GetRestoreJobStatusForName(jsonValue.GetString("Status"));
}
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("ExpectedCompletionTimeMinutes"))
{
m_expectedCompletionTimeMinutes = jsonValue.GetInt64("ExpectedCompletionTimeMinutes");
}
if(jsonValue.ValueExists("CreatedResourceArn"))
{
m_createdResourceArn = jsonValue.GetString("CreatedResourceArn");
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ExportBackupPlanTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ExportBackupPlanTemplateRequest::ExportBackupPlanTemplateRequest() :
m_backupPlanIdHasBeenSet(false)
{
}
Aws::String ExportBackupPlanTemplateRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ExportBackupPlanTemplateResult.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;
ExportBackupPlanTemplateResult::ExportBackupPlanTemplateResult()
{
}
ExportBackupPlanTemplateResult::ExportBackupPlanTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ExportBackupPlanTemplateResult& ExportBackupPlanTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupPlanTemplateJson"))
{
m_backupPlanTemplateJson = jsonValue.GetString("BackupPlanTemplateJson");
}
return *this;
}

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupPlanFromJSONRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetBackupPlanFromJSONRequest::GetBackupPlanFromJSONRequest() :
m_backupPlanTemplateJsonHasBeenSet(false)
{
}
Aws::String GetBackupPlanFromJSONRequest::SerializePayload() const
{
JsonValue payload;
if(m_backupPlanTemplateJsonHasBeenSet)
{
payload.WithString("BackupPlanTemplateJson", m_backupPlanTemplateJson);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupPlanFromJSONResult.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;
GetBackupPlanFromJSONResult::GetBackupPlanFromJSONResult()
{
}
GetBackupPlanFromJSONResult::GetBackupPlanFromJSONResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBackupPlanFromJSONResult& GetBackupPlanFromJSONResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupPlan"))
{
m_backupPlan = jsonValue.GetObject("BackupPlan");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupPlanFromTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetBackupPlanFromTemplateRequest::GetBackupPlanFromTemplateRequest() :
m_backupPlanTemplateIdHasBeenSet(false)
{
}
Aws::String GetBackupPlanFromTemplateRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupPlanFromTemplateResult.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;
GetBackupPlanFromTemplateResult::GetBackupPlanFromTemplateResult()
{
}
GetBackupPlanFromTemplateResult::GetBackupPlanFromTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBackupPlanFromTemplateResult& GetBackupPlanFromTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupPlanDocument"))
{
m_backupPlanDocument = jsonValue.GetObject("BackupPlanDocument");
}
return *this;
}

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupPlanRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetBackupPlanRequest::GetBackupPlanRequest() :
m_backupPlanIdHasBeenSet(false),
m_versionIdHasBeenSet(false)
{
}
Aws::String GetBackupPlanRequest::SerializePayload() const
{
return {};
}
void GetBackupPlanRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_versionIdHasBeenSet)
{
ss << m_versionId;
uri.AddQueryStringParameter("versionId", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupPlanResult.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;
GetBackupPlanResult::GetBackupPlanResult()
{
}
GetBackupPlanResult::GetBackupPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBackupPlanResult& GetBackupPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& 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");
}
return *this;
}

View File

@@ -0,0 +1,28 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupSelectionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetBackupSelectionRequest::GetBackupSelectionRequest() :
m_backupPlanIdHasBeenSet(false),
m_selectionIdHasBeenSet(false)
{
}
Aws::String GetBackupSelectionRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupSelectionResult.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;
GetBackupSelectionResult::GetBackupSelectionResult()
{
}
GetBackupSelectionResult::GetBackupSelectionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBackupSelectionResult& GetBackupSelectionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupSelection"))
{
m_backupSelection = jsonValue.GetObject("BackupSelection");
}
if(jsonValue.ValueExists("SelectionId"))
{
m_selectionId = jsonValue.GetString("SelectionId");
}
if(jsonValue.ValueExists("BackupPlanId"))
{
m_backupPlanId = jsonValue.GetString("BackupPlanId");
}
if(jsonValue.ValueExists("CreationDate"))
{
m_creationDate = jsonValue.GetDouble("CreationDate");
}
if(jsonValue.ValueExists("CreatorRequestId"))
{
m_creatorRequestId = jsonValue.GetString("CreatorRequestId");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupVaultAccessPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetBackupVaultAccessPolicyRequest::GetBackupVaultAccessPolicyRequest() :
m_backupVaultNameHasBeenSet(false)
{
}
Aws::String GetBackupVaultAccessPolicyRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupVaultAccessPolicyResult.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;
GetBackupVaultAccessPolicyResult::GetBackupVaultAccessPolicyResult()
{
}
GetBackupVaultAccessPolicyResult::GetBackupVaultAccessPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBackupVaultAccessPolicyResult& GetBackupVaultAccessPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
}
if(jsonValue.ValueExists("Policy"))
{
m_policy = jsonValue.GetString("Policy");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupVaultNotificationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetBackupVaultNotificationsRequest::GetBackupVaultNotificationsRequest() :
m_backupVaultNameHasBeenSet(false)
{
}
Aws::String GetBackupVaultNotificationsRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetBackupVaultNotificationsResult.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;
GetBackupVaultNotificationsResult::GetBackupVaultNotificationsResult()
{
}
GetBackupVaultNotificationsResult::GetBackupVaultNotificationsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBackupVaultNotificationsResult& GetBackupVaultNotificationsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupVaultName"))
{
m_backupVaultName = jsonValue.GetString("BackupVaultName");
}
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
}
if(jsonValue.ValueExists("SNSTopicArn"))
{
m_sNSTopicArn = jsonValue.GetString("SNSTopicArn");
}
if(jsonValue.ValueExists("BackupVaultEvents"))
{
Array<JsonView> backupVaultEventsJsonList = jsonValue.GetArray("BackupVaultEvents");
for(unsigned backupVaultEventsIndex = 0; backupVaultEventsIndex < backupVaultEventsJsonList.GetLength(); ++backupVaultEventsIndex)
{
m_backupVaultEvents.push_back(BackupVaultEventMapper::GetBackupVaultEventForName(backupVaultEventsJsonList[backupVaultEventsIndex].AsString()));
}
}
return *this;
}

View File

@@ -0,0 +1,28 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetRecoveryPointRestoreMetadataRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetRecoveryPointRestoreMetadataRequest::GetRecoveryPointRestoreMetadataRequest() :
m_backupVaultNameHasBeenSet(false),
m_recoveryPointArnHasBeenSet(false)
{
}
Aws::String GetRecoveryPointRestoreMetadataRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetRecoveryPointRestoreMetadataResult.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;
GetRecoveryPointRestoreMetadataResult::GetRecoveryPointRestoreMetadataResult()
{
}
GetRecoveryPointRestoreMetadataResult::GetRecoveryPointRestoreMetadataResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetRecoveryPointRestoreMetadataResult& GetRecoveryPointRestoreMetadataResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupVaultArn"))
{
m_backupVaultArn = jsonValue.GetString("BackupVaultArn");
}
if(jsonValue.ValueExists("RecoveryPointArn"))
{
m_recoveryPointArn = jsonValue.GetString("RecoveryPointArn");
}
if(jsonValue.ValueExists("RestoreMetadata"))
{
Aws::Map<Aws::String, JsonView> restoreMetadataJsonMap = jsonValue.GetObject("RestoreMetadata").GetAllObjects();
for(auto& restoreMetadataItem : restoreMetadataJsonMap)
{
m_restoreMetadata[restoreMetadataItem.first] = restoreMetadataItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/GetSupportedResourceTypesResult.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;
GetSupportedResourceTypesResult::GetSupportedResourceTypesResult()
{
}
GetSupportedResourceTypesResult::GetSupportedResourceTypesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetSupportedResourceTypesResult& GetSupportedResourceTypesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceTypes"))
{
Array<JsonView> resourceTypesJsonList = jsonValue.GetArray("ResourceTypes");
for(unsigned resourceTypesIndex = 0; resourceTypesIndex < resourceTypesJsonList.GetLength(); ++resourceTypesIndex)
{
m_resourceTypes.push_back(resourceTypesJsonList[resourceTypesIndex].AsString());
}
}
return *this;
}

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/InvalidParameterValueException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
InvalidParameterValueException::InvalidParameterValueException() :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
}
InvalidParameterValueException::InvalidParameterValueException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
*this = jsonValue;
}
InvalidParameterValueException& InvalidParameterValueException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = jsonValue.GetString("Type");
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("Context"))
{
m_context = jsonValue.GetString("Context");
m_contextHasBeenSet = true;
}
return *this;
}
JsonValue InvalidParameterValueException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", m_type);
}
if(m_contextHasBeenSet)
{
payload.WithString("Context", m_context);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/InvalidRequestException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
InvalidRequestException::InvalidRequestException() :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
}
InvalidRequestException::InvalidRequestException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
*this = jsonValue;
}
InvalidRequestException& InvalidRequestException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = jsonValue.GetString("Type");
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("Context"))
{
m_context = jsonValue.GetString("Context");
m_contextHasBeenSet = true;
}
return *this;
}
JsonValue InvalidRequestException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", m_type);
}
if(m_contextHasBeenSet)
{
payload.WithString("Context", m_context);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/Lifecycle.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
Lifecycle::Lifecycle() :
m_moveToColdStorageAfterDays(0),
m_moveToColdStorageAfterDaysHasBeenSet(false),
m_deleteAfterDays(0),
m_deleteAfterDaysHasBeenSet(false)
{
}
Lifecycle::Lifecycle(JsonView jsonValue) :
m_moveToColdStorageAfterDays(0),
m_moveToColdStorageAfterDaysHasBeenSet(false),
m_deleteAfterDays(0),
m_deleteAfterDaysHasBeenSet(false)
{
*this = jsonValue;
}
Lifecycle& Lifecycle::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("MoveToColdStorageAfterDays"))
{
m_moveToColdStorageAfterDays = jsonValue.GetInt64("MoveToColdStorageAfterDays");
m_moveToColdStorageAfterDaysHasBeenSet = true;
}
if(jsonValue.ValueExists("DeleteAfterDays"))
{
m_deleteAfterDays = jsonValue.GetInt64("DeleteAfterDays");
m_deleteAfterDaysHasBeenSet = true;
}
return *this;
}
JsonValue Lifecycle::Jsonize() const
{
JsonValue payload;
if(m_moveToColdStorageAfterDaysHasBeenSet)
{
payload.WithInt64("MoveToColdStorageAfterDays", m_moveToColdStorageAfterDays);
}
if(m_deleteAfterDaysHasBeenSet)
{
payload.WithInt64("DeleteAfterDays", m_deleteAfterDays);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/LimitExceededException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
LimitExceededException::LimitExceededException() :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
}
LimitExceededException::LimitExceededException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
*this = jsonValue;
}
LimitExceededException& LimitExceededException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = jsonValue.GetString("Type");
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("Context"))
{
m_context = jsonValue.GetString("Context");
m_contextHasBeenSet = true;
}
return *this;
}
JsonValue LimitExceededException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", m_type);
}
if(m_contextHasBeenSet)
{
payload.WithString("Context", m_context);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupJobsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListBackupJobsRequest::ListBackupJobsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_byResourceArnHasBeenSet(false),
m_byState(BackupJobState::NOT_SET),
m_byStateHasBeenSet(false),
m_byBackupVaultNameHasBeenSet(false),
m_byCreatedBeforeHasBeenSet(false),
m_byCreatedAfterHasBeenSet(false),
m_byResourceTypeHasBeenSet(false),
m_byAccountIdHasBeenSet(false)
{
}
Aws::String ListBackupJobsRequest::SerializePayload() const
{
return {};
}
void ListBackupJobsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_byResourceArnHasBeenSet)
{
ss << m_byResourceArn;
uri.AddQueryStringParameter("resourceArn", ss.str());
ss.str("");
}
if(m_byStateHasBeenSet)
{
ss << BackupJobStateMapper::GetNameForBackupJobState(m_byState);
uri.AddQueryStringParameter("state", ss.str());
ss.str("");
}
if(m_byBackupVaultNameHasBeenSet)
{
ss << m_byBackupVaultName;
uri.AddQueryStringParameter("backupVaultName", ss.str());
ss.str("");
}
if(m_byCreatedBeforeHasBeenSet)
{
ss << m_byCreatedBefore.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdBefore", ss.str());
ss.str("");
}
if(m_byCreatedAfterHasBeenSet)
{
ss << m_byCreatedAfter.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdAfter", ss.str());
ss.str("");
}
if(m_byResourceTypeHasBeenSet)
{
ss << m_byResourceType;
uri.AddQueryStringParameter("resourceType", ss.str());
ss.str("");
}
if(m_byAccountIdHasBeenSet)
{
ss << m_byAccountId;
uri.AddQueryStringParameter("accountId", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupJobsResult.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;
ListBackupJobsResult::ListBackupJobsResult()
{
}
ListBackupJobsResult::ListBackupJobsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListBackupJobsResult& ListBackupJobsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupJobs"))
{
Array<JsonView> backupJobsJsonList = jsonValue.GetArray("BackupJobs");
for(unsigned backupJobsIndex = 0; backupJobsIndex < backupJobsJsonList.GetLength(); ++backupJobsIndex)
{
m_backupJobs.push_back(backupJobsJsonList[backupJobsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupPlanTemplatesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListBackupPlanTemplatesRequest::ListBackupPlanTemplatesRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListBackupPlanTemplatesRequest::SerializePayload() const
{
return {};
}
void ListBackupPlanTemplatesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupPlanTemplatesResult.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;
ListBackupPlanTemplatesResult::ListBackupPlanTemplatesResult()
{
}
ListBackupPlanTemplatesResult::ListBackupPlanTemplatesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListBackupPlanTemplatesResult& ListBackupPlanTemplatesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("BackupPlanTemplatesList"))
{
Array<JsonView> backupPlanTemplatesListJsonList = jsonValue.GetArray("BackupPlanTemplatesList");
for(unsigned backupPlanTemplatesListIndex = 0; backupPlanTemplatesListIndex < backupPlanTemplatesListJsonList.GetLength(); ++backupPlanTemplatesListIndex)
{
m_backupPlanTemplatesList.push_back(backupPlanTemplatesListJsonList[backupPlanTemplatesListIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupPlanVersionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListBackupPlanVersionsRequest::ListBackupPlanVersionsRequest() :
m_backupPlanIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListBackupPlanVersionsRequest::SerializePayload() const
{
return {};
}
void ListBackupPlanVersionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupPlanVersionsResult.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;
ListBackupPlanVersionsResult::ListBackupPlanVersionsResult()
{
}
ListBackupPlanVersionsResult::ListBackupPlanVersionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListBackupPlanVersionsResult& ListBackupPlanVersionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("BackupPlanVersionsList"))
{
Array<JsonView> backupPlanVersionsListJsonList = jsonValue.GetArray("BackupPlanVersionsList");
for(unsigned backupPlanVersionsListIndex = 0; backupPlanVersionsListIndex < backupPlanVersionsListJsonList.GetLength(); ++backupPlanVersionsListIndex)
{
m_backupPlanVersionsList.push_back(backupPlanVersionsListJsonList[backupPlanVersionsListIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupPlansRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListBackupPlansRequest::ListBackupPlansRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_includeDeleted(false),
m_includeDeletedHasBeenSet(false)
{
}
Aws::String ListBackupPlansRequest::SerializePayload() const
{
return {};
}
void ListBackupPlansRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_includeDeletedHasBeenSet)
{
ss << m_includeDeleted;
uri.AddQueryStringParameter("includeDeleted", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupPlansResult.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;
ListBackupPlansResult::ListBackupPlansResult()
{
}
ListBackupPlansResult::ListBackupPlansResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListBackupPlansResult& ListBackupPlansResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("BackupPlansList"))
{
Array<JsonView> backupPlansListJsonList = jsonValue.GetArray("BackupPlansList");
for(unsigned backupPlansListIndex = 0; backupPlansListIndex < backupPlansListJsonList.GetLength(); ++backupPlansListIndex)
{
m_backupPlansList.push_back(backupPlansListJsonList[backupPlansListIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupSelectionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListBackupSelectionsRequest::ListBackupSelectionsRequest() :
m_backupPlanIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListBackupSelectionsRequest::SerializePayload() const
{
return {};
}
void ListBackupSelectionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupSelectionsResult.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;
ListBackupSelectionsResult::ListBackupSelectionsResult()
{
}
ListBackupSelectionsResult::ListBackupSelectionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListBackupSelectionsResult& ListBackupSelectionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("BackupSelectionsList"))
{
Array<JsonView> backupSelectionsListJsonList = jsonValue.GetArray("BackupSelectionsList");
for(unsigned backupSelectionsListIndex = 0; backupSelectionsListIndex < backupSelectionsListJsonList.GetLength(); ++backupSelectionsListIndex)
{
m_backupSelectionsList.push_back(backupSelectionsListJsonList[backupSelectionsListIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupVaultsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListBackupVaultsRequest::ListBackupVaultsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListBackupVaultsRequest::SerializePayload() const
{
return {};
}
void ListBackupVaultsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListBackupVaultsResult.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;
ListBackupVaultsResult::ListBackupVaultsResult()
{
}
ListBackupVaultsResult::ListBackupVaultsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListBackupVaultsResult& ListBackupVaultsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BackupVaultList"))
{
Array<JsonView> backupVaultListJsonList = jsonValue.GetArray("BackupVaultList");
for(unsigned backupVaultListIndex = 0; backupVaultListIndex < backupVaultListJsonList.GetLength(); ++backupVaultListIndex)
{
m_backupVaultList.push_back(backupVaultListJsonList[backupVaultListIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListCopyJobsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListCopyJobsRequest::ListCopyJobsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_byResourceArnHasBeenSet(false),
m_byState(CopyJobState::NOT_SET),
m_byStateHasBeenSet(false),
m_byCreatedBeforeHasBeenSet(false),
m_byCreatedAfterHasBeenSet(false),
m_byResourceTypeHasBeenSet(false),
m_byDestinationVaultArnHasBeenSet(false),
m_byAccountIdHasBeenSet(false)
{
}
Aws::String ListCopyJobsRequest::SerializePayload() const
{
return {};
}
void ListCopyJobsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_byResourceArnHasBeenSet)
{
ss << m_byResourceArn;
uri.AddQueryStringParameter("resourceArn", ss.str());
ss.str("");
}
if(m_byStateHasBeenSet)
{
ss << CopyJobStateMapper::GetNameForCopyJobState(m_byState);
uri.AddQueryStringParameter("state", ss.str());
ss.str("");
}
if(m_byCreatedBeforeHasBeenSet)
{
ss << m_byCreatedBefore.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdBefore", ss.str());
ss.str("");
}
if(m_byCreatedAfterHasBeenSet)
{
ss << m_byCreatedAfter.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdAfter", ss.str());
ss.str("");
}
if(m_byResourceTypeHasBeenSet)
{
ss << m_byResourceType;
uri.AddQueryStringParameter("resourceType", ss.str());
ss.str("");
}
if(m_byDestinationVaultArnHasBeenSet)
{
ss << m_byDestinationVaultArn;
uri.AddQueryStringParameter("destinationVaultArn", ss.str());
ss.str("");
}
if(m_byAccountIdHasBeenSet)
{
ss << m_byAccountId;
uri.AddQueryStringParameter("accountId", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListCopyJobsResult.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;
ListCopyJobsResult::ListCopyJobsResult()
{
}
ListCopyJobsResult::ListCopyJobsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListCopyJobsResult& ListCopyJobsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("CopyJobs"))
{
Array<JsonView> copyJobsJsonList = jsonValue.GetArray("CopyJobs");
for(unsigned copyJobsIndex = 0; copyJobsIndex < copyJobsJsonList.GetLength(); ++copyJobsIndex)
{
m_copyJobs.push_back(copyJobsJsonList[copyJobsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListProtectedResourcesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListProtectedResourcesRequest::ListProtectedResourcesRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListProtectedResourcesRequest::SerializePayload() const
{
return {};
}
void ListProtectedResourcesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListProtectedResourcesResult.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;
ListProtectedResourcesResult::ListProtectedResourcesResult()
{
}
ListProtectedResourcesResult::ListProtectedResourcesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListProtectedResourcesResult& ListProtectedResourcesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Results"))
{
Array<JsonView> resultsJsonList = jsonValue.GetArray("Results");
for(unsigned resultsIndex = 0; resultsIndex < resultsJsonList.GetLength(); ++resultsIndex)
{
m_results.push_back(resultsJsonList[resultsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListRecoveryPointsByBackupVaultRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListRecoveryPointsByBackupVaultRequest::ListRecoveryPointsByBackupVaultRequest() :
m_backupVaultNameHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_byResourceArnHasBeenSet(false),
m_byResourceTypeHasBeenSet(false),
m_byBackupPlanIdHasBeenSet(false),
m_byCreatedBeforeHasBeenSet(false),
m_byCreatedAfterHasBeenSet(false)
{
}
Aws::String ListRecoveryPointsByBackupVaultRequest::SerializePayload() const
{
return {};
}
void ListRecoveryPointsByBackupVaultRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_byResourceArnHasBeenSet)
{
ss << m_byResourceArn;
uri.AddQueryStringParameter("resourceArn", ss.str());
ss.str("");
}
if(m_byResourceTypeHasBeenSet)
{
ss << m_byResourceType;
uri.AddQueryStringParameter("resourceType", ss.str());
ss.str("");
}
if(m_byBackupPlanIdHasBeenSet)
{
ss << m_byBackupPlanId;
uri.AddQueryStringParameter("backupPlanId", ss.str());
ss.str("");
}
if(m_byCreatedBeforeHasBeenSet)
{
ss << m_byCreatedBefore.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdBefore", ss.str());
ss.str("");
}
if(m_byCreatedAfterHasBeenSet)
{
ss << m_byCreatedAfter.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdAfter", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListRecoveryPointsByBackupVaultResult.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;
ListRecoveryPointsByBackupVaultResult::ListRecoveryPointsByBackupVaultResult()
{
}
ListRecoveryPointsByBackupVaultResult::ListRecoveryPointsByBackupVaultResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListRecoveryPointsByBackupVaultResult& ListRecoveryPointsByBackupVaultResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("RecoveryPoints"))
{
Array<JsonView> recoveryPointsJsonList = jsonValue.GetArray("RecoveryPoints");
for(unsigned recoveryPointsIndex = 0; recoveryPointsIndex < recoveryPointsJsonList.GetLength(); ++recoveryPointsIndex)
{
m_recoveryPoints.push_back(recoveryPointsJsonList[recoveryPointsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListRecoveryPointsByResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListRecoveryPointsByResourceRequest::ListRecoveryPointsByResourceRequest() :
m_resourceArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListRecoveryPointsByResourceRequest::SerializePayload() const
{
return {};
}
void ListRecoveryPointsByResourceRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListRecoveryPointsByResourceResult.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;
ListRecoveryPointsByResourceResult::ListRecoveryPointsByResourceResult()
{
}
ListRecoveryPointsByResourceResult::ListRecoveryPointsByResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListRecoveryPointsByResourceResult& ListRecoveryPointsByResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("RecoveryPoints"))
{
Array<JsonView> recoveryPointsJsonList = jsonValue.GetArray("RecoveryPoints");
for(unsigned recoveryPointsIndex = 0; recoveryPointsIndex < recoveryPointsJsonList.GetLength(); ++recoveryPointsIndex)
{
m_recoveryPoints.push_back(recoveryPointsJsonList[recoveryPointsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListRestoreJobsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListRestoreJobsRequest::ListRestoreJobsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_byAccountIdHasBeenSet(false),
m_byCreatedBeforeHasBeenSet(false),
m_byCreatedAfterHasBeenSet(false),
m_byStatus(RestoreJobStatus::NOT_SET),
m_byStatusHasBeenSet(false)
{
}
Aws::String ListRestoreJobsRequest::SerializePayload() const
{
return {};
}
void ListRestoreJobsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_byAccountIdHasBeenSet)
{
ss << m_byAccountId;
uri.AddQueryStringParameter("accountId", ss.str());
ss.str("");
}
if(m_byCreatedBeforeHasBeenSet)
{
ss << m_byCreatedBefore.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdBefore", ss.str());
ss.str("");
}
if(m_byCreatedAfterHasBeenSet)
{
ss << m_byCreatedAfter.ToGmtString(DateFormat::RFC822);
uri.AddQueryStringParameter("createdAfter", ss.str());
ss.str("");
}
if(m_byStatusHasBeenSet)
{
ss << RestoreJobStatusMapper::GetNameForRestoreJobStatus(m_byStatus);
uri.AddQueryStringParameter("status", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListRestoreJobsResult.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;
ListRestoreJobsResult::ListRestoreJobsResult()
{
}
ListRestoreJobsResult::ListRestoreJobsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListRestoreJobsResult& ListRestoreJobsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("RestoreJobs"))
{
Array<JsonView> restoreJobsJsonList = jsonValue.GetArray("RestoreJobs");
for(unsigned restoreJobsIndex = 0; restoreJobsIndex < restoreJobsJsonList.GetLength(); ++restoreJobsIndex)
{
m_restoreJobs.push_back(restoreJobsJsonList[restoreJobsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListTagsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListTagsRequest::ListTagsRequest() :
m_resourceArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListTagsRequest::SerializePayload() const
{
return {};
}
void ListTagsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ListTagsResult.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;
ListTagsResult::ListTagsResult()
{
}
ListTagsResult::ListTagsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListTagsResult& ListTagsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("Tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("Tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/MissingParameterValueException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
MissingParameterValueException::MissingParameterValueException() :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
}
MissingParameterValueException::MissingParameterValueException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_messageHasBeenSet(false),
m_typeHasBeenSet(false),
m_contextHasBeenSet(false)
{
*this = jsonValue;
}
MissingParameterValueException& MissingParameterValueException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = jsonValue.GetString("Type");
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("Context"))
{
m_context = jsonValue.GetString("Context");
m_contextHasBeenSet = true;
}
return *this;
}
JsonValue MissingParameterValueException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", m_type);
}
if(m_contextHasBeenSet)
{
payload.WithString("Context", m_context);
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,88 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/ProtectedResource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Backup
{
namespace Model
{
ProtectedResource::ProtectedResource() :
m_resourceArnHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_lastBackupTimeHasBeenSet(false)
{
}
ProtectedResource::ProtectedResource(JsonView jsonValue) :
m_resourceArnHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_lastBackupTimeHasBeenSet(false)
{
*this = jsonValue;
}
ProtectedResource& ProtectedResource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("LastBackupTime"))
{
m_lastBackupTime = jsonValue.GetDouble("LastBackupTime");
m_lastBackupTimeHasBeenSet = true;
}
return *this;
}
JsonValue ProtectedResource::Jsonize() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
if(m_lastBackupTimeHasBeenSet)
{
payload.WithDouble("LastBackupTime", m_lastBackupTime.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Backup
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/PutBackupVaultAccessPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutBackupVaultAccessPolicyRequest::PutBackupVaultAccessPolicyRequest() :
m_backupVaultNameHasBeenSet(false),
m_policyHasBeenSet(false)
{
}
Aws::String PutBackupVaultAccessPolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_policyHasBeenSet)
{
payload.WithString("Policy", m_policy);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/backup/model/PutBackupVaultNotificationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutBackupVaultNotificationsRequest::PutBackupVaultNotificationsRequest() :
m_backupVaultNameHasBeenSet(false),
m_sNSTopicArnHasBeenSet(false),
m_backupVaultEventsHasBeenSet(false)
{
}
Aws::String PutBackupVaultNotificationsRequest::SerializePayload() const
{
JsonValue payload;
if(m_sNSTopicArnHasBeenSet)
{
payload.WithString("SNSTopicArn", m_sNSTopicArn);
}
if(m_backupVaultEventsHasBeenSet)
{
Array<JsonValue> backupVaultEventsJsonList(m_backupVaultEvents.size());
for(unsigned backupVaultEventsIndex = 0; backupVaultEventsIndex < backupVaultEventsJsonList.GetLength(); ++backupVaultEventsIndex)
{
backupVaultEventsJsonList[backupVaultEventsIndex].AsString(BackupVaultEventMapper::GetNameForBackupVaultEvent(m_backupVaultEvents[backupVaultEventsIndex]));
}
payload.WithArray("BackupVaultEvents", std::move(backupVaultEventsJsonList));
}
return payload.View().WriteReadable();
}

Some files were not shown because too many files have changed in this diff Show More