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

View File

@@ -0,0 +1,363 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/dlm/DLMClient.h>
#include <aws/dlm/DLMEndpoint.h>
#include <aws/dlm/DLMErrorMarshaller.h>
#include <aws/dlm/model/CreateLifecyclePolicyRequest.h>
#include <aws/dlm/model/DeleteLifecyclePolicyRequest.h>
#include <aws/dlm/model/GetLifecyclePoliciesRequest.h>
#include <aws/dlm/model/GetLifecyclePolicyRequest.h>
#include <aws/dlm/model/ListTagsForResourceRequest.h>
#include <aws/dlm/model/TagResourceRequest.h>
#include <aws/dlm/model/UntagResourceRequest.h>
#include <aws/dlm/model/UpdateLifecyclePolicyRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::DLM;
using namespace Aws::DLM::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "dlm";
static const char* ALLOCATION_TAG = "DLMClient";
DLMClient::DLMClient(const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<DLMErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
DLMClient::DLMClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<DLMErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
DLMClient::DLMClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<DLMErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
DLMClient::~DLMClient()
{
}
void DLMClient::init(const ClientConfiguration& config)
{
SetServiceClientName("DLM");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + DLMEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void DLMClient::OverrideEndpoint(const Aws::String& endpoint)
{
if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
{
m_uri = endpoint;
}
else
{
m_uri = m_configScheme + "://" + endpoint;
}
}
CreateLifecyclePolicyOutcome DLMClient::CreateLifecyclePolicy(const CreateLifecyclePolicyRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/policies";
uri.SetPath(uri.GetPath() + ss.str());
return CreateLifecyclePolicyOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateLifecyclePolicyOutcomeCallable DLMClient::CreateLifecyclePolicyCallable(const CreateLifecyclePolicyRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateLifecyclePolicyOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateLifecyclePolicy(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::CreateLifecyclePolicyAsync(const CreateLifecyclePolicyRequest& request, const CreateLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateLifecyclePolicyAsyncHelper( request, handler, context ); } );
}
void DLMClient::CreateLifecyclePolicyAsyncHelper(const CreateLifecyclePolicyRequest& request, const CreateLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateLifecyclePolicy(request), context);
}
DeleteLifecyclePolicyOutcome DLMClient::DeleteLifecyclePolicy(const DeleteLifecyclePolicyRequest& request) const
{
if (!request.PolicyIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteLifecyclePolicy", "Required field: PolicyId, is not set");
return DeleteLifecyclePolicyOutcome(Aws::Client::AWSError<DLMErrors>(DLMErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/policies/";
ss << request.GetPolicyId();
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return DeleteLifecyclePolicyOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
DeleteLifecyclePolicyOutcomeCallable DLMClient::DeleteLifecyclePolicyCallable(const DeleteLifecyclePolicyRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteLifecyclePolicyOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteLifecyclePolicy(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::DeleteLifecyclePolicyAsync(const DeleteLifecyclePolicyRequest& request, const DeleteLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteLifecyclePolicyAsyncHelper( request, handler, context ); } );
}
void DLMClient::DeleteLifecyclePolicyAsyncHelper(const DeleteLifecyclePolicyRequest& request, const DeleteLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteLifecyclePolicy(request), context);
}
GetLifecyclePoliciesOutcome DLMClient::GetLifecyclePolicies(const GetLifecyclePoliciesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/policies";
uri.SetPath(uri.GetPath() + ss.str());
return GetLifecyclePoliciesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetLifecyclePoliciesOutcomeCallable DLMClient::GetLifecyclePoliciesCallable(const GetLifecyclePoliciesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetLifecyclePoliciesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetLifecyclePolicies(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::GetLifecyclePoliciesAsync(const GetLifecyclePoliciesRequest& request, const GetLifecyclePoliciesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetLifecyclePoliciesAsyncHelper( request, handler, context ); } );
}
void DLMClient::GetLifecyclePoliciesAsyncHelper(const GetLifecyclePoliciesRequest& request, const GetLifecyclePoliciesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetLifecyclePolicies(request), context);
}
GetLifecyclePolicyOutcome DLMClient::GetLifecyclePolicy(const GetLifecyclePolicyRequest& request) const
{
if (!request.PolicyIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetLifecyclePolicy", "Required field: PolicyId, is not set");
return GetLifecyclePolicyOutcome(Aws::Client::AWSError<DLMErrors>(DLMErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/policies/";
ss << request.GetPolicyId();
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return GetLifecyclePolicyOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetLifecyclePolicyOutcomeCallable DLMClient::GetLifecyclePolicyCallable(const GetLifecyclePolicyRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetLifecyclePolicyOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetLifecyclePolicy(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::GetLifecyclePolicyAsync(const GetLifecyclePolicyRequest& request, const GetLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetLifecyclePolicyAsyncHelper( request, handler, context ); } );
}
void DLMClient::GetLifecyclePolicyAsyncHelper(const GetLifecyclePolicyRequest& request, const GetLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetLifecyclePolicy(request), context);
}
ListTagsForResourceOutcome DLMClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
{
if (!request.ResourceArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: ResourceArn, is not set");
return ListTagsForResourceOutcome(Aws::Client::AWSError<DLMErrors>(DLMErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/tags/";
ss << request.GetResourceArn();
uri.SetPath(uri.GetPath() + ss.str());
return ListTagsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListTagsForResourceOutcomeCallable DLMClient::ListTagsForResourceCallable(const ListTagsForResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListTagsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListTagsForResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::ListTagsForResourceAsync(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListTagsForResourceAsyncHelper( request, handler, context ); } );
}
void DLMClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListTagsForResource(request), context);
}
TagResourceOutcome DLMClient::TagResource(const TagResourceRequest& request) const
{
if (!request.ResourceArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("TagResource", "Required field: ResourceArn, is not set");
return TagResourceOutcome(Aws::Client::AWSError<DLMErrors>(DLMErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/tags/";
ss << request.GetResourceArn();
uri.SetPath(uri.GetPath() + ss.str());
return TagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
TagResourceOutcomeCallable DLMClient::TagResourceCallable(const TagResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< TagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->TagResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::TagResourceAsync(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->TagResourceAsyncHelper( request, handler, context ); } );
}
void DLMClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, TagResource(request), context);
}
UntagResourceOutcome DLMClient::UntagResource(const UntagResourceRequest& request) const
{
if (!request.ResourceArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UntagResource", "Required field: ResourceArn, is not set");
return UntagResourceOutcome(Aws::Client::AWSError<DLMErrors>(DLMErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
}
if (!request.TagKeysHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UntagResource", "Required field: TagKeys, is not set");
return UntagResourceOutcome(Aws::Client::AWSError<DLMErrors>(DLMErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TagKeys]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/tags/";
ss << request.GetResourceArn();
uri.SetPath(uri.GetPath() + ss.str());
return UntagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
UntagResourceOutcomeCallable DLMClient::UntagResourceCallable(const UntagResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UntagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UntagResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::UntagResourceAsync(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UntagResourceAsyncHelper( request, handler, context ); } );
}
void DLMClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UntagResource(request), context);
}
UpdateLifecyclePolicyOutcome DLMClient::UpdateLifecyclePolicy(const UpdateLifecyclePolicyRequest& request) const
{
if (!request.PolicyIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UpdateLifecyclePolicy", "Required field: PolicyId, is not set");
return UpdateLifecyclePolicyOutcome(Aws::Client::AWSError<DLMErrors>(DLMErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/policies/";
ss << request.GetPolicyId();
uri.SetPath(uri.GetPath() + ss.str());
return UpdateLifecyclePolicyOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
}
UpdateLifecyclePolicyOutcomeCallable DLMClient::UpdateLifecyclePolicyCallable(const UpdateLifecyclePolicyRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateLifecyclePolicyOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateLifecyclePolicy(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DLMClient::UpdateLifecyclePolicyAsync(const UpdateLifecyclePolicyRequest& request, const UpdateLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateLifecyclePolicyAsyncHelper( request, handler, context ); } );
}
void DLMClient::UpdateLifecyclePolicyAsyncHelper(const UpdateLifecyclePolicyRequest& request, const UpdateLifecyclePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateLifecyclePolicy(request), context);
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/DLMEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::DLM;
namespace Aws
{
namespace DLM
{
namespace DLMEndpoint
{
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 << "dlm" << ".";
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 DLMEndpoint
} // namespace DLM
} // 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/dlm/DLMErrorMarshaller.h>
#include <aws/dlm/DLMErrors.h>
using namespace Aws::Client;
using namespace Aws::DLM;
AWSError<CoreErrors> DLMErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = DLMErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,76 @@
/**
* 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/dlm/DLMErrors.h>
#include <aws/dlm/model/InternalServerException.h>
#include <aws/dlm/model/ResourceNotFoundException.h>
#include <aws/dlm/model/LimitExceededException.h>
#include <aws/dlm/model/InvalidRequestException.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::DLM;
using namespace Aws::DLM::Model;
namespace Aws
{
namespace DLM
{
template<> AWS_DLM_API InternalServerException DLMError::GetModeledError()
{
assert(this->GetErrorType() == DLMErrors::INTERNAL_SERVER);
return InternalServerException(this->GetJsonPayload().View());
}
template<> AWS_DLM_API ResourceNotFoundException DLMError::GetModeledError()
{
assert(this->GetErrorType() == DLMErrors::RESOURCE_NOT_FOUND);
return ResourceNotFoundException(this->GetJsonPayload().View());
}
template<> AWS_DLM_API LimitExceededException DLMError::GetModeledError()
{
assert(this->GetErrorType() == DLMErrors::LIMIT_EXCEEDED);
return LimitExceededException(this->GetJsonPayload().View());
}
template<> AWS_DLM_API InvalidRequestException DLMError::GetModeledError()
{
assert(this->GetErrorType() == DLMErrors::INVALID_REQUEST);
return InvalidRequestException(this->GetJsonPayload().View());
}
namespace DLMErrorMapper
{
static const int INTERNAL_SERVER_HASH = HashingUtils::HashString("InternalServerException");
static const int LIMIT_EXCEEDED_HASH = HashingUtils::HashString("LimitExceededException");
static const int INVALID_REQUEST_HASH = HashingUtils::HashString("InvalidRequestException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == INTERNAL_SERVER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(DLMErrors::INTERNAL_SERVER), false);
}
else if (hashCode == LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(DLMErrors::LIMIT_EXCEEDED), true);
}
else if (hashCode == INVALID_REQUEST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(DLMErrors::INVALID_REQUEST), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace DLMErrorMapper
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,68 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/CreateLifecyclePolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateLifecyclePolicyRequest::CreateLifecyclePolicyRequest() :
m_executionRoleArnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_state(SettablePolicyStateValues::NOT_SET),
m_stateHasBeenSet(false),
m_policyDetailsHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateLifecyclePolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_executionRoleArnHasBeenSet)
{
payload.WithString("ExecutionRoleArn", m_executionRoleArn);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_stateHasBeenSet)
{
payload.WithString("State", SettablePolicyStateValuesMapper::GetNameForSettablePolicyStateValues(m_state));
}
if(m_policyDetailsHasBeenSet)
{
payload.WithObject("PolicyDetails", m_policyDetails.Jsonize());
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("Tags", std::move(tagsJsonMap));
}
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/dlm/model/CreateLifecyclePolicyResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateLifecyclePolicyResult::CreateLifecyclePolicyResult()
{
}
CreateLifecyclePolicyResult::CreateLifecyclePolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateLifecyclePolicyResult& CreateLifecyclePolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("PolicyId"))
{
m_policyId = jsonValue.GetString("PolicyId");
}
return *this;
}

View File

@@ -0,0 +1,115 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/CreateRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
CreateRule::CreateRule() :
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(IntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false),
m_timesHasBeenSet(false),
m_cronExpressionHasBeenSet(false)
{
}
CreateRule::CreateRule(JsonView jsonValue) :
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(IntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false),
m_timesHasBeenSet(false),
m_cronExpressionHasBeenSet(false)
{
*this = jsonValue;
}
CreateRule& CreateRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Interval"))
{
m_interval = jsonValue.GetInteger("Interval");
m_intervalHasBeenSet = true;
}
if(jsonValue.ValueExists("IntervalUnit"))
{
m_intervalUnit = IntervalUnitValuesMapper::GetIntervalUnitValuesForName(jsonValue.GetString("IntervalUnit"));
m_intervalUnitHasBeenSet = true;
}
if(jsonValue.ValueExists("Times"))
{
Array<JsonView> timesJsonList = jsonValue.GetArray("Times");
for(unsigned timesIndex = 0; timesIndex < timesJsonList.GetLength(); ++timesIndex)
{
m_times.push_back(timesJsonList[timesIndex].AsString());
}
m_timesHasBeenSet = true;
}
if(jsonValue.ValueExists("CronExpression"))
{
m_cronExpression = jsonValue.GetString("CronExpression");
m_cronExpressionHasBeenSet = true;
}
return *this;
}
JsonValue CreateRule::Jsonize() const
{
JsonValue payload;
if(m_intervalHasBeenSet)
{
payload.WithInteger("Interval", m_interval);
}
if(m_intervalUnitHasBeenSet)
{
payload.WithString("IntervalUnit", IntervalUnitValuesMapper::GetNameForIntervalUnitValues(m_intervalUnit));
}
if(m_timesHasBeenSet)
{
Array<JsonValue> timesJsonList(m_times.size());
for(unsigned timesIndex = 0; timesIndex < timesJsonList.GetLength(); ++timesIndex)
{
timesJsonList[timesIndex].AsString(m_times[timesIndex]);
}
payload.WithArray("Times", std::move(timesJsonList));
}
if(m_cronExpressionHasBeenSet)
{
payload.WithString("CronExpression", m_cronExpression);
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/CrossRegionCopyRetainRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
CrossRegionCopyRetainRule::CrossRegionCopyRetainRule() :
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(RetentionIntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false)
{
}
CrossRegionCopyRetainRule::CrossRegionCopyRetainRule(JsonView jsonValue) :
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(RetentionIntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false)
{
*this = jsonValue;
}
CrossRegionCopyRetainRule& CrossRegionCopyRetainRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Interval"))
{
m_interval = jsonValue.GetInteger("Interval");
m_intervalHasBeenSet = true;
}
if(jsonValue.ValueExists("IntervalUnit"))
{
m_intervalUnit = RetentionIntervalUnitValuesMapper::GetRetentionIntervalUnitValuesForName(jsonValue.GetString("IntervalUnit"));
m_intervalUnitHasBeenSet = true;
}
return *this;
}
JsonValue CrossRegionCopyRetainRule::Jsonize() const
{
JsonValue payload;
if(m_intervalHasBeenSet)
{
payload.WithInteger("Interval", m_interval);
}
if(m_intervalUnitHasBeenSet)
{
payload.WithString("IntervalUnit", RetentionIntervalUnitValuesMapper::GetNameForRetentionIntervalUnitValues(m_intervalUnit));
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,123 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/CrossRegionCopyRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
CrossRegionCopyRule::CrossRegionCopyRule() :
m_targetRegionHasBeenSet(false),
m_encrypted(false),
m_encryptedHasBeenSet(false),
m_cmkArnHasBeenSet(false),
m_copyTags(false),
m_copyTagsHasBeenSet(false),
m_retainRuleHasBeenSet(false)
{
}
CrossRegionCopyRule::CrossRegionCopyRule(JsonView jsonValue) :
m_targetRegionHasBeenSet(false),
m_encrypted(false),
m_encryptedHasBeenSet(false),
m_cmkArnHasBeenSet(false),
m_copyTags(false),
m_copyTagsHasBeenSet(false),
m_retainRuleHasBeenSet(false)
{
*this = jsonValue;
}
CrossRegionCopyRule& CrossRegionCopyRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("TargetRegion"))
{
m_targetRegion = jsonValue.GetString("TargetRegion");
m_targetRegionHasBeenSet = true;
}
if(jsonValue.ValueExists("Encrypted"))
{
m_encrypted = jsonValue.GetBool("Encrypted");
m_encryptedHasBeenSet = true;
}
if(jsonValue.ValueExists("CmkArn"))
{
m_cmkArn = jsonValue.GetString("CmkArn");
m_cmkArnHasBeenSet = true;
}
if(jsonValue.ValueExists("CopyTags"))
{
m_copyTags = jsonValue.GetBool("CopyTags");
m_copyTagsHasBeenSet = true;
}
if(jsonValue.ValueExists("RetainRule"))
{
m_retainRule = jsonValue.GetObject("RetainRule");
m_retainRuleHasBeenSet = true;
}
return *this;
}
JsonValue CrossRegionCopyRule::Jsonize() const
{
JsonValue payload;
if(m_targetRegionHasBeenSet)
{
payload.WithString("TargetRegion", m_targetRegion);
}
if(m_encryptedHasBeenSet)
{
payload.WithBool("Encrypted", m_encrypted);
}
if(m_cmkArnHasBeenSet)
{
payload.WithString("CmkArn", m_cmkArn);
}
if(m_copyTagsHasBeenSet)
{
payload.WithBool("CopyTags", m_copyTags);
}
if(m_retainRuleHasBeenSet)
{
payload.WithObject("RetainRule", m_retainRule.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace DLM
} // 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/dlm/model/DeleteLifecyclePolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteLifecyclePolicyRequest::DeleteLifecyclePolicyRequest() :
m_policyIdHasBeenSet(false)
{
}
Aws::String DeleteLifecyclePolicyRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/DeleteLifecyclePolicyResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteLifecyclePolicyResult::DeleteLifecyclePolicyResult()
{
}
DeleteLifecyclePolicyResult::DeleteLifecyclePolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteLifecyclePolicyResult& DeleteLifecyclePolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,117 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/FastRestoreRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
FastRestoreRule::FastRestoreRule() :
m_count(0),
m_countHasBeenSet(false),
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(RetentionIntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false),
m_availabilityZonesHasBeenSet(false)
{
}
FastRestoreRule::FastRestoreRule(JsonView jsonValue) :
m_count(0),
m_countHasBeenSet(false),
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(RetentionIntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false),
m_availabilityZonesHasBeenSet(false)
{
*this = jsonValue;
}
FastRestoreRule& FastRestoreRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Count"))
{
m_count = jsonValue.GetInteger("Count");
m_countHasBeenSet = true;
}
if(jsonValue.ValueExists("Interval"))
{
m_interval = jsonValue.GetInteger("Interval");
m_intervalHasBeenSet = true;
}
if(jsonValue.ValueExists("IntervalUnit"))
{
m_intervalUnit = RetentionIntervalUnitValuesMapper::GetRetentionIntervalUnitValuesForName(jsonValue.GetString("IntervalUnit"));
m_intervalUnitHasBeenSet = true;
}
if(jsonValue.ValueExists("AvailabilityZones"))
{
Array<JsonView> availabilityZonesJsonList = jsonValue.GetArray("AvailabilityZones");
for(unsigned availabilityZonesIndex = 0; availabilityZonesIndex < availabilityZonesJsonList.GetLength(); ++availabilityZonesIndex)
{
m_availabilityZones.push_back(availabilityZonesJsonList[availabilityZonesIndex].AsString());
}
m_availabilityZonesHasBeenSet = true;
}
return *this;
}
JsonValue FastRestoreRule::Jsonize() const
{
JsonValue payload;
if(m_countHasBeenSet)
{
payload.WithInteger("Count", m_count);
}
if(m_intervalHasBeenSet)
{
payload.WithInteger("Interval", m_interval);
}
if(m_intervalUnitHasBeenSet)
{
payload.WithString("IntervalUnit", RetentionIntervalUnitValuesMapper::GetNameForRetentionIntervalUnitValues(m_intervalUnit));
}
if(m_availabilityZonesHasBeenSet)
{
Array<JsonValue> availabilityZonesJsonList(m_availabilityZones.size());
for(unsigned availabilityZonesIndex = 0; availabilityZonesIndex < availabilityZonesJsonList.GetLength(); ++availabilityZonesIndex)
{
availabilityZonesJsonList[availabilityZonesIndex].AsString(m_availabilityZones[availabilityZonesIndex]);
}
payload.WithArray("AvailabilityZones", std::move(availabilityZonesJsonList));
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,86 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/GetLifecyclePoliciesRequest.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetLifecyclePoliciesRequest::GetLifecyclePoliciesRequest() :
m_policyIdsHasBeenSet(false),
m_state(GettablePolicyStateValues::NOT_SET),
m_stateHasBeenSet(false),
m_resourceTypesHasBeenSet(false),
m_targetTagsHasBeenSet(false),
m_tagsToAddHasBeenSet(false)
{
}
Aws::String GetLifecyclePoliciesRequest::SerializePayload() const
{
return {};
}
void GetLifecyclePoliciesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_policyIdsHasBeenSet)
{
for(const auto& item : m_policyIds)
{
ss << item;
uri.AddQueryStringParameter("policyIds", ss.str());
ss.str("");
}
}
if(m_stateHasBeenSet)
{
ss << GettablePolicyStateValuesMapper::GetNameForGettablePolicyStateValues(m_state);
uri.AddQueryStringParameter("state", ss.str());
ss.str("");
}
if(m_resourceTypesHasBeenSet)
{
for(const auto& item : m_resourceTypes)
{
ss << ResourceTypeValuesMapper::GetNameForResourceTypeValues(item);
uri.AddQueryStringParameter("resourceTypes", ss.str());
ss.str("");
}
}
if(m_targetTagsHasBeenSet)
{
for(const auto& item : m_targetTags)
{
ss << item;
uri.AddQueryStringParameter("targetTags", ss.str());
ss.str("");
}
}
if(m_tagsToAddHasBeenSet)
{
for(const auto& item : m_tagsToAdd)
{
ss << item;
uri.AddQueryStringParameter("tagsToAdd", ss.str());
ss.str("");
}
}
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/GetLifecyclePoliciesResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetLifecyclePoliciesResult::GetLifecyclePoliciesResult()
{
}
GetLifecyclePoliciesResult::GetLifecyclePoliciesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetLifecyclePoliciesResult& GetLifecyclePoliciesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Policies"))
{
Array<JsonView> policiesJsonList = jsonValue.GetArray("Policies");
for(unsigned policiesIndex = 0; policiesIndex < policiesJsonList.GetLength(); ++policiesIndex)
{
m_policies.push_back(policiesJsonList[policiesIndex].AsObject());
}
}
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/dlm/model/GetLifecyclePolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetLifecyclePolicyRequest::GetLifecyclePolicyRequest() :
m_policyIdHasBeenSet(false)
{
}
Aws::String GetLifecyclePolicyRequest::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/dlm/model/GetLifecyclePolicyResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetLifecyclePolicyResult::GetLifecyclePolicyResult()
{
}
GetLifecyclePolicyResult::GetLifecyclePolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetLifecyclePolicyResult& GetLifecyclePolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Policy"))
{
m_policy = jsonValue.GetObject("Policy");
}
return *this;
}

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/GettablePolicyStateValues.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 DLM
{
namespace Model
{
namespace GettablePolicyStateValuesMapper
{
static const int ENABLED_HASH = HashingUtils::HashString("ENABLED");
static const int DISABLED_HASH = HashingUtils::HashString("DISABLED");
static const int ERROR__HASH = HashingUtils::HashString("ERROR");
GettablePolicyStateValues GetGettablePolicyStateValuesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ENABLED_HASH)
{
return GettablePolicyStateValues::ENABLED;
}
else if (hashCode == DISABLED_HASH)
{
return GettablePolicyStateValues::DISABLED;
}
else if (hashCode == ERROR__HASH)
{
return GettablePolicyStateValues::ERROR_;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<GettablePolicyStateValues>(hashCode);
}
return GettablePolicyStateValues::NOT_SET;
}
Aws::String GetNameForGettablePolicyStateValues(GettablePolicyStateValues enumValue)
{
switch(enumValue)
{
case GettablePolicyStateValues::ENABLED:
return "ENABLED";
case GettablePolicyStateValues::DISABLED:
return "DISABLED";
case GettablePolicyStateValues::ERROR_:
return "ERROR";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace GettablePolicyStateValuesMapper
} // namespace Model
} // namespace DLM
} // 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/dlm/model/InternalServerException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
InternalServerException::InternalServerException() :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false)
{
}
InternalServerException::InternalServerException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false)
{
*this = jsonValue;
}
InternalServerException& InternalServerException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
return *this;
}
JsonValue InternalServerException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
return payload;
}
} // namespace Model
} // namespace DLM
} // 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/dlm/model/IntervalUnitValues.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 DLM
{
namespace Model
{
namespace IntervalUnitValuesMapper
{
static const int HOURS_HASH = HashingUtils::HashString("HOURS");
IntervalUnitValues GetIntervalUnitValuesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == HOURS_HASH)
{
return IntervalUnitValues::HOURS;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<IntervalUnitValues>(hashCode);
}
return IntervalUnitValues::NOT_SET;
}
Aws::String GetNameForIntervalUnitValues(IntervalUnitValues enumValue)
{
switch(enumValue)
{
case IntervalUnitValues::HOURS:
return "HOURS";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace IntervalUnitValuesMapper
} // namespace Model
} // namespace DLM
} // 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/dlm/model/InvalidRequestException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
InvalidRequestException::InvalidRequestException() :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false),
m_requiredParametersHasBeenSet(false),
m_mutuallyExclusiveParametersHasBeenSet(false)
{
}
InvalidRequestException::InvalidRequestException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false),
m_requiredParametersHasBeenSet(false),
m_mutuallyExclusiveParametersHasBeenSet(false)
{
*this = jsonValue;
}
InvalidRequestException& InvalidRequestException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("RequiredParameters"))
{
Array<JsonView> requiredParametersJsonList = jsonValue.GetArray("RequiredParameters");
for(unsigned requiredParametersIndex = 0; requiredParametersIndex < requiredParametersJsonList.GetLength(); ++requiredParametersIndex)
{
m_requiredParameters.push_back(requiredParametersJsonList[requiredParametersIndex].AsString());
}
m_requiredParametersHasBeenSet = true;
}
if(jsonValue.ValueExists("MutuallyExclusiveParameters"))
{
Array<JsonView> mutuallyExclusiveParametersJsonList = jsonValue.GetArray("MutuallyExclusiveParameters");
for(unsigned mutuallyExclusiveParametersIndex = 0; mutuallyExclusiveParametersIndex < mutuallyExclusiveParametersJsonList.GetLength(); ++mutuallyExclusiveParametersIndex)
{
m_mutuallyExclusiveParameters.push_back(mutuallyExclusiveParametersJsonList[mutuallyExclusiveParametersIndex].AsString());
}
m_mutuallyExclusiveParametersHasBeenSet = true;
}
return *this;
}
JsonValue InvalidRequestException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_requiredParametersHasBeenSet)
{
Array<JsonValue> requiredParametersJsonList(m_requiredParameters.size());
for(unsigned requiredParametersIndex = 0; requiredParametersIndex < requiredParametersJsonList.GetLength(); ++requiredParametersIndex)
{
requiredParametersJsonList[requiredParametersIndex].AsString(m_requiredParameters[requiredParametersIndex]);
}
payload.WithArray("RequiredParameters", std::move(requiredParametersJsonList));
}
if(m_mutuallyExclusiveParametersHasBeenSet)
{
Array<JsonValue> mutuallyExclusiveParametersJsonList(m_mutuallyExclusiveParameters.size());
for(unsigned mutuallyExclusiveParametersIndex = 0; mutuallyExclusiveParametersIndex < mutuallyExclusiveParametersJsonList.GetLength(); ++mutuallyExclusiveParametersIndex)
{
mutuallyExclusiveParametersJsonList[mutuallyExclusiveParametersIndex].AsString(m_mutuallyExclusiveParameters[mutuallyExclusiveParametersIndex]);
}
payload.WithArray("MutuallyExclusiveParameters", std::move(mutuallyExclusiveParametersJsonList));
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,201 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/LifecyclePolicy.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
LifecyclePolicy::LifecyclePolicy() :
m_policyIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_state(GettablePolicyStateValues::NOT_SET),
m_stateHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_executionRoleArnHasBeenSet(false),
m_dateCreatedHasBeenSet(false),
m_dateModifiedHasBeenSet(false),
m_policyDetailsHasBeenSet(false),
m_tagsHasBeenSet(false),
m_policyArnHasBeenSet(false)
{
}
LifecyclePolicy::LifecyclePolicy(JsonView jsonValue) :
m_policyIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_state(GettablePolicyStateValues::NOT_SET),
m_stateHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_executionRoleArnHasBeenSet(false),
m_dateCreatedHasBeenSet(false),
m_dateModifiedHasBeenSet(false),
m_policyDetailsHasBeenSet(false),
m_tagsHasBeenSet(false),
m_policyArnHasBeenSet(false)
{
*this = jsonValue;
}
LifecyclePolicy& LifecyclePolicy::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PolicyId"))
{
m_policyId = jsonValue.GetString("PolicyId");
m_policyIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = GettablePolicyStateValuesMapper::GetGettablePolicyStateValuesForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusMessage"))
{
m_statusMessage = jsonValue.GetString("StatusMessage");
m_statusMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionRoleArn"))
{
m_executionRoleArn = jsonValue.GetString("ExecutionRoleArn");
m_executionRoleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("DateCreated"))
{
m_dateCreated = jsonValue.GetString("DateCreated");
m_dateCreatedHasBeenSet = true;
}
if(jsonValue.ValueExists("DateModified"))
{
m_dateModified = jsonValue.GetString("DateModified");
m_dateModifiedHasBeenSet = true;
}
if(jsonValue.ValueExists("PolicyDetails"))
{
m_policyDetails = jsonValue.GetObject("PolicyDetails");
m_policyDetailsHasBeenSet = true;
}
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();
}
m_tagsHasBeenSet = true;
}
if(jsonValue.ValueExists("PolicyArn"))
{
m_policyArn = jsonValue.GetString("PolicyArn");
m_policyArnHasBeenSet = true;
}
return *this;
}
JsonValue LifecyclePolicy::Jsonize() const
{
JsonValue payload;
if(m_policyIdHasBeenSet)
{
payload.WithString("PolicyId", m_policyId);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_stateHasBeenSet)
{
payload.WithString("State", GettablePolicyStateValuesMapper::GetNameForGettablePolicyStateValues(m_state));
}
if(m_statusMessageHasBeenSet)
{
payload.WithString("StatusMessage", m_statusMessage);
}
if(m_executionRoleArnHasBeenSet)
{
payload.WithString("ExecutionRoleArn", m_executionRoleArn);
}
if(m_dateCreatedHasBeenSet)
{
payload.WithString("DateCreated", m_dateCreated.ToGmtString(DateFormat::ISO_8601));
}
if(m_dateModifiedHasBeenSet)
{
payload.WithString("DateModified", m_dateModified.ToGmtString(DateFormat::ISO_8601));
}
if(m_policyDetailsHasBeenSet)
{
payload.WithObject("PolicyDetails", m_policyDetails.Jsonize());
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("Tags", std::move(tagsJsonMap));
}
if(m_policyArnHasBeenSet)
{
payload.WithString("PolicyArn", m_policyArn);
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,113 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/LifecyclePolicySummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
LifecyclePolicySummary::LifecyclePolicySummary() :
m_policyIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_state(GettablePolicyStateValues::NOT_SET),
m_stateHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
LifecyclePolicySummary::LifecyclePolicySummary(JsonView jsonValue) :
m_policyIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_state(GettablePolicyStateValues::NOT_SET),
m_stateHasBeenSet(false),
m_tagsHasBeenSet(false)
{
*this = jsonValue;
}
LifecyclePolicySummary& LifecyclePolicySummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PolicyId"))
{
m_policyId = jsonValue.GetString("PolicyId");
m_policyIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = GettablePolicyStateValuesMapper::GetGettablePolicyStateValuesForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
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();
}
m_tagsHasBeenSet = true;
}
return *this;
}
JsonValue LifecyclePolicySummary::Jsonize() const
{
JsonValue payload;
if(m_policyIdHasBeenSet)
{
payload.WithString("PolicyId", m_policyId);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_stateHasBeenSet)
{
payload.WithString("State", GettablePolicyStateValuesMapper::GetNameForGettablePolicyStateValues(m_state));
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("Tags", std::move(tagsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/LimitExceededException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
LimitExceededException::LimitExceededException() :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false),
m_resourceTypeHasBeenSet(false)
{
}
LimitExceededException::LimitExceededException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
LimitExceededException& LimitExceededException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue LimitExceededException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
return payload;
}
} // namespace Model
} // namespace DLM
} // 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/dlm/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListTagsForResourceRequest::ListTagsForResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String ListTagsForResourceRequest::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/dlm/model/ListTagsForResourceResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListTagsForResourceResult::ListTagsForResourceResult()
{
}
ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
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,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/Parameters.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
Parameters::Parameters() :
m_excludeBootVolume(false),
m_excludeBootVolumeHasBeenSet(false)
{
}
Parameters::Parameters(JsonView jsonValue) :
m_excludeBootVolume(false),
m_excludeBootVolumeHasBeenSet(false)
{
*this = jsonValue;
}
Parameters& Parameters::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ExcludeBootVolume"))
{
m_excludeBootVolume = jsonValue.GetBool("ExcludeBootVolume");
m_excludeBootVolumeHasBeenSet = true;
}
return *this;
}
JsonValue Parameters::Jsonize() const
{
JsonValue payload;
if(m_excludeBootVolumeHasBeenSet)
{
payload.WithBool("ExcludeBootVolume", m_excludeBootVolume);
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,144 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/PolicyDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
PolicyDetails::PolicyDetails() :
m_policyType(PolicyTypeValues::NOT_SET),
m_policyTypeHasBeenSet(false),
m_resourceTypesHasBeenSet(false),
m_targetTagsHasBeenSet(false),
m_schedulesHasBeenSet(false),
m_parametersHasBeenSet(false)
{
}
PolicyDetails::PolicyDetails(JsonView jsonValue) :
m_policyType(PolicyTypeValues::NOT_SET),
m_policyTypeHasBeenSet(false),
m_resourceTypesHasBeenSet(false),
m_targetTagsHasBeenSet(false),
m_schedulesHasBeenSet(false),
m_parametersHasBeenSet(false)
{
*this = jsonValue;
}
PolicyDetails& PolicyDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PolicyType"))
{
m_policyType = PolicyTypeValuesMapper::GetPolicyTypeValuesForName(jsonValue.GetString("PolicyType"));
m_policyTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceTypes"))
{
Array<JsonView> resourceTypesJsonList = jsonValue.GetArray("ResourceTypes");
for(unsigned resourceTypesIndex = 0; resourceTypesIndex < resourceTypesJsonList.GetLength(); ++resourceTypesIndex)
{
m_resourceTypes.push_back(ResourceTypeValuesMapper::GetResourceTypeValuesForName(resourceTypesJsonList[resourceTypesIndex].AsString()));
}
m_resourceTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetTags"))
{
Array<JsonView> targetTagsJsonList = jsonValue.GetArray("TargetTags");
for(unsigned targetTagsIndex = 0; targetTagsIndex < targetTagsJsonList.GetLength(); ++targetTagsIndex)
{
m_targetTags.push_back(targetTagsJsonList[targetTagsIndex].AsObject());
}
m_targetTagsHasBeenSet = true;
}
if(jsonValue.ValueExists("Schedules"))
{
Array<JsonView> schedulesJsonList = jsonValue.GetArray("Schedules");
for(unsigned schedulesIndex = 0; schedulesIndex < schedulesJsonList.GetLength(); ++schedulesIndex)
{
m_schedules.push_back(schedulesJsonList[schedulesIndex].AsObject());
}
m_schedulesHasBeenSet = true;
}
if(jsonValue.ValueExists("Parameters"))
{
m_parameters = jsonValue.GetObject("Parameters");
m_parametersHasBeenSet = true;
}
return *this;
}
JsonValue PolicyDetails::Jsonize() const
{
JsonValue payload;
if(m_policyTypeHasBeenSet)
{
payload.WithString("PolicyType", PolicyTypeValuesMapper::GetNameForPolicyTypeValues(m_policyType));
}
if(m_resourceTypesHasBeenSet)
{
Array<JsonValue> resourceTypesJsonList(m_resourceTypes.size());
for(unsigned resourceTypesIndex = 0; resourceTypesIndex < resourceTypesJsonList.GetLength(); ++resourceTypesIndex)
{
resourceTypesJsonList[resourceTypesIndex].AsString(ResourceTypeValuesMapper::GetNameForResourceTypeValues(m_resourceTypes[resourceTypesIndex]));
}
payload.WithArray("ResourceTypes", std::move(resourceTypesJsonList));
}
if(m_targetTagsHasBeenSet)
{
Array<JsonValue> targetTagsJsonList(m_targetTags.size());
for(unsigned targetTagsIndex = 0; targetTagsIndex < targetTagsJsonList.GetLength(); ++targetTagsIndex)
{
targetTagsJsonList[targetTagsIndex].AsObject(m_targetTags[targetTagsIndex].Jsonize());
}
payload.WithArray("TargetTags", std::move(targetTagsJsonList));
}
if(m_schedulesHasBeenSet)
{
Array<JsonValue> schedulesJsonList(m_schedules.size());
for(unsigned schedulesIndex = 0; schedulesIndex < schedulesJsonList.GetLength(); ++schedulesIndex)
{
schedulesJsonList[schedulesIndex].AsObject(m_schedules[schedulesIndex].Jsonize());
}
payload.WithArray("Schedules", std::move(schedulesJsonList));
}
if(m_parametersHasBeenSet)
{
payload.WithObject("Parameters", m_parameters.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace DLM
} // 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/dlm/model/PolicyTypeValues.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 DLM
{
namespace Model
{
namespace PolicyTypeValuesMapper
{
static const int EBS_SNAPSHOT_MANAGEMENT_HASH = HashingUtils::HashString("EBS_SNAPSHOT_MANAGEMENT");
PolicyTypeValues GetPolicyTypeValuesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EBS_SNAPSHOT_MANAGEMENT_HASH)
{
return PolicyTypeValues::EBS_SNAPSHOT_MANAGEMENT;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PolicyTypeValues>(hashCode);
}
return PolicyTypeValues::NOT_SET;
}
Aws::String GetNameForPolicyTypeValues(PolicyTypeValues enumValue)
{
switch(enumValue)
{
case PolicyTypeValues::EBS_SNAPSHOT_MANAGEMENT:
return "EBS_SNAPSHOT_MANAGEMENT";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PolicyTypeValuesMapper
} // namespace Model
} // namespace DLM
} // 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/dlm/model/ResourceNotFoundException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
ResourceNotFoundException::ResourceNotFoundException() :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_resourceIdsHasBeenSet(false)
{
}
ResourceNotFoundException::ResourceNotFoundException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_codeHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_resourceIdsHasBeenSet(false)
{
*this = jsonValue;
}
ResourceNotFoundException& ResourceNotFoundException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("Code"))
{
m_code = jsonValue.GetString("Code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceIds"))
{
Array<JsonView> resourceIdsJsonList = jsonValue.GetArray("ResourceIds");
for(unsigned resourceIdsIndex = 0; resourceIdsIndex < resourceIdsJsonList.GetLength(); ++resourceIdsIndex)
{
m_resourceIds.push_back(resourceIdsJsonList[resourceIdsIndex].AsString());
}
m_resourceIdsHasBeenSet = true;
}
return *this;
}
JsonValue ResourceNotFoundException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_codeHasBeenSet)
{
payload.WithString("Code", m_code);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
if(m_resourceIdsHasBeenSet)
{
Array<JsonValue> resourceIdsJsonList(m_resourceIds.size());
for(unsigned resourceIdsIndex = 0; resourceIdsIndex < resourceIdsJsonList.GetLength(); ++resourceIdsIndex)
{
resourceIdsJsonList[resourceIdsIndex].AsString(m_resourceIds[resourceIdsIndex]);
}
payload.WithArray("ResourceIds", std::move(resourceIdsJsonList));
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/ResourceTypeValues.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 DLM
{
namespace Model
{
namespace ResourceTypeValuesMapper
{
static const int VOLUME_HASH = HashingUtils::HashString("VOLUME");
static const int INSTANCE_HASH = HashingUtils::HashString("INSTANCE");
ResourceTypeValues GetResourceTypeValuesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == VOLUME_HASH)
{
return ResourceTypeValues::VOLUME;
}
else if (hashCode == INSTANCE_HASH)
{
return ResourceTypeValues::INSTANCE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ResourceTypeValues>(hashCode);
}
return ResourceTypeValues::NOT_SET;
}
Aws::String GetNameForResourceTypeValues(ResourceTypeValues enumValue)
{
switch(enumValue)
{
case ResourceTypeValues::VOLUME:
return "VOLUME";
case ResourceTypeValues::INSTANCE:
return "INSTANCE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ResourceTypeValuesMapper
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,94 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/RetainRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
RetainRule::RetainRule() :
m_count(0),
m_countHasBeenSet(false),
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(RetentionIntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false)
{
}
RetainRule::RetainRule(JsonView jsonValue) :
m_count(0),
m_countHasBeenSet(false),
m_interval(0),
m_intervalHasBeenSet(false),
m_intervalUnit(RetentionIntervalUnitValues::NOT_SET),
m_intervalUnitHasBeenSet(false)
{
*this = jsonValue;
}
RetainRule& RetainRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Count"))
{
m_count = jsonValue.GetInteger("Count");
m_countHasBeenSet = true;
}
if(jsonValue.ValueExists("Interval"))
{
m_interval = jsonValue.GetInteger("Interval");
m_intervalHasBeenSet = true;
}
if(jsonValue.ValueExists("IntervalUnit"))
{
m_intervalUnit = RetentionIntervalUnitValuesMapper::GetRetentionIntervalUnitValuesForName(jsonValue.GetString("IntervalUnit"));
m_intervalUnitHasBeenSet = true;
}
return *this;
}
JsonValue RetainRule::Jsonize() const
{
JsonValue payload;
if(m_countHasBeenSet)
{
payload.WithInteger("Count", m_count);
}
if(m_intervalHasBeenSet)
{
payload.WithInteger("Interval", m_interval);
}
if(m_intervalUnitHasBeenSet)
{
payload.WithString("IntervalUnit", RetentionIntervalUnitValuesMapper::GetNameForRetentionIntervalUnitValues(m_intervalUnit));
}
return payload;
}
} // namespace Model
} // namespace DLM
} // 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/dlm/model/RetentionIntervalUnitValues.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 DLM
{
namespace Model
{
namespace RetentionIntervalUnitValuesMapper
{
static const int DAYS_HASH = HashingUtils::HashString("DAYS");
static const int WEEKS_HASH = HashingUtils::HashString("WEEKS");
static const int MONTHS_HASH = HashingUtils::HashString("MONTHS");
static const int YEARS_HASH = HashingUtils::HashString("YEARS");
RetentionIntervalUnitValues GetRetentionIntervalUnitValuesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == DAYS_HASH)
{
return RetentionIntervalUnitValues::DAYS;
}
else if (hashCode == WEEKS_HASH)
{
return RetentionIntervalUnitValues::WEEKS;
}
else if (hashCode == MONTHS_HASH)
{
return RetentionIntervalUnitValues::MONTHS;
}
else if (hashCode == YEARS_HASH)
{
return RetentionIntervalUnitValues::YEARS;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<RetentionIntervalUnitValues>(hashCode);
}
return RetentionIntervalUnitValues::NOT_SET;
}
Aws::String GetNameForRetentionIntervalUnitValues(RetentionIntervalUnitValues enumValue)
{
switch(enumValue)
{
case RetentionIntervalUnitValues::DAYS:
return "DAYS";
case RetentionIntervalUnitValues::WEEKS:
return "WEEKS";
case RetentionIntervalUnitValues::MONTHS:
return "MONTHS";
case RetentionIntervalUnitValues::YEARS:
return "YEARS";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace RetentionIntervalUnitValuesMapper
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,190 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/Schedule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
Schedule::Schedule() :
m_nameHasBeenSet(false),
m_copyTags(false),
m_copyTagsHasBeenSet(false),
m_tagsToAddHasBeenSet(false),
m_variableTagsHasBeenSet(false),
m_createRuleHasBeenSet(false),
m_retainRuleHasBeenSet(false),
m_fastRestoreRuleHasBeenSet(false),
m_crossRegionCopyRulesHasBeenSet(false)
{
}
Schedule::Schedule(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_copyTags(false),
m_copyTagsHasBeenSet(false),
m_tagsToAddHasBeenSet(false),
m_variableTagsHasBeenSet(false),
m_createRuleHasBeenSet(false),
m_retainRuleHasBeenSet(false),
m_fastRestoreRuleHasBeenSet(false),
m_crossRegionCopyRulesHasBeenSet(false)
{
*this = jsonValue;
}
Schedule& Schedule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("CopyTags"))
{
m_copyTags = jsonValue.GetBool("CopyTags");
m_copyTagsHasBeenSet = true;
}
if(jsonValue.ValueExists("TagsToAdd"))
{
Array<JsonView> tagsToAddJsonList = jsonValue.GetArray("TagsToAdd");
for(unsigned tagsToAddIndex = 0; tagsToAddIndex < tagsToAddJsonList.GetLength(); ++tagsToAddIndex)
{
m_tagsToAdd.push_back(tagsToAddJsonList[tagsToAddIndex].AsObject());
}
m_tagsToAddHasBeenSet = true;
}
if(jsonValue.ValueExists("VariableTags"))
{
Array<JsonView> variableTagsJsonList = jsonValue.GetArray("VariableTags");
for(unsigned variableTagsIndex = 0; variableTagsIndex < variableTagsJsonList.GetLength(); ++variableTagsIndex)
{
m_variableTags.push_back(variableTagsJsonList[variableTagsIndex].AsObject());
}
m_variableTagsHasBeenSet = true;
}
if(jsonValue.ValueExists("CreateRule"))
{
m_createRule = jsonValue.GetObject("CreateRule");
m_createRuleHasBeenSet = true;
}
if(jsonValue.ValueExists("RetainRule"))
{
m_retainRule = jsonValue.GetObject("RetainRule");
m_retainRuleHasBeenSet = true;
}
if(jsonValue.ValueExists("FastRestoreRule"))
{
m_fastRestoreRule = jsonValue.GetObject("FastRestoreRule");
m_fastRestoreRuleHasBeenSet = true;
}
if(jsonValue.ValueExists("CrossRegionCopyRules"))
{
Array<JsonView> crossRegionCopyRulesJsonList = jsonValue.GetArray("CrossRegionCopyRules");
for(unsigned crossRegionCopyRulesIndex = 0; crossRegionCopyRulesIndex < crossRegionCopyRulesJsonList.GetLength(); ++crossRegionCopyRulesIndex)
{
m_crossRegionCopyRules.push_back(crossRegionCopyRulesJsonList[crossRegionCopyRulesIndex].AsObject());
}
m_crossRegionCopyRulesHasBeenSet = true;
}
return *this;
}
JsonValue Schedule::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_copyTagsHasBeenSet)
{
payload.WithBool("CopyTags", m_copyTags);
}
if(m_tagsToAddHasBeenSet)
{
Array<JsonValue> tagsToAddJsonList(m_tagsToAdd.size());
for(unsigned tagsToAddIndex = 0; tagsToAddIndex < tagsToAddJsonList.GetLength(); ++tagsToAddIndex)
{
tagsToAddJsonList[tagsToAddIndex].AsObject(m_tagsToAdd[tagsToAddIndex].Jsonize());
}
payload.WithArray("TagsToAdd", std::move(tagsToAddJsonList));
}
if(m_variableTagsHasBeenSet)
{
Array<JsonValue> variableTagsJsonList(m_variableTags.size());
for(unsigned variableTagsIndex = 0; variableTagsIndex < variableTagsJsonList.GetLength(); ++variableTagsIndex)
{
variableTagsJsonList[variableTagsIndex].AsObject(m_variableTags[variableTagsIndex].Jsonize());
}
payload.WithArray("VariableTags", std::move(variableTagsJsonList));
}
if(m_createRuleHasBeenSet)
{
payload.WithObject("CreateRule", m_createRule.Jsonize());
}
if(m_retainRuleHasBeenSet)
{
payload.WithObject("RetainRule", m_retainRule.Jsonize());
}
if(m_fastRestoreRuleHasBeenSet)
{
payload.WithObject("FastRestoreRule", m_fastRestoreRule.Jsonize());
}
if(m_crossRegionCopyRulesHasBeenSet)
{
Array<JsonValue> crossRegionCopyRulesJsonList(m_crossRegionCopyRules.size());
for(unsigned crossRegionCopyRulesIndex = 0; crossRegionCopyRulesIndex < crossRegionCopyRulesJsonList.GetLength(); ++crossRegionCopyRulesIndex)
{
crossRegionCopyRulesJsonList[crossRegionCopyRulesIndex].AsObject(m_crossRegionCopyRules[crossRegionCopyRulesIndex].Jsonize());
}
payload.WithArray("CrossRegionCopyRules", std::move(crossRegionCopyRulesJsonList));
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/SettablePolicyStateValues.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 DLM
{
namespace Model
{
namespace SettablePolicyStateValuesMapper
{
static const int ENABLED_HASH = HashingUtils::HashString("ENABLED");
static const int DISABLED_HASH = HashingUtils::HashString("DISABLED");
SettablePolicyStateValues GetSettablePolicyStateValuesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ENABLED_HASH)
{
return SettablePolicyStateValues::ENABLED;
}
else if (hashCode == DISABLED_HASH)
{
return SettablePolicyStateValues::DISABLED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SettablePolicyStateValues>(hashCode);
}
return SettablePolicyStateValues::NOT_SET;
}
Aws::String GetNameForSettablePolicyStateValues(SettablePolicyStateValues enumValue)
{
switch(enumValue)
{
case SettablePolicyStateValues::ENABLED:
return "ENABLED";
case SettablePolicyStateValues::DISABLED:
return "DISABLED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SettablePolicyStateValuesMapper
} // namespace Model
} // namespace DLM
} // 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/dlm/model/Tag.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DLM
{
namespace Model
{
Tag::Tag() :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
Tag::Tag(JsonView jsonValue) :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
Tag& Tag::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = jsonValue.GetString("Key");
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue Tag::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", m_key);
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace DLM
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/TagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
TagResourceRequest::TagResourceRequest() :
m_resourceArnHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String TagResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("Tags", std::move(tagsJsonMap));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/TagResourceResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
TagResourceResult::TagResourceResult()
{
}
TagResourceResult::TagResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
TagResourceResult& TagResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,45 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/UntagResourceRequest.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
UntagResourceRequest::UntagResourceRequest() :
m_resourceArnHasBeenSet(false),
m_tagKeysHasBeenSet(false)
{
}
Aws::String UntagResourceRequest::SerializePayload() const
{
return {};
}
void UntagResourceRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_tagKeysHasBeenSet)
{
for(const auto& item : m_tagKeys)
{
ss << item;
uri.AddQueryStringParameter("tagKeys", ss.str());
ss.str("");
}
}
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/UntagResourceResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UntagResourceResult::UntagResourceResult()
{
}
UntagResourceResult::UntagResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UntagResourceResult& UntagResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/UpdateLifecyclePolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateLifecyclePolicyRequest::UpdateLifecyclePolicyRequest() :
m_policyIdHasBeenSet(false),
m_executionRoleArnHasBeenSet(false),
m_state(SettablePolicyStateValues::NOT_SET),
m_stateHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_policyDetailsHasBeenSet(false)
{
}
Aws::String UpdateLifecyclePolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_executionRoleArnHasBeenSet)
{
payload.WithString("ExecutionRoleArn", m_executionRoleArn);
}
if(m_stateHasBeenSet)
{
payload.WithString("State", SettablePolicyStateValuesMapper::GetNameForSettablePolicyStateValues(m_state));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_policyDetailsHasBeenSet)
{
payload.WithObject("PolicyDetails", m_policyDetails.Jsonize());
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dlm/model/UpdateLifecyclePolicyResult.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::DLM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateLifecyclePolicyResult::UpdateLifecyclePolicyResult()
{
}
UpdateLifecyclePolicyResult::UpdateLifecyclePolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateLifecyclePolicyResult& UpdateLifecyclePolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}