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,898 @@
/**
* 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/dataexchange/DataExchangeClient.h>
#include <aws/dataexchange/DataExchangeEndpoint.h>
#include <aws/dataexchange/DataExchangeErrorMarshaller.h>
#include <aws/dataexchange/model/CancelJobRequest.h>
#include <aws/dataexchange/model/CreateDataSetRequest.h>
#include <aws/dataexchange/model/CreateJobRequest.h>
#include <aws/dataexchange/model/CreateRevisionRequest.h>
#include <aws/dataexchange/model/DeleteAssetRequest.h>
#include <aws/dataexchange/model/DeleteDataSetRequest.h>
#include <aws/dataexchange/model/DeleteRevisionRequest.h>
#include <aws/dataexchange/model/GetAssetRequest.h>
#include <aws/dataexchange/model/GetDataSetRequest.h>
#include <aws/dataexchange/model/GetJobRequest.h>
#include <aws/dataexchange/model/GetRevisionRequest.h>
#include <aws/dataexchange/model/ListDataSetRevisionsRequest.h>
#include <aws/dataexchange/model/ListDataSetsRequest.h>
#include <aws/dataexchange/model/ListJobsRequest.h>
#include <aws/dataexchange/model/ListRevisionAssetsRequest.h>
#include <aws/dataexchange/model/ListTagsForResourceRequest.h>
#include <aws/dataexchange/model/StartJobRequest.h>
#include <aws/dataexchange/model/TagResourceRequest.h>
#include <aws/dataexchange/model/UntagResourceRequest.h>
#include <aws/dataexchange/model/UpdateAssetRequest.h>
#include <aws/dataexchange/model/UpdateDataSetRequest.h>
#include <aws/dataexchange/model/UpdateRevisionRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::DataExchange;
using namespace Aws::DataExchange::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "dataexchange";
static const char* ALLOCATION_TAG = "DataExchangeClient";
DataExchangeClient::DataExchangeClient(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<DataExchangeErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
DataExchangeClient::DataExchangeClient(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<DataExchangeErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
DataExchangeClient::DataExchangeClient(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<DataExchangeErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
DataExchangeClient::~DataExchangeClient()
{
}
void DataExchangeClient::init(const ClientConfiguration& config)
{
SetServiceClientName("DataExchange");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + DataExchangeEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void DataExchangeClient::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;
}
}
CancelJobOutcome DataExchangeClient::CancelJob(const CancelJobRequest& request) const
{
if (!request.JobIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("CancelJob", "Required field: JobId, is not set");
return CancelJobOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/jobs/";
ss << request.GetJobId();
uri.SetPath(uri.GetPath() + ss.str());
return CancelJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
CancelJobOutcomeCallable DataExchangeClient::CancelJobCallable(const CancelJobRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CancelJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CancelJob(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::CancelJobAsync(const CancelJobRequest& request, const CancelJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CancelJobAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::CancelJobAsyncHelper(const CancelJobRequest& request, const CancelJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CancelJob(request), context);
}
CreateDataSetOutcome DataExchangeClient::CreateDataSet(const CreateDataSetRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets";
uri.SetPath(uri.GetPath() + ss.str());
return CreateDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateDataSetOutcomeCallable DataExchangeClient::CreateDataSetCallable(const CreateDataSetRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateDataSet(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::CreateDataSetAsync(const CreateDataSetRequest& request, const CreateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateDataSetAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::CreateDataSetAsyncHelper(const CreateDataSetRequest& request, const CreateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateDataSet(request), context);
}
CreateJobOutcome DataExchangeClient::CreateJob(const CreateJobRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/jobs";
uri.SetPath(uri.GetPath() + ss.str());
return CreateJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateJobOutcomeCallable DataExchangeClient::CreateJobCallable(const CreateJobRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateJob(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::CreateJobAsync(const CreateJobRequest& request, const CreateJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateJobAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::CreateJobAsyncHelper(const CreateJobRequest& request, const CreateJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateJob(request), context);
}
CreateRevisionOutcome DataExchangeClient::CreateRevision(const CreateRevisionRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("CreateRevision", "Required field: DataSetId, is not set");
return CreateRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions";
uri.SetPath(uri.GetPath() + ss.str());
return CreateRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateRevisionOutcomeCallable DataExchangeClient::CreateRevisionCallable(const CreateRevisionRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateRevision(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::CreateRevisionAsync(const CreateRevisionRequest& request, const CreateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateRevisionAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::CreateRevisionAsyncHelper(const CreateRevisionRequest& request, const CreateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateRevision(request), context);
}
DeleteAssetOutcome DataExchangeClient::DeleteAsset(const DeleteAssetRequest& request) const
{
if (!request.AssetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteAsset", "Required field: AssetId, is not set");
return DeleteAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AssetId]", false));
}
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteAsset", "Required field: DataSetId, is not set");
return DeleteAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
if (!request.RevisionIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteAsset", "Required field: RevisionId, is not set");
return DeleteAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions/";
ss << request.GetRevisionId();
ss << "/assets/";
ss << request.GetAssetId();
uri.SetPath(uri.GetPath() + ss.str());
return DeleteAssetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
DeleteAssetOutcomeCallable DataExchangeClient::DeleteAssetCallable(const DeleteAssetRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteAssetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteAsset(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::DeleteAssetAsync(const DeleteAssetRequest& request, const DeleteAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteAssetAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::DeleteAssetAsyncHelper(const DeleteAssetRequest& request, const DeleteAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteAsset(request), context);
}
DeleteDataSetOutcome DataExchangeClient::DeleteDataSet(const DeleteDataSetRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteDataSet", "Required field: DataSetId, is not set");
return DeleteDataSetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
uri.SetPath(uri.GetPath() + ss.str());
return DeleteDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
DeleteDataSetOutcomeCallable DataExchangeClient::DeleteDataSetCallable(const DeleteDataSetRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteDataSet(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::DeleteDataSetAsync(const DeleteDataSetRequest& request, const DeleteDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteDataSetAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::DeleteDataSetAsyncHelper(const DeleteDataSetRequest& request, const DeleteDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteDataSet(request), context);
}
DeleteRevisionOutcome DataExchangeClient::DeleteRevision(const DeleteRevisionRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteRevision", "Required field: DataSetId, is not set");
return DeleteRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
if (!request.RevisionIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteRevision", "Required field: RevisionId, is not set");
return DeleteRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions/";
ss << request.GetRevisionId();
uri.SetPath(uri.GetPath() + ss.str());
return DeleteRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
DeleteRevisionOutcomeCallable DataExchangeClient::DeleteRevisionCallable(const DeleteRevisionRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteRevision(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::DeleteRevisionAsync(const DeleteRevisionRequest& request, const DeleteRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteRevisionAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::DeleteRevisionAsyncHelper(const DeleteRevisionRequest& request, const DeleteRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteRevision(request), context);
}
GetAssetOutcome DataExchangeClient::GetAsset(const GetAssetRequest& request) const
{
if (!request.AssetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetAsset", "Required field: AssetId, is not set");
return GetAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AssetId]", false));
}
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetAsset", "Required field: DataSetId, is not set");
return GetAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
if (!request.RevisionIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetAsset", "Required field: RevisionId, is not set");
return GetAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions/";
ss << request.GetRevisionId();
ss << "/assets/";
ss << request.GetAssetId();
uri.SetPath(uri.GetPath() + ss.str());
return GetAssetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetAssetOutcomeCallable DataExchangeClient::GetAssetCallable(const GetAssetRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetAssetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetAsset(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::GetAssetAsync(const GetAssetRequest& request, const GetAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetAssetAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::GetAssetAsyncHelper(const GetAssetRequest& request, const GetAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetAsset(request), context);
}
GetDataSetOutcome DataExchangeClient::GetDataSet(const GetDataSetRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetDataSet", "Required field: DataSetId, is not set");
return GetDataSetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
uri.SetPath(uri.GetPath() + ss.str());
return GetDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetDataSetOutcomeCallable DataExchangeClient::GetDataSetCallable(const GetDataSetRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetDataSet(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::GetDataSetAsync(const GetDataSetRequest& request, const GetDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetDataSetAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::GetDataSetAsyncHelper(const GetDataSetRequest& request, const GetDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetDataSet(request), context);
}
GetJobOutcome DataExchangeClient::GetJob(const GetJobRequest& request) const
{
if (!request.JobIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetJob", "Required field: JobId, is not set");
return GetJobOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/jobs/";
ss << request.GetJobId();
uri.SetPath(uri.GetPath() + ss.str());
return GetJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetJobOutcomeCallable DataExchangeClient::GetJobCallable(const GetJobRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetJob(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::GetJobAsync(const GetJobRequest& request, const GetJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetJobAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::GetJobAsyncHelper(const GetJobRequest& request, const GetJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetJob(request), context);
}
GetRevisionOutcome DataExchangeClient::GetRevision(const GetRevisionRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetRevision", "Required field: DataSetId, is not set");
return GetRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
if (!request.RevisionIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetRevision", "Required field: RevisionId, is not set");
return GetRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions/";
ss << request.GetRevisionId();
uri.SetPath(uri.GetPath() + ss.str());
return GetRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetRevisionOutcomeCallable DataExchangeClient::GetRevisionCallable(const GetRevisionRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetRevision(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::GetRevisionAsync(const GetRevisionRequest& request, const GetRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetRevisionAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::GetRevisionAsyncHelper(const GetRevisionRequest& request, const GetRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetRevision(request), context);
}
ListDataSetRevisionsOutcome DataExchangeClient::ListDataSetRevisions(const ListDataSetRevisionsRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("ListDataSetRevisions", "Required field: DataSetId, is not set");
return ListDataSetRevisionsOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions";
uri.SetPath(uri.GetPath() + ss.str());
return ListDataSetRevisionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListDataSetRevisionsOutcomeCallable DataExchangeClient::ListDataSetRevisionsCallable(const ListDataSetRevisionsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListDataSetRevisionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListDataSetRevisions(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::ListDataSetRevisionsAsync(const ListDataSetRevisionsRequest& request, const ListDataSetRevisionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListDataSetRevisionsAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::ListDataSetRevisionsAsyncHelper(const ListDataSetRevisionsRequest& request, const ListDataSetRevisionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListDataSetRevisions(request), context);
}
ListDataSetsOutcome DataExchangeClient::ListDataSets(const ListDataSetsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets";
uri.SetPath(uri.GetPath() + ss.str());
return ListDataSetsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListDataSetsOutcomeCallable DataExchangeClient::ListDataSetsCallable(const ListDataSetsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListDataSetsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListDataSets(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::ListDataSetsAsync(const ListDataSetsRequest& request, const ListDataSetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListDataSetsAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::ListDataSetsAsyncHelper(const ListDataSetsRequest& request, const ListDataSetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListDataSets(request), context);
}
ListJobsOutcome DataExchangeClient::ListJobs(const ListJobsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/jobs";
uri.SetPath(uri.GetPath() + ss.str());
return ListJobsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListJobsOutcomeCallable DataExchangeClient::ListJobsCallable(const ListJobsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListJobsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListJobs(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::ListJobsAsync(const ListJobsRequest& request, const ListJobsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListJobsAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::ListJobsAsyncHelper(const ListJobsRequest& request, const ListJobsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListJobs(request), context);
}
ListRevisionAssetsOutcome DataExchangeClient::ListRevisionAssets(const ListRevisionAssetsRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("ListRevisionAssets", "Required field: DataSetId, is not set");
return ListRevisionAssetsOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
if (!request.RevisionIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("ListRevisionAssets", "Required field: RevisionId, is not set");
return ListRevisionAssetsOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions/";
ss << request.GetRevisionId();
ss << "/assets";
uri.SetPath(uri.GetPath() + ss.str());
return ListRevisionAssetsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListRevisionAssetsOutcomeCallable DataExchangeClient::ListRevisionAssetsCallable(const ListRevisionAssetsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListRevisionAssetsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListRevisionAssets(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::ListRevisionAssetsAsync(const ListRevisionAssetsRequest& request, const ListRevisionAssetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListRevisionAssetsAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::ListRevisionAssetsAsyncHelper(const ListRevisionAssetsRequest& request, const ListRevisionAssetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListRevisionAssets(request), context);
}
ListTagsForResourceOutcome DataExchangeClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
{
if (!request.ResourceArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: ResourceArn, is not set");
return ListTagsForResourceOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::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 DataExchangeClient::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 DataExchangeClient::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 DataExchangeClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListTagsForResource(request), context);
}
StartJobOutcome DataExchangeClient::StartJob(const StartJobRequest& request) const
{
if (!request.JobIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("StartJob", "Required field: JobId, is not set");
return StartJobOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/jobs/";
ss << request.GetJobId();
uri.SetPath(uri.GetPath() + ss.str());
return StartJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
}
StartJobOutcomeCallable DataExchangeClient::StartJobCallable(const StartJobRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< StartJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->StartJob(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::StartJobAsync(const StartJobRequest& request, const StartJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->StartJobAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::StartJobAsyncHelper(const StartJobRequest& request, const StartJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, StartJob(request), context);
}
TagResourceOutcome DataExchangeClient::TagResource(const TagResourceRequest& request) const
{
if (!request.ResourceArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("TagResource", "Required field: ResourceArn, is not set");
return TagResourceOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::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 DataExchangeClient::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 DataExchangeClient::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 DataExchangeClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, TagResource(request), context);
}
UntagResourceOutcome DataExchangeClient::UntagResource(const UntagResourceRequest& request) const
{
if (!request.ResourceArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UntagResource", "Required field: ResourceArn, is not set");
return UntagResourceOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::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<DataExchangeErrors>(DataExchangeErrors::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 DataExchangeClient::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 DataExchangeClient::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 DataExchangeClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UntagResource(request), context);
}
UpdateAssetOutcome DataExchangeClient::UpdateAsset(const UpdateAssetRequest& request) const
{
if (!request.AssetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UpdateAsset", "Required field: AssetId, is not set");
return UpdateAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AssetId]", false));
}
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UpdateAsset", "Required field: DataSetId, is not set");
return UpdateAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
if (!request.RevisionIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UpdateAsset", "Required field: RevisionId, is not set");
return UpdateAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions/";
ss << request.GetRevisionId();
ss << "/assets/";
ss << request.GetAssetId();
uri.SetPath(uri.GetPath() + ss.str());
return UpdateAssetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
}
UpdateAssetOutcomeCallable DataExchangeClient::UpdateAssetCallable(const UpdateAssetRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateAssetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateAsset(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::UpdateAssetAsync(const UpdateAssetRequest& request, const UpdateAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateAssetAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::UpdateAssetAsyncHelper(const UpdateAssetRequest& request, const UpdateAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateAsset(request), context);
}
UpdateDataSetOutcome DataExchangeClient::UpdateDataSet(const UpdateDataSetRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UpdateDataSet", "Required field: DataSetId, is not set");
return UpdateDataSetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
uri.SetPath(uri.GetPath() + ss.str());
return UpdateDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
}
UpdateDataSetOutcomeCallable DataExchangeClient::UpdateDataSetCallable(const UpdateDataSetRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateDataSet(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::UpdateDataSetAsync(const UpdateDataSetRequest& request, const UpdateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateDataSetAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::UpdateDataSetAsyncHelper(const UpdateDataSetRequest& request, const UpdateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateDataSet(request), context);
}
UpdateRevisionOutcome DataExchangeClient::UpdateRevision(const UpdateRevisionRequest& request) const
{
if (!request.DataSetIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UpdateRevision", "Required field: DataSetId, is not set");
return UpdateRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
}
if (!request.RevisionIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("UpdateRevision", "Required field: RevisionId, is not set");
return UpdateRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/data-sets/";
ss << request.GetDataSetId();
ss << "/revisions/";
ss << request.GetRevisionId();
uri.SetPath(uri.GetPath() + ss.str());
return UpdateRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
}
UpdateRevisionOutcomeCallable DataExchangeClient::UpdateRevisionCallable(const UpdateRevisionRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateRevision(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void DataExchangeClient::UpdateRevisionAsync(const UpdateRevisionRequest& request, const UpdateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateRevisionAsyncHelper( request, handler, context ); } );
}
void DataExchangeClient::UpdateRevisionAsyncHelper(const UpdateRevisionRequest& request, const UpdateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateRevision(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/dataexchange/DataExchangeEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::DataExchange;
namespace Aws
{
namespace DataExchange
{
namespace DataExchangeEndpoint
{
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 << "dataexchange" << ".";
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 DataExchangeEndpoint
} // namespace DataExchange
} // 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/dataexchange/DataExchangeErrorMarshaller.h>
#include <aws/dataexchange/DataExchangeErrors.h>
using namespace Aws::Client;
using namespace Aws::DataExchange;
AWSError<CoreErrors> DataExchangeErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = DataExchangeErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,69 @@
/**
* 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/dataexchange/DataExchangeErrors.h>
#include <aws/dataexchange/model/ConflictException.h>
#include <aws/dataexchange/model/ResourceNotFoundException.h>
#include <aws/dataexchange/model/ServiceLimitExceededException.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::DataExchange;
using namespace Aws::DataExchange::Model;
namespace Aws
{
namespace DataExchange
{
template<> AWS_DATAEXCHANGE_API ConflictException DataExchangeError::GetModeledError()
{
assert(this->GetErrorType() == DataExchangeErrors::CONFLICT);
return ConflictException(this->GetJsonPayload().View());
}
template<> AWS_DATAEXCHANGE_API ResourceNotFoundException DataExchangeError::GetModeledError()
{
assert(this->GetErrorType() == DataExchangeErrors::RESOURCE_NOT_FOUND);
return ResourceNotFoundException(this->GetJsonPayload().View());
}
template<> AWS_DATAEXCHANGE_API ServiceLimitExceededException DataExchangeError::GetModeledError()
{
assert(this->GetErrorType() == DataExchangeErrors::SERVICE_LIMIT_EXCEEDED);
return ServiceLimitExceededException(this->GetJsonPayload().View());
}
namespace DataExchangeErrorMapper
{
static const int CONFLICT_HASH = HashingUtils::HashString("ConflictException");
static const int INTERNAL_SERVER_HASH = HashingUtils::HashString("InternalServerException");
static const int SERVICE_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ServiceLimitExceededException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == CONFLICT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(DataExchangeErrors::CONFLICT), false);
}
else if (hashCode == INTERNAL_SERVER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(DataExchangeErrors::INTERNAL_SERVER), false);
}
else if (hashCode == SERVICE_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(DataExchangeErrors::SERVICE_LIMIT_EXCEEDED), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace DataExchangeErrorMapper
} // namespace DataExchange
} // 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/dataexchange/model/AssetDestinationEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
AssetDestinationEntry::AssetDestinationEntry() :
m_assetIdHasBeenSet(false),
m_bucketHasBeenSet(false),
m_keyHasBeenSet(false)
{
}
AssetDestinationEntry::AssetDestinationEntry(JsonView jsonValue) :
m_assetIdHasBeenSet(false),
m_bucketHasBeenSet(false),
m_keyHasBeenSet(false)
{
*this = jsonValue;
}
AssetDestinationEntry& AssetDestinationEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetId"))
{
m_assetId = jsonValue.GetString("AssetId");
m_assetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Bucket"))
{
m_bucket = jsonValue.GetString("Bucket");
m_bucketHasBeenSet = true;
}
if(jsonValue.ValueExists("Key"))
{
m_key = jsonValue.GetString("Key");
m_keyHasBeenSet = true;
}
return *this;
}
JsonValue AssetDestinationEntry::Jsonize() const
{
JsonValue payload;
if(m_assetIdHasBeenSet)
{
payload.WithString("AssetId", m_assetId);
}
if(m_bucketHasBeenSet)
{
payload.WithString("Bucket", m_bucket);
}
if(m_keyHasBeenSet)
{
payload.WithString("Key", m_key);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/AssetDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
AssetDetails::AssetDetails() :
m_s3SnapshotAssetHasBeenSet(false)
{
}
AssetDetails::AssetDetails(JsonView jsonValue) :
m_s3SnapshotAssetHasBeenSet(false)
{
*this = jsonValue;
}
AssetDetails& AssetDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("S3SnapshotAsset"))
{
m_s3SnapshotAsset = jsonValue.GetObject("S3SnapshotAsset");
m_s3SnapshotAssetHasBeenSet = true;
}
return *this;
}
JsonValue AssetDetails::Jsonize() const
{
JsonValue payload;
if(m_s3SnapshotAssetHasBeenSet)
{
payload.WithObject("S3SnapshotAsset", m_s3SnapshotAsset.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,193 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/AssetEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
AssetEntry::AssetEntry() :
m_arnHasBeenSet(false),
m_assetDetailsHasBeenSet(false),
m_assetType(AssetType::NOT_SET),
m_assetTypeHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_revisionIdHasBeenSet(false),
m_sourceIdHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
}
AssetEntry::AssetEntry(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_assetDetailsHasBeenSet(false),
m_assetType(AssetType::NOT_SET),
m_assetTypeHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_revisionIdHasBeenSet(false),
m_sourceIdHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
*this = jsonValue;
}
AssetEntry& AssetEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("AssetDetails"))
{
m_assetDetails = jsonValue.GetObject("AssetDetails");
m_assetDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("AssetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("AssetType"));
m_assetTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
m_sourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
m_updatedAtHasBeenSet = true;
}
return *this;
}
JsonValue AssetEntry::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("Arn", m_arn);
}
if(m_assetDetailsHasBeenSet)
{
payload.WithObject("AssetDetails", m_assetDetails.Jsonize());
}
if(m_assetTypeHasBeenSet)
{
payload.WithString("AssetType", AssetTypeMapper::GetNameForAssetType(m_assetType));
}
if(m_createdAtHasBeenSet)
{
payload.WithString("CreatedAt", m_createdAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
if(m_sourceIdHasBeenSet)
{
payload.WithString("SourceId", m_sourceId);
}
if(m_updatedAtHasBeenSet)
{
payload.WithString("UpdatedAt", m_updatedAt.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/AssetSourceEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
AssetSourceEntry::AssetSourceEntry() :
m_bucketHasBeenSet(false),
m_keyHasBeenSet(false)
{
}
AssetSourceEntry::AssetSourceEntry(JsonView jsonValue) :
m_bucketHasBeenSet(false),
m_keyHasBeenSet(false)
{
*this = jsonValue;
}
AssetSourceEntry& AssetSourceEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Bucket"))
{
m_bucket = jsonValue.GetString("Bucket");
m_bucketHasBeenSet = true;
}
if(jsonValue.ValueExists("Key"))
{
m_key = jsonValue.GetString("Key");
m_keyHasBeenSet = true;
}
return *this;
}
JsonValue AssetSourceEntry::Jsonize() const
{
JsonValue payload;
if(m_bucketHasBeenSet)
{
payload.WithString("Bucket", m_bucket);
}
if(m_keyHasBeenSet)
{
payload.WithString("Key", m_key);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/AssetType.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 DataExchange
{
namespace Model
{
namespace AssetTypeMapper
{
static const int S3_SNAPSHOT_HASH = HashingUtils::HashString("S3_SNAPSHOT");
AssetType GetAssetTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == S3_SNAPSHOT_HASH)
{
return AssetType::S3_SNAPSHOT;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssetType>(hashCode);
}
return AssetType::NOT_SET;
}
Aws::String GetNameForAssetType(AssetType enumValue)
{
switch(enumValue)
{
case AssetType::S3_SNAPSHOT:
return "S3_SNAPSHOT";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssetTypeMapper
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/CancelJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CancelJobRequest::CancelJobRequest() :
m_jobIdHasBeenSet(false)
{
}
Aws::String CancelJobRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/Code.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 DataExchange
{
namespace Model
{
namespace CodeMapper
{
static const int ACCESS_DENIED_EXCEPTION_HASH = HashingUtils::HashString("ACCESS_DENIED_EXCEPTION");
static const int INTERNAL_SERVER_EXCEPTION_HASH = HashingUtils::HashString("INTERNAL_SERVER_EXCEPTION");
static const int MALWARE_DETECTED_HASH = HashingUtils::HashString("MALWARE_DETECTED");
static const int RESOURCE_NOT_FOUND_EXCEPTION_HASH = HashingUtils::HashString("RESOURCE_NOT_FOUND_EXCEPTION");
static const int SERVICE_QUOTA_EXCEEDED_EXCEPTION_HASH = HashingUtils::HashString("SERVICE_QUOTA_EXCEEDED_EXCEPTION");
static const int VALIDATION_EXCEPTION_HASH = HashingUtils::HashString("VALIDATION_EXCEPTION");
static const int MALWARE_SCAN_ENCRYPTED_FILE_HASH = HashingUtils::HashString("MALWARE_SCAN_ENCRYPTED_FILE");
Code GetCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ACCESS_DENIED_EXCEPTION_HASH)
{
return Code::ACCESS_DENIED_EXCEPTION;
}
else if (hashCode == INTERNAL_SERVER_EXCEPTION_HASH)
{
return Code::INTERNAL_SERVER_EXCEPTION;
}
else if (hashCode == MALWARE_DETECTED_HASH)
{
return Code::MALWARE_DETECTED;
}
else if (hashCode == RESOURCE_NOT_FOUND_EXCEPTION_HASH)
{
return Code::RESOURCE_NOT_FOUND_EXCEPTION;
}
else if (hashCode == SERVICE_QUOTA_EXCEEDED_EXCEPTION_HASH)
{
return Code::SERVICE_QUOTA_EXCEEDED_EXCEPTION;
}
else if (hashCode == VALIDATION_EXCEPTION_HASH)
{
return Code::VALIDATION_EXCEPTION;
}
else if (hashCode == MALWARE_SCAN_ENCRYPTED_FILE_HASH)
{
return Code::MALWARE_SCAN_ENCRYPTED_FILE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Code>(hashCode);
}
return Code::NOT_SET;
}
Aws::String GetNameForCode(Code enumValue)
{
switch(enumValue)
{
case Code::ACCESS_DENIED_EXCEPTION:
return "ACCESS_DENIED_EXCEPTION";
case Code::INTERNAL_SERVER_EXCEPTION:
return "INTERNAL_SERVER_EXCEPTION";
case Code::MALWARE_DETECTED:
return "MALWARE_DETECTED";
case Code::RESOURCE_NOT_FOUND_EXCEPTION:
return "RESOURCE_NOT_FOUND_EXCEPTION";
case Code::SERVICE_QUOTA_EXCEEDED_EXCEPTION:
return "SERVICE_QUOTA_EXCEEDED_EXCEPTION";
case Code::VALIDATION_EXCEPTION:
return "VALIDATION_EXCEPTION";
case Code::MALWARE_SCAN_ENCRYPTED_FILE:
return "MALWARE_SCAN_ENCRYPTED_FILE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CodeMapper
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ConflictException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ConflictException::ConflictException() :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
}
ConflictException::ConflictException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
ConflictException& ConflictException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue ConflictException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/CreateDataSetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDataSetRequest::CreateDataSetRequest() :
m_assetType(AssetType::NOT_SET),
m_assetTypeHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_nameHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateDataSetRequest::SerializePayload() const
{
JsonValue payload;
if(m_assetTypeHasBeenSet)
{
payload.WithString("AssetType", AssetTypeMapper::GetNameForAssetType(m_assetType));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
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,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/CreateDataSetResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDataSetResult::CreateDataSetResult() :
m_assetType(AssetType::NOT_SET),
m_origin(Origin::NOT_SET)
{
}
CreateDataSetResult::CreateDataSetResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_assetType(AssetType::NOT_SET),
m_origin(Origin::NOT_SET)
{
*this = result;
}
CreateDataSetResult& CreateDataSetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("AssetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("AssetType"));
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Origin"))
{
m_origin = OriginMapper::GetOriginForName(jsonValue.GetString("Origin"));
}
if(jsonValue.ValueExists("OriginDetails"))
{
m_originDetails = jsonValue.GetObject("OriginDetails");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
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();
}
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
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/dataexchange/model/CreateJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateJobRequest::CreateJobRequest() :
m_detailsHasBeenSet(false),
m_type(Type::NOT_SET),
m_typeHasBeenSet(false)
{
}
Aws::String CreateJobRequest::SerializePayload() const
{
JsonValue payload;
if(m_detailsHasBeenSet)
{
payload.WithObject("Details", m_details.Jsonize());
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", TypeMapper::GetNameForType(m_type));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/CreateJobResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateJobResult::CreateJobResult() :
m_state(State::NOT_SET),
m_type(Type::NOT_SET)
{
}
CreateJobResult::CreateJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_state(State::NOT_SET),
m_type(Type::NOT_SET)
{
*this = result;
}
CreateJobResult& CreateJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("Details"))
{
m_details = jsonValue.GetObject("Details");
}
if(jsonValue.ValueExists("Errors"))
{
Array<JsonView> errorsJsonList = jsonValue.GetArray("Errors");
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
m_errors.push_back(errorsJsonList[errorsIndex].AsObject());
}
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("State"))
{
m_state = StateMapper::GetStateForName(jsonValue.GetString("State"));
}
if(jsonValue.ValueExists("Type"))
{
m_type = TypeMapper::GetTypeForName(jsonValue.GetString("Type"));
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/CreateRevisionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateRevisionRequest::CreateRevisionRequest() :
m_commentHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateRevisionRequest::SerializePayload() const
{
JsonValue payload;
if(m_commentHasBeenSet)
{
payload.WithString("Comment", m_comment);
}
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,93 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/CreateRevisionResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateRevisionResult::CreateRevisionResult() :
m_finalized(false)
{
}
CreateRevisionResult::CreateRevisionResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_finalized(false)
{
*this = result;
}
CreateRevisionResult& CreateRevisionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("Comment"))
{
m_comment = jsonValue.GetString("Comment");
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
}
if(jsonValue.ValueExists("Finalized"))
{
m_finalized = jsonValue.GetBool("Finalized");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
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();
}
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
return *this;
}

View File

@@ -0,0 +1,194 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/DataSetEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
DataSetEntry::DataSetEntry() :
m_arnHasBeenSet(false),
m_assetType(AssetType::NOT_SET),
m_assetTypeHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_origin(Origin::NOT_SET),
m_originHasBeenSet(false),
m_originDetailsHasBeenSet(false),
m_sourceIdHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
}
DataSetEntry::DataSetEntry(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_assetType(AssetType::NOT_SET),
m_assetTypeHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_origin(Origin::NOT_SET),
m_originHasBeenSet(false),
m_originDetailsHasBeenSet(false),
m_sourceIdHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
*this = jsonValue;
}
DataSetEntry& DataSetEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("AssetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("AssetType"));
m_assetTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Origin"))
{
m_origin = OriginMapper::GetOriginForName(jsonValue.GetString("Origin"));
m_originHasBeenSet = true;
}
if(jsonValue.ValueExists("OriginDetails"))
{
m_originDetails = jsonValue.GetObject("OriginDetails");
m_originDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
m_sourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
m_updatedAtHasBeenSet = true;
}
return *this;
}
JsonValue DataSetEntry::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("Arn", m_arn);
}
if(m_assetTypeHasBeenSet)
{
payload.WithString("AssetType", AssetTypeMapper::GetNameForAssetType(m_assetType));
}
if(m_createdAtHasBeenSet)
{
payload.WithString("CreatedAt", m_createdAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_originHasBeenSet)
{
payload.WithString("Origin", OriginMapper::GetNameForOrigin(m_origin));
}
if(m_originDetailsHasBeenSet)
{
payload.WithObject("OriginDetails", m_originDetails.Jsonize());
}
if(m_sourceIdHasBeenSet)
{
payload.WithString("SourceId", m_sourceId);
}
if(m_updatedAtHasBeenSet)
{
payload.WithString("UpdatedAt", m_updatedAt.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/DeleteAssetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAssetRequest::DeleteAssetRequest() :
m_assetIdHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String DeleteAssetRequest::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/dataexchange/model/DeleteDataSetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteDataSetRequest::DeleteDataSetRequest() :
m_dataSetIdHasBeenSet(false)
{
}
Aws::String DeleteDataSetRequest::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/dataexchange/model/DeleteRevisionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteRevisionRequest::DeleteRevisionRequest() :
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String DeleteRevisionRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/Details.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
Details::Details() :
m_importAssetFromSignedUrlJobErrorDetailsHasBeenSet(false),
m_importAssetsFromS3JobErrorDetailsHasBeenSet(false)
{
}
Details::Details(JsonView jsonValue) :
m_importAssetFromSignedUrlJobErrorDetailsHasBeenSet(false),
m_importAssetsFromS3JobErrorDetailsHasBeenSet(false)
{
*this = jsonValue;
}
Details& Details::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ImportAssetFromSignedUrlJobErrorDetails"))
{
m_importAssetFromSignedUrlJobErrorDetails = jsonValue.GetObject("ImportAssetFromSignedUrlJobErrorDetails");
m_importAssetFromSignedUrlJobErrorDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("ImportAssetsFromS3JobErrorDetails"))
{
Array<JsonView> importAssetsFromS3JobErrorDetailsJsonList = jsonValue.GetArray("ImportAssetsFromS3JobErrorDetails");
for(unsigned importAssetsFromS3JobErrorDetailsIndex = 0; importAssetsFromS3JobErrorDetailsIndex < importAssetsFromS3JobErrorDetailsJsonList.GetLength(); ++importAssetsFromS3JobErrorDetailsIndex)
{
m_importAssetsFromS3JobErrorDetails.push_back(importAssetsFromS3JobErrorDetailsJsonList[importAssetsFromS3JobErrorDetailsIndex].AsObject());
}
m_importAssetsFromS3JobErrorDetailsHasBeenSet = true;
}
return *this;
}
JsonValue Details::Jsonize() const
{
JsonValue payload;
if(m_importAssetFromSignedUrlJobErrorDetailsHasBeenSet)
{
payload.WithObject("ImportAssetFromSignedUrlJobErrorDetails", m_importAssetFromSignedUrlJobErrorDetails.Jsonize());
}
if(m_importAssetsFromS3JobErrorDetailsHasBeenSet)
{
Array<JsonValue> importAssetsFromS3JobErrorDetailsJsonList(m_importAssetsFromS3JobErrorDetails.size());
for(unsigned importAssetsFromS3JobErrorDetailsIndex = 0; importAssetsFromS3JobErrorDetailsIndex < importAssetsFromS3JobErrorDetailsJsonList.GetLength(); ++importAssetsFromS3JobErrorDetailsIndex)
{
importAssetsFromS3JobErrorDetailsJsonList[importAssetsFromS3JobErrorDetailsIndex].AsObject(m_importAssetsFromS3JobErrorDetails[importAssetsFromS3JobErrorDetailsIndex].Jsonize());
}
payload.WithArray("ImportAssetsFromS3JobErrorDetails", std::move(importAssetsFromS3JobErrorDetailsJsonList));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ExportAssetToSignedUrlRequestDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ExportAssetToSignedUrlRequestDetails::ExportAssetToSignedUrlRequestDetails() :
m_assetIdHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
ExportAssetToSignedUrlRequestDetails::ExportAssetToSignedUrlRequestDetails(JsonView jsonValue) :
m_assetIdHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
*this = jsonValue;
}
ExportAssetToSignedUrlRequestDetails& ExportAssetToSignedUrlRequestDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetId"))
{
m_assetId = jsonValue.GetString("AssetId");
m_assetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
return *this;
}
JsonValue ExportAssetToSignedUrlRequestDetails::Jsonize() const
{
JsonValue payload;
if(m_assetIdHasBeenSet)
{
payload.WithString("AssetId", m_assetId);
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,118 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ExportAssetToSignedUrlResponseDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ExportAssetToSignedUrlResponseDetails::ExportAssetToSignedUrlResponseDetails() :
m_assetIdHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false),
m_signedUrlHasBeenSet(false),
m_signedUrlExpiresAtHasBeenSet(false)
{
}
ExportAssetToSignedUrlResponseDetails::ExportAssetToSignedUrlResponseDetails(JsonView jsonValue) :
m_assetIdHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false),
m_signedUrlHasBeenSet(false),
m_signedUrlExpiresAtHasBeenSet(false)
{
*this = jsonValue;
}
ExportAssetToSignedUrlResponseDetails& ExportAssetToSignedUrlResponseDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetId"))
{
m_assetId = jsonValue.GetString("AssetId");
m_assetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("SignedUrl"))
{
m_signedUrl = jsonValue.GetString("SignedUrl");
m_signedUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("SignedUrlExpiresAt"))
{
m_signedUrlExpiresAt = jsonValue.GetString("SignedUrlExpiresAt");
m_signedUrlExpiresAtHasBeenSet = true;
}
return *this;
}
JsonValue ExportAssetToSignedUrlResponseDetails::Jsonize() const
{
JsonValue payload;
if(m_assetIdHasBeenSet)
{
payload.WithString("AssetId", m_assetId);
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
if(m_signedUrlHasBeenSet)
{
payload.WithString("SignedUrl", m_signedUrl);
}
if(m_signedUrlExpiresAtHasBeenSet)
{
payload.WithString("SignedUrlExpiresAt", m_signedUrlExpiresAt.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ExportAssetsToS3RequestDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ExportAssetsToS3RequestDetails::ExportAssetsToS3RequestDetails() :
m_assetDestinationsHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
ExportAssetsToS3RequestDetails::ExportAssetsToS3RequestDetails(JsonView jsonValue) :
m_assetDestinationsHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
*this = jsonValue;
}
ExportAssetsToS3RequestDetails& ExportAssetsToS3RequestDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetDestinations"))
{
Array<JsonView> assetDestinationsJsonList = jsonValue.GetArray("AssetDestinations");
for(unsigned assetDestinationsIndex = 0; assetDestinationsIndex < assetDestinationsJsonList.GetLength(); ++assetDestinationsIndex)
{
m_assetDestinations.push_back(assetDestinationsJsonList[assetDestinationsIndex].AsObject());
}
m_assetDestinationsHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Encryption"))
{
m_encryption = jsonValue.GetObject("Encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
return *this;
}
JsonValue ExportAssetsToS3RequestDetails::Jsonize() const
{
JsonValue payload;
if(m_assetDestinationsHasBeenSet)
{
Array<JsonValue> assetDestinationsJsonList(m_assetDestinations.size());
for(unsigned assetDestinationsIndex = 0; assetDestinationsIndex < assetDestinationsJsonList.GetLength(); ++assetDestinationsIndex)
{
assetDestinationsJsonList[assetDestinationsIndex].AsObject(m_assetDestinations[assetDestinationsIndex].Jsonize());
}
payload.WithArray("AssetDestinations", std::move(assetDestinationsJsonList));
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_encryptionHasBeenSet)
{
payload.WithObject("Encryption", m_encryption.Jsonize());
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ExportAssetsToS3ResponseDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ExportAssetsToS3ResponseDetails::ExportAssetsToS3ResponseDetails() :
m_assetDestinationsHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
ExportAssetsToS3ResponseDetails::ExportAssetsToS3ResponseDetails(JsonView jsonValue) :
m_assetDestinationsHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
*this = jsonValue;
}
ExportAssetsToS3ResponseDetails& ExportAssetsToS3ResponseDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetDestinations"))
{
Array<JsonView> assetDestinationsJsonList = jsonValue.GetArray("AssetDestinations");
for(unsigned assetDestinationsIndex = 0; assetDestinationsIndex < assetDestinationsJsonList.GetLength(); ++assetDestinationsIndex)
{
m_assetDestinations.push_back(assetDestinationsJsonList[assetDestinationsIndex].AsObject());
}
m_assetDestinationsHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Encryption"))
{
m_encryption = jsonValue.GetObject("Encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
return *this;
}
JsonValue ExportAssetsToS3ResponseDetails::Jsonize() const
{
JsonValue payload;
if(m_assetDestinationsHasBeenSet)
{
Array<JsonValue> assetDestinationsJsonList(m_assetDestinations.size());
for(unsigned assetDestinationsIndex = 0; assetDestinationsIndex < assetDestinationsJsonList.GetLength(); ++assetDestinationsIndex)
{
assetDestinationsJsonList[assetDestinationsIndex].AsObject(m_assetDestinations[assetDestinationsIndex].Jsonize());
}
payload.WithArray("AssetDestinations", std::move(assetDestinationsJsonList));
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_encryptionHasBeenSet)
{
payload.WithObject("Encryption", m_encryption.Jsonize());
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ExportServerSideEncryption.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ExportServerSideEncryption::ExportServerSideEncryption() :
m_kmsKeyArnHasBeenSet(false),
m_type(ServerSideEncryptionTypes::NOT_SET),
m_typeHasBeenSet(false)
{
}
ExportServerSideEncryption::ExportServerSideEncryption(JsonView jsonValue) :
m_kmsKeyArnHasBeenSet(false),
m_type(ServerSideEncryptionTypes::NOT_SET),
m_typeHasBeenSet(false)
{
*this = jsonValue;
}
ExportServerSideEncryption& ExportServerSideEncryption::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("KmsKeyArn"))
{
m_kmsKeyArn = jsonValue.GetString("KmsKeyArn");
m_kmsKeyArnHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = ServerSideEncryptionTypesMapper::GetServerSideEncryptionTypesForName(jsonValue.GetString("Type"));
m_typeHasBeenSet = true;
}
return *this;
}
JsonValue ExportServerSideEncryption::Jsonize() const
{
JsonValue payload;
if(m_kmsKeyArnHasBeenSet)
{
payload.WithString("KmsKeyArn", m_kmsKeyArn);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", ServerSideEncryptionTypesMapper::GetNameForServerSideEncryptionTypes(m_type));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

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

View File

@@ -0,0 +1,96 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/GetAssetResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetAssetResult::GetAssetResult() :
m_assetType(AssetType::NOT_SET)
{
}
GetAssetResult::GetAssetResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_assetType(AssetType::NOT_SET)
{
*this = result;
}
GetAssetResult& GetAssetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("AssetDetails"))
{
m_assetDetails = jsonValue.GetObject("AssetDetails");
}
if(jsonValue.ValueExists("AssetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("AssetType"));
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
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/dataexchange/model/GetDataSetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetDataSetRequest::GetDataSetRequest() :
m_dataSetIdHasBeenSet(false)
{
}
Aws::String GetDataSetRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/GetDataSetResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetDataSetResult::GetDataSetResult() :
m_assetType(AssetType::NOT_SET),
m_origin(Origin::NOT_SET)
{
}
GetDataSetResult::GetDataSetResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_assetType(AssetType::NOT_SET),
m_origin(Origin::NOT_SET)
{
*this = result;
}
GetDataSetResult& GetDataSetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("AssetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("AssetType"));
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Origin"))
{
m_origin = OriginMapper::GetOriginForName(jsonValue.GetString("Origin"));
}
if(jsonValue.ValueExists("OriginDetails"))
{
m_originDetails = jsonValue.GetObject("OriginDetails");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
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();
}
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
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/dataexchange/model/GetJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetJobRequest::GetJobRequest() :
m_jobIdHasBeenSet(false)
{
}
Aws::String GetJobRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/GetJobResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetJobResult::GetJobResult() :
m_state(State::NOT_SET),
m_type(Type::NOT_SET)
{
}
GetJobResult::GetJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_state(State::NOT_SET),
m_type(Type::NOT_SET)
{
*this = result;
}
GetJobResult& GetJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("Details"))
{
m_details = jsonValue.GetObject("Details");
}
if(jsonValue.ValueExists("Errors"))
{
Array<JsonView> errorsJsonList = jsonValue.GetArray("Errors");
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
m_errors.push_back(errorsJsonList[errorsIndex].AsObject());
}
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("State"))
{
m_state = StateMapper::GetStateForName(jsonValue.GetString("State"));
}
if(jsonValue.ValueExists("Type"))
{
m_type = TypeMapper::GetTypeForName(jsonValue.GetString("Type"));
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
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/dataexchange/model/GetRevisionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetRevisionRequest::GetRevisionRequest() :
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String GetRevisionRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,93 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/GetRevisionResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetRevisionResult::GetRevisionResult() :
m_finalized(false)
{
}
GetRevisionResult::GetRevisionResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_finalized(false)
{
*this = result;
}
GetRevisionResult& GetRevisionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("Comment"))
{
m_comment = jsonValue.GetString("Comment");
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
}
if(jsonValue.ValueExists("Finalized"))
{
m_finalized = jsonValue.GetBool("Finalized");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
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();
}
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
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/dataexchange/model/ImportAssetFromSignedUrlJobErrorDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ImportAssetFromSignedUrlJobErrorDetails::ImportAssetFromSignedUrlJobErrorDetails() :
m_assetNameHasBeenSet(false)
{
}
ImportAssetFromSignedUrlJobErrorDetails::ImportAssetFromSignedUrlJobErrorDetails(JsonView jsonValue) :
m_assetNameHasBeenSet(false)
{
*this = jsonValue;
}
ImportAssetFromSignedUrlJobErrorDetails& ImportAssetFromSignedUrlJobErrorDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetName"))
{
m_assetName = jsonValue.GetString("AssetName");
m_assetNameHasBeenSet = true;
}
return *this;
}
JsonValue ImportAssetFromSignedUrlJobErrorDetails::Jsonize() const
{
JsonValue payload;
if(m_assetNameHasBeenSet)
{
payload.WithString("AssetName", m_assetName);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ImportAssetFromSignedUrlRequestDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ImportAssetFromSignedUrlRequestDetails::ImportAssetFromSignedUrlRequestDetails() :
m_assetNameHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_md5HashHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
ImportAssetFromSignedUrlRequestDetails::ImportAssetFromSignedUrlRequestDetails(JsonView jsonValue) :
m_assetNameHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_md5HashHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
*this = jsonValue;
}
ImportAssetFromSignedUrlRequestDetails& ImportAssetFromSignedUrlRequestDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetName"))
{
m_assetName = jsonValue.GetString("AssetName");
m_assetNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Md5Hash"))
{
m_md5Hash = jsonValue.GetString("Md5Hash");
m_md5HashHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
return *this;
}
JsonValue ImportAssetFromSignedUrlRequestDetails::Jsonize() const
{
JsonValue payload;
if(m_assetNameHasBeenSet)
{
payload.WithString("AssetName", m_assetName);
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_md5HashHasBeenSet)
{
payload.WithString("Md5Hash", m_md5Hash);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ImportAssetFromSignedUrlResponseDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ImportAssetFromSignedUrlResponseDetails::ImportAssetFromSignedUrlResponseDetails() :
m_assetNameHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_md5HashHasBeenSet(false),
m_revisionIdHasBeenSet(false),
m_signedUrlHasBeenSet(false),
m_signedUrlExpiresAtHasBeenSet(false)
{
}
ImportAssetFromSignedUrlResponseDetails::ImportAssetFromSignedUrlResponseDetails(JsonView jsonValue) :
m_assetNameHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_md5HashHasBeenSet(false),
m_revisionIdHasBeenSet(false),
m_signedUrlHasBeenSet(false),
m_signedUrlExpiresAtHasBeenSet(false)
{
*this = jsonValue;
}
ImportAssetFromSignedUrlResponseDetails& ImportAssetFromSignedUrlResponseDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetName"))
{
m_assetName = jsonValue.GetString("AssetName");
m_assetNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Md5Hash"))
{
m_md5Hash = jsonValue.GetString("Md5Hash");
m_md5HashHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("SignedUrl"))
{
m_signedUrl = jsonValue.GetString("SignedUrl");
m_signedUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("SignedUrlExpiresAt"))
{
m_signedUrlExpiresAt = jsonValue.GetString("SignedUrlExpiresAt");
m_signedUrlExpiresAtHasBeenSet = true;
}
return *this;
}
JsonValue ImportAssetFromSignedUrlResponseDetails::Jsonize() const
{
JsonValue payload;
if(m_assetNameHasBeenSet)
{
payload.WithString("AssetName", m_assetName);
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_md5HashHasBeenSet)
{
payload.WithString("Md5Hash", m_md5Hash);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
if(m_signedUrlHasBeenSet)
{
payload.WithString("SignedUrl", m_signedUrl);
}
if(m_signedUrlExpiresAtHasBeenSet)
{
payload.WithString("SignedUrlExpiresAt", m_signedUrlExpiresAt.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,97 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ImportAssetsFromS3RequestDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ImportAssetsFromS3RequestDetails::ImportAssetsFromS3RequestDetails() :
m_assetSourcesHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
ImportAssetsFromS3RequestDetails::ImportAssetsFromS3RequestDetails(JsonView jsonValue) :
m_assetSourcesHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
*this = jsonValue;
}
ImportAssetsFromS3RequestDetails& ImportAssetsFromS3RequestDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetSources"))
{
Array<JsonView> assetSourcesJsonList = jsonValue.GetArray("AssetSources");
for(unsigned assetSourcesIndex = 0; assetSourcesIndex < assetSourcesJsonList.GetLength(); ++assetSourcesIndex)
{
m_assetSources.push_back(assetSourcesJsonList[assetSourcesIndex].AsObject());
}
m_assetSourcesHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
return *this;
}
JsonValue ImportAssetsFromS3RequestDetails::Jsonize() const
{
JsonValue payload;
if(m_assetSourcesHasBeenSet)
{
Array<JsonValue> assetSourcesJsonList(m_assetSources.size());
for(unsigned assetSourcesIndex = 0; assetSourcesIndex < assetSourcesJsonList.GetLength(); ++assetSourcesIndex)
{
assetSourcesJsonList[assetSourcesIndex].AsObject(m_assetSources[assetSourcesIndex].Jsonize());
}
payload.WithArray("AssetSources", std::move(assetSourcesJsonList));
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,97 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ImportAssetsFromS3ResponseDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ImportAssetsFromS3ResponseDetails::ImportAssetsFromS3ResponseDetails() :
m_assetSourcesHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
ImportAssetsFromS3ResponseDetails::ImportAssetsFromS3ResponseDetails(JsonView jsonValue) :
m_assetSourcesHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
*this = jsonValue;
}
ImportAssetsFromS3ResponseDetails& ImportAssetsFromS3ResponseDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssetSources"))
{
Array<JsonView> assetSourcesJsonList = jsonValue.GetArray("AssetSources");
for(unsigned assetSourcesIndex = 0; assetSourcesIndex < assetSourcesJsonList.GetLength(); ++assetSourcesIndex)
{
m_assetSources.push_back(assetSourcesJsonList[assetSourcesIndex].AsObject());
}
m_assetSourcesHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
m_revisionIdHasBeenSet = true;
}
return *this;
}
JsonValue ImportAssetsFromS3ResponseDetails::Jsonize() const
{
JsonValue payload;
if(m_assetSourcesHasBeenSet)
{
Array<JsonValue> assetSourcesJsonList(m_assetSources.size());
for(unsigned assetSourcesIndex = 0; assetSourcesIndex < assetSourcesJsonList.GetLength(); ++assetSourcesIndex)
{
assetSourcesJsonList[assetSourcesIndex].AsObject(m_assetSources[assetSourcesIndex].Jsonize());
}
payload.WithArray("AssetSources", std::move(assetSourcesJsonList));
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("RevisionId", m_revisionId);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,172 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/JobEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
JobEntry::JobEntry() :
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_detailsHasBeenSet(false),
m_errorsHasBeenSet(false),
m_idHasBeenSet(false),
m_state(State::NOT_SET),
m_stateHasBeenSet(false),
m_type(Type::NOT_SET),
m_typeHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
}
JobEntry::JobEntry(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_detailsHasBeenSet(false),
m_errorsHasBeenSet(false),
m_idHasBeenSet(false),
m_state(State::NOT_SET),
m_stateHasBeenSet(false),
m_type(Type::NOT_SET),
m_typeHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
*this = jsonValue;
}
JobEntry& JobEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("Details"))
{
m_details = jsonValue.GetObject("Details");
m_detailsHasBeenSet = true;
}
if(jsonValue.ValueExists("Errors"))
{
Array<JsonView> errorsJsonList = jsonValue.GetArray("Errors");
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
m_errors.push_back(errorsJsonList[errorsIndex].AsObject());
}
m_errorsHasBeenSet = true;
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = StateMapper::GetStateForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = TypeMapper::GetTypeForName(jsonValue.GetString("Type"));
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
m_updatedAtHasBeenSet = true;
}
return *this;
}
JsonValue JobEntry::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("Arn", m_arn);
}
if(m_createdAtHasBeenSet)
{
payload.WithString("CreatedAt", m_createdAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_detailsHasBeenSet)
{
payload.WithObject("Details", m_details.Jsonize());
}
if(m_errorsHasBeenSet)
{
Array<JsonValue> errorsJsonList(m_errors.size());
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
errorsJsonList[errorsIndex].AsObject(m_errors[errorsIndex].Jsonize());
}
payload.WithArray("Errors", std::move(errorsJsonList));
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_stateHasBeenSet)
{
payload.WithString("State", StateMapper::GetNameForState(m_state));
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", TypeMapper::GetNameForType(m_type));
}
if(m_updatedAtHasBeenSet)
{
payload.WithString("UpdatedAt", m_updatedAt.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,154 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/JobError.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
JobError::JobError() :
m_code(Code::NOT_SET),
m_codeHasBeenSet(false),
m_detailsHasBeenSet(false),
m_limitName(JobErrorLimitName::NOT_SET),
m_limitNameHasBeenSet(false),
m_limitValue(0.0),
m_limitValueHasBeenSet(false),
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(JobErrorResourceTypes::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
}
JobError::JobError(JsonView jsonValue) :
m_code(Code::NOT_SET),
m_codeHasBeenSet(false),
m_detailsHasBeenSet(false),
m_limitName(JobErrorLimitName::NOT_SET),
m_limitNameHasBeenSet(false),
m_limitValue(0.0),
m_limitValueHasBeenSet(false),
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(JobErrorResourceTypes::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
JobError& JobError::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Code"))
{
m_code = CodeMapper::GetCodeForName(jsonValue.GetString("Code"));
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("Details"))
{
m_details = jsonValue.GetObject("Details");
m_detailsHasBeenSet = true;
}
if(jsonValue.ValueExists("LimitName"))
{
m_limitName = JobErrorLimitNameMapper::GetJobErrorLimitNameForName(jsonValue.GetString("LimitName"));
m_limitNameHasBeenSet = true;
}
if(jsonValue.ValueExists("LimitValue"))
{
m_limitValue = jsonValue.GetDouble("LimitValue");
m_limitValueHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = JobErrorResourceTypesMapper::GetJobErrorResourceTypesForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue JobError::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("Code", CodeMapper::GetNameForCode(m_code));
}
if(m_detailsHasBeenSet)
{
payload.WithObject("Details", m_details.Jsonize());
}
if(m_limitNameHasBeenSet)
{
payload.WithString("LimitName", JobErrorLimitNameMapper::GetNameForJobErrorLimitName(m_limitName));
}
if(m_limitValueHasBeenSet)
{
payload.WithDouble("LimitValue", m_limitValue);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", JobErrorResourceTypesMapper::GetNameForJobErrorResourceTypes(m_resourceType));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/JobErrorLimitName.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 DataExchange
{
namespace Model
{
namespace JobErrorLimitNameMapper
{
static const int Assets_per_revision_HASH = HashingUtils::HashString("Assets per revision");
static const int Asset_size_in_GB_HASH = HashingUtils::HashString("Asset size in GB");
JobErrorLimitName GetJobErrorLimitNameForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Assets_per_revision_HASH)
{
return JobErrorLimitName::Assets_per_revision;
}
else if (hashCode == Asset_size_in_GB_HASH)
{
return JobErrorLimitName::Asset_size_in_GB;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<JobErrorLimitName>(hashCode);
}
return JobErrorLimitName::NOT_SET;
}
Aws::String GetNameForJobErrorLimitName(JobErrorLimitName enumValue)
{
switch(enumValue)
{
case JobErrorLimitName::Assets_per_revision:
return "Assets per revision";
case JobErrorLimitName::Asset_size_in_GB:
return "Asset size in GB";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace JobErrorLimitNameMapper
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/JobErrorResourceTypes.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 DataExchange
{
namespace Model
{
namespace JobErrorResourceTypesMapper
{
static const int REVISION_HASH = HashingUtils::HashString("REVISION");
static const int ASSET_HASH = HashingUtils::HashString("ASSET");
JobErrorResourceTypes GetJobErrorResourceTypesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == REVISION_HASH)
{
return JobErrorResourceTypes::REVISION;
}
else if (hashCode == ASSET_HASH)
{
return JobErrorResourceTypes::ASSET;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<JobErrorResourceTypes>(hashCode);
}
return JobErrorResourceTypes::NOT_SET;
}
Aws::String GetNameForJobErrorResourceTypes(JobErrorResourceTypes enumValue)
{
switch(enumValue)
{
case JobErrorResourceTypes::REVISION:
return "REVISION";
case JobErrorResourceTypes::ASSET:
return "ASSET";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace JobErrorResourceTypesMapper
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,140 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/LimitName.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 DataExchange
{
namespace Model
{
namespace LimitNameMapper
{
static const int Products_per_account_HASH = HashingUtils::HashString("Products per account");
static const int Data_sets_per_account_HASH = HashingUtils::HashString("Data sets per account");
static const int Data_sets_per_product_HASH = HashingUtils::HashString("Data sets per product");
static const int Revisions_per_data_set_HASH = HashingUtils::HashString("Revisions per data set");
static const int Assets_per_revision_HASH = HashingUtils::HashString("Assets per revision");
static const int Assets_per_import_job_from_Amazon_S3_HASH = HashingUtils::HashString("Assets per import job from Amazon S3");
static const int Asset_per_export_job_from_Amazon_S3_HASH = HashingUtils::HashString("Asset per export job from Amazon S3");
static const int Asset_size_in_GB_HASH = HashingUtils::HashString("Asset size in GB");
static const int Concurrent_in_progress_jobs_to_import_assets_from_Amazon_S3_HASH = HashingUtils::HashString("Concurrent in progress jobs to import assets from Amazon S3");
static const int Concurrent_in_progress_jobs_to_import_assets_from_a_signed_URL_HASH = HashingUtils::HashString("Concurrent in progress jobs to import assets from a signed URL");
static const int Concurrent_in_progress_jobs_to_export_assets_to_Amazon_S3_HASH = HashingUtils::HashString("Concurrent in progress jobs to export assets to Amazon S3");
static const int Concurrent_in_progress_jobs_to_export_assets_to_a_signed_URL_HASH = HashingUtils::HashString("Concurrent in progress jobs to export assets to a signed URL");
LimitName GetLimitNameForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Products_per_account_HASH)
{
return LimitName::Products_per_account;
}
else if (hashCode == Data_sets_per_account_HASH)
{
return LimitName::Data_sets_per_account;
}
else if (hashCode == Data_sets_per_product_HASH)
{
return LimitName::Data_sets_per_product;
}
else if (hashCode == Revisions_per_data_set_HASH)
{
return LimitName::Revisions_per_data_set;
}
else if (hashCode == Assets_per_revision_HASH)
{
return LimitName::Assets_per_revision;
}
else if (hashCode == Assets_per_import_job_from_Amazon_S3_HASH)
{
return LimitName::Assets_per_import_job_from_Amazon_S3;
}
else if (hashCode == Asset_per_export_job_from_Amazon_S3_HASH)
{
return LimitName::Asset_per_export_job_from_Amazon_S3;
}
else if (hashCode == Asset_size_in_GB_HASH)
{
return LimitName::Asset_size_in_GB;
}
else if (hashCode == Concurrent_in_progress_jobs_to_import_assets_from_Amazon_S3_HASH)
{
return LimitName::Concurrent_in_progress_jobs_to_import_assets_from_Amazon_S3;
}
else if (hashCode == Concurrent_in_progress_jobs_to_import_assets_from_a_signed_URL_HASH)
{
return LimitName::Concurrent_in_progress_jobs_to_import_assets_from_a_signed_URL;
}
else if (hashCode == Concurrent_in_progress_jobs_to_export_assets_to_Amazon_S3_HASH)
{
return LimitName::Concurrent_in_progress_jobs_to_export_assets_to_Amazon_S3;
}
else if (hashCode == Concurrent_in_progress_jobs_to_export_assets_to_a_signed_URL_HASH)
{
return LimitName::Concurrent_in_progress_jobs_to_export_assets_to_a_signed_URL;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<LimitName>(hashCode);
}
return LimitName::NOT_SET;
}
Aws::String GetNameForLimitName(LimitName enumValue)
{
switch(enumValue)
{
case LimitName::Products_per_account:
return "Products per account";
case LimitName::Data_sets_per_account:
return "Data sets per account";
case LimitName::Data_sets_per_product:
return "Data sets per product";
case LimitName::Revisions_per_data_set:
return "Revisions per data set";
case LimitName::Assets_per_revision:
return "Assets per revision";
case LimitName::Assets_per_import_job_from_Amazon_S3:
return "Assets per import job from Amazon S3";
case LimitName::Asset_per_export_job_from_Amazon_S3:
return "Asset per export job from Amazon S3";
case LimitName::Asset_size_in_GB:
return "Asset size in GB";
case LimitName::Concurrent_in_progress_jobs_to_import_assets_from_Amazon_S3:
return "Concurrent in progress jobs to import assets from Amazon S3";
case LimitName::Concurrent_in_progress_jobs_to_import_assets_from_a_signed_URL:
return "Concurrent in progress jobs to import assets from a signed URL";
case LimitName::Concurrent_in_progress_jobs_to_export_assets_to_Amazon_S3:
return "Concurrent in progress jobs to export assets to Amazon S3";
case LimitName::Concurrent_in_progress_jobs_to_export_assets_to_a_signed_URL:
return "Concurrent in progress jobs to export assets to a signed URL";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace LimitNameMapper
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ListDataSetRevisionsRequest.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListDataSetRevisionsRequest::ListDataSetRevisionsRequest() :
m_dataSetIdHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListDataSetRevisionsRequest::SerializePayload() const
{
return {};
}
void ListDataSetRevisionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", 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/dataexchange/model/ListDataSetRevisionsResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListDataSetRevisionsResult::ListDataSetRevisionsResult()
{
}
ListDataSetRevisionsResult::ListDataSetRevisionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListDataSetRevisionsResult& ListDataSetRevisionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("Revisions"))
{
Array<JsonView> revisionsJsonList = jsonValue.GetArray("Revisions");
for(unsigned revisionsIndex = 0; revisionsIndex < revisionsJsonList.GetLength(); ++revisionsIndex)
{
m_revisions.push_back(revisionsJsonList[revisionsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ListDataSetsRequest.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListDataSetsRequest::ListDataSetsRequest() :
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_originHasBeenSet(false)
{
}
Aws::String ListDataSetsRequest::SerializePayload() const
{
return {};
}
void ListDataSetsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_originHasBeenSet)
{
ss << m_origin;
uri.AddQueryStringParameter("origin", 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/dataexchange/model/ListDataSetsResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListDataSetsResult::ListDataSetsResult()
{
}
ListDataSetsResult::ListDataSetsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListDataSetsResult& ListDataSetsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("DataSets"))
{
Array<JsonView> dataSetsJsonList = jsonValue.GetArray("DataSets");
for(unsigned dataSetsIndex = 0; dataSetsIndex < dataSetsJsonList.GetLength(); ++dataSetsIndex)
{
m_dataSets.push_back(dataSetsJsonList[dataSetsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,66 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ListJobsRequest.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListJobsRequest::ListJobsRequest() :
m_dataSetIdHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String ListJobsRequest::SerializePayload() const
{
return {};
}
void ListJobsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_dataSetIdHasBeenSet)
{
ss << m_dataSetId;
uri.AddQueryStringParameter("dataSetId", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
if(m_revisionIdHasBeenSet)
{
ss << m_revisionId;
uri.AddQueryStringParameter("revisionId", 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/dataexchange/model/ListJobsResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListJobsResult::ListJobsResult()
{
}
ListJobsResult::ListJobsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListJobsResult& ListJobsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Jobs"))
{
Array<JsonView> jobsJsonList = jsonValue.GetArray("Jobs");
for(unsigned jobsIndex = 0; jobsIndex < jobsJsonList.GetLength(); ++jobsIndex)
{
m_jobs.push_back(jobsJsonList[jobsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ListRevisionAssetsRequest.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListRevisionAssetsRequest::ListRevisionAssetsRequest() :
m_dataSetIdHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String ListRevisionAssetsRequest::SerializePayload() const
{
return {};
}
void ListRevisionAssetsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", 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/dataexchange/model/ListRevisionAssetsResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListRevisionAssetsResult::ListRevisionAssetsResult()
{
}
ListRevisionAssetsResult::ListRevisionAssetsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListRevisionAssetsResult& ListRevisionAssetsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Assets"))
{
Array<JsonView> assetsJsonList = jsonValue.GetArray("Assets");
for(unsigned assetsIndex = 0; assetsIndex < assetsJsonList.GetLength(); ++assetsIndex)
{
m_assets.push_back(assetsJsonList[assetsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
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/dataexchange/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::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/dataexchange/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::DataExchange::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,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/Origin.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 DataExchange
{
namespace Model
{
namespace OriginMapper
{
static const int OWNED_HASH = HashingUtils::HashString("OWNED");
static const int ENTITLED_HASH = HashingUtils::HashString("ENTITLED");
Origin GetOriginForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == OWNED_HASH)
{
return Origin::OWNED;
}
else if (hashCode == ENTITLED_HASH)
{
return Origin::ENTITLED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Origin>(hashCode);
}
return Origin::NOT_SET;
}
Aws::String GetNameForOrigin(Origin enumValue)
{
switch(enumValue)
{
case Origin::OWNED:
return "OWNED";
case Origin::ENTITLED:
return "ENTITLED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace OriginMapper
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/OriginDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
OriginDetails::OriginDetails() :
m_productIdHasBeenSet(false)
{
}
OriginDetails::OriginDetails(JsonView jsonValue) :
m_productIdHasBeenSet(false)
{
*this = jsonValue;
}
OriginDetails& OriginDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ProductId"))
{
m_productId = jsonValue.GetString("ProductId");
m_productIdHasBeenSet = true;
}
return *this;
}
JsonValue OriginDetails::Jsonize() const
{
JsonValue payload;
if(m_productIdHasBeenSet)
{
payload.WithString("ProductId", m_productId);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/RequestDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
RequestDetails::RequestDetails() :
m_exportAssetToSignedUrlHasBeenSet(false),
m_exportAssetsToS3HasBeenSet(false),
m_importAssetFromSignedUrlHasBeenSet(false),
m_importAssetsFromS3HasBeenSet(false)
{
}
RequestDetails::RequestDetails(JsonView jsonValue) :
m_exportAssetToSignedUrlHasBeenSet(false),
m_exportAssetsToS3HasBeenSet(false),
m_importAssetFromSignedUrlHasBeenSet(false),
m_importAssetsFromS3HasBeenSet(false)
{
*this = jsonValue;
}
RequestDetails& RequestDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ExportAssetToSignedUrl"))
{
m_exportAssetToSignedUrl = jsonValue.GetObject("ExportAssetToSignedUrl");
m_exportAssetToSignedUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("ExportAssetsToS3"))
{
m_exportAssetsToS3 = jsonValue.GetObject("ExportAssetsToS3");
m_exportAssetsToS3HasBeenSet = true;
}
if(jsonValue.ValueExists("ImportAssetFromSignedUrl"))
{
m_importAssetFromSignedUrl = jsonValue.GetObject("ImportAssetFromSignedUrl");
m_importAssetFromSignedUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("ImportAssetsFromS3"))
{
m_importAssetsFromS3 = jsonValue.GetObject("ImportAssetsFromS3");
m_importAssetsFromS3HasBeenSet = true;
}
return *this;
}
JsonValue RequestDetails::Jsonize() const
{
JsonValue payload;
if(m_exportAssetToSignedUrlHasBeenSet)
{
payload.WithObject("ExportAssetToSignedUrl", m_exportAssetToSignedUrl.Jsonize());
}
if(m_exportAssetsToS3HasBeenSet)
{
payload.WithObject("ExportAssetsToS3", m_exportAssetsToS3.Jsonize());
}
if(m_importAssetFromSignedUrlHasBeenSet)
{
payload.WithObject("ImportAssetFromSignedUrl", m_importAssetFromSignedUrl.Jsonize());
}
if(m_importAssetsFromS3HasBeenSet)
{
payload.WithObject("ImportAssetsFromS3", m_importAssetsFromS3.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ResourceNotFoundException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ResourceNotFoundException::ResourceNotFoundException() :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
}
ResourceNotFoundException::ResourceNotFoundException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
ResourceNotFoundException& ResourceNotFoundException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue ResourceNotFoundException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ResourceType.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 DataExchange
{
namespace Model
{
namespace ResourceTypeMapper
{
static const int DATA_SET_HASH = HashingUtils::HashString("DATA_SET");
static const int REVISION_HASH = HashingUtils::HashString("REVISION");
static const int ASSET_HASH = HashingUtils::HashString("ASSET");
static const int JOB_HASH = HashingUtils::HashString("JOB");
ResourceType GetResourceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == DATA_SET_HASH)
{
return ResourceType::DATA_SET;
}
else if (hashCode == REVISION_HASH)
{
return ResourceType::REVISION;
}
else if (hashCode == ASSET_HASH)
{
return ResourceType::ASSET;
}
else if (hashCode == JOB_HASH)
{
return ResourceType::JOB;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ResourceType>(hashCode);
}
return ResourceType::NOT_SET;
}
Aws::String GetNameForResourceType(ResourceType enumValue)
{
switch(enumValue)
{
case ResourceType::DATA_SET:
return "DATA_SET";
case ResourceType::REVISION:
return "REVISION";
case ResourceType::ASSET:
return "ASSET";
case ResourceType::JOB:
return "JOB";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ResourceTypeMapper
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ResponseDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ResponseDetails::ResponseDetails() :
m_exportAssetToSignedUrlHasBeenSet(false),
m_exportAssetsToS3HasBeenSet(false),
m_importAssetFromSignedUrlHasBeenSet(false),
m_importAssetsFromS3HasBeenSet(false)
{
}
ResponseDetails::ResponseDetails(JsonView jsonValue) :
m_exportAssetToSignedUrlHasBeenSet(false),
m_exportAssetsToS3HasBeenSet(false),
m_importAssetFromSignedUrlHasBeenSet(false),
m_importAssetsFromS3HasBeenSet(false)
{
*this = jsonValue;
}
ResponseDetails& ResponseDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ExportAssetToSignedUrl"))
{
m_exportAssetToSignedUrl = jsonValue.GetObject("ExportAssetToSignedUrl");
m_exportAssetToSignedUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("ExportAssetsToS3"))
{
m_exportAssetsToS3 = jsonValue.GetObject("ExportAssetsToS3");
m_exportAssetsToS3HasBeenSet = true;
}
if(jsonValue.ValueExists("ImportAssetFromSignedUrl"))
{
m_importAssetFromSignedUrl = jsonValue.GetObject("ImportAssetFromSignedUrl");
m_importAssetFromSignedUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("ImportAssetsFromS3"))
{
m_importAssetsFromS3 = jsonValue.GetObject("ImportAssetsFromS3");
m_importAssetsFromS3HasBeenSet = true;
}
return *this;
}
JsonValue ResponseDetails::Jsonize() const
{
JsonValue payload;
if(m_exportAssetToSignedUrlHasBeenSet)
{
payload.WithObject("ExportAssetToSignedUrl", m_exportAssetToSignedUrl.Jsonize());
}
if(m_exportAssetsToS3HasBeenSet)
{
payload.WithObject("ExportAssetsToS3", m_exportAssetsToS3.Jsonize());
}
if(m_importAssetFromSignedUrlHasBeenSet)
{
payload.WithObject("ImportAssetFromSignedUrl", m_importAssetFromSignedUrl.Jsonize());
}
if(m_importAssetsFromS3HasBeenSet)
{
payload.WithObject("ImportAssetsFromS3", m_importAssetsFromS3.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,164 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/RevisionEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
RevisionEntry::RevisionEntry() :
m_arnHasBeenSet(false),
m_commentHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_finalized(false),
m_finalizedHasBeenSet(false),
m_idHasBeenSet(false),
m_sourceIdHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
}
RevisionEntry::RevisionEntry(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_commentHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_finalized(false),
m_finalizedHasBeenSet(false),
m_idHasBeenSet(false),
m_sourceIdHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
*this = jsonValue;
}
RevisionEntry& RevisionEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("Comment"))
{
m_comment = jsonValue.GetString("Comment");
m_commentHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
m_dataSetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Finalized"))
{
m_finalized = jsonValue.GetBool("Finalized");
m_finalizedHasBeenSet = true;
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
m_sourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
m_updatedAtHasBeenSet = true;
}
return *this;
}
JsonValue RevisionEntry::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("Arn", m_arn);
}
if(m_commentHasBeenSet)
{
payload.WithString("Comment", m_comment);
}
if(m_createdAtHasBeenSet)
{
payload.WithString("CreatedAt", m_createdAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_dataSetIdHasBeenSet)
{
payload.WithString("DataSetId", m_dataSetId);
}
if(m_finalizedHasBeenSet)
{
payload.WithBool("Finalized", m_finalized);
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_sourceIdHasBeenSet)
{
payload.WithString("SourceId", m_sourceId);
}
if(m_updatedAtHasBeenSet)
{
payload.WithString("UpdatedAt", m_updatedAt.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/S3SnapshotAsset.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
S3SnapshotAsset::S3SnapshotAsset() :
m_size(0.0),
m_sizeHasBeenSet(false)
{
}
S3SnapshotAsset::S3SnapshotAsset(JsonView jsonValue) :
m_size(0.0),
m_sizeHasBeenSet(false)
{
*this = jsonValue;
}
S3SnapshotAsset& S3SnapshotAsset::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Size"))
{
m_size = jsonValue.GetDouble("Size");
m_sizeHasBeenSet = true;
}
return *this;
}
JsonValue S3SnapshotAsset::Jsonize() const
{
JsonValue payload;
if(m_sizeHasBeenSet)
{
payload.WithDouble("Size", m_size);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/ServerSideEncryptionTypes.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 DataExchange
{
namespace Model
{
namespace ServerSideEncryptionTypesMapper
{
static const int aws_kms_HASH = HashingUtils::HashString("aws:kms");
static const int AES256_HASH = HashingUtils::HashString("AES256");
ServerSideEncryptionTypes GetServerSideEncryptionTypesForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == aws_kms_HASH)
{
return ServerSideEncryptionTypes::aws_kms;
}
else if (hashCode == AES256_HASH)
{
return ServerSideEncryptionTypes::AES256;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ServerSideEncryptionTypes>(hashCode);
}
return ServerSideEncryptionTypes::NOT_SET;
}
Aws::String GetNameForServerSideEncryptionTypes(ServerSideEncryptionTypes enumValue)
{
switch(enumValue)
{
case ServerSideEncryptionTypes::aws_kms:
return "aws:kms";
case ServerSideEncryptionTypes::AES256:
return "AES256";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ServerSideEncryptionTypesMapper
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/ServiceLimitExceededException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataExchange
{
namespace Model
{
ServiceLimitExceededException::ServiceLimitExceededException() :
m_limitName(LimitName::NOT_SET),
m_limitNameHasBeenSet(false),
m_limitValue(0.0),
m_limitValueHasBeenSet(false),
m_messageHasBeenSet(false)
{
}
ServiceLimitExceededException::ServiceLimitExceededException(JsonView jsonValue) :
m_limitName(LimitName::NOT_SET),
m_limitNameHasBeenSet(false),
m_limitValue(0.0),
m_limitValueHasBeenSet(false),
m_messageHasBeenSet(false)
{
*this = jsonValue;
}
ServiceLimitExceededException& ServiceLimitExceededException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("LimitName"))
{
m_limitName = LimitNameMapper::GetLimitNameForName(jsonValue.GetString("LimitName"));
m_limitNameHasBeenSet = true;
}
if(jsonValue.ValueExists("LimitValue"))
{
m_limitValue = jsonValue.GetDouble("LimitValue");
m_limitValueHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
return *this;
}
JsonValue ServiceLimitExceededException::Jsonize() const
{
JsonValue payload;
if(m_limitNameHasBeenSet)
{
payload.WithString("LimitName", LimitNameMapper::GetNameForLimitName(m_limitName));
}
if(m_limitValueHasBeenSet)
{
payload.WithDouble("LimitValue", m_limitValue);
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
return payload;
}
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/StartJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
StartJobRequest::StartJobRequest() :
m_jobIdHasBeenSet(false)
{
}
Aws::String StartJobRequest::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/dataexchange/model/StartJobResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
StartJobResult::StartJobResult()
{
}
StartJobResult::StartJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
StartJobResult& StartJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/State.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 DataExchange
{
namespace Model
{
namespace StateMapper
{
static const int WAITING_HASH = HashingUtils::HashString("WAITING");
static const int IN_PROGRESS_HASH = HashingUtils::HashString("IN_PROGRESS");
static const int ERROR__HASH = HashingUtils::HashString("ERROR");
static const int COMPLETED_HASH = HashingUtils::HashString("COMPLETED");
static const int CANCELLED_HASH = HashingUtils::HashString("CANCELLED");
static const int TIMED_OUT_HASH = HashingUtils::HashString("TIMED_OUT");
State GetStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == WAITING_HASH)
{
return State::WAITING;
}
else if (hashCode == IN_PROGRESS_HASH)
{
return State::IN_PROGRESS;
}
else if (hashCode == ERROR__HASH)
{
return State::ERROR_;
}
else if (hashCode == COMPLETED_HASH)
{
return State::COMPLETED;
}
else if (hashCode == CANCELLED_HASH)
{
return State::CANCELLED;
}
else if (hashCode == TIMED_OUT_HASH)
{
return State::TIMED_OUT;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<State>(hashCode);
}
return State::NOT_SET;
}
Aws::String GetNameForState(State enumValue)
{
switch(enumValue)
{
case State::WAITING:
return "WAITING";
case State::IN_PROGRESS:
return "IN_PROGRESS";
case State::ERROR_:
return "ERROR";
case State::COMPLETED:
return "COMPLETED";
case State::CANCELLED:
return "CANCELLED";
case State::TIMED_OUT:
return "TIMED_OUT";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StateMapper
} // namespace Model
} // namespace DataExchange
} // 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/dataexchange/model/TagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::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,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/Type.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 DataExchange
{
namespace Model
{
namespace TypeMapper
{
static const int IMPORT_ASSETS_FROM_S3_HASH = HashingUtils::HashString("IMPORT_ASSETS_FROM_S3");
static const int IMPORT_ASSET_FROM_SIGNED_URL_HASH = HashingUtils::HashString("IMPORT_ASSET_FROM_SIGNED_URL");
static const int EXPORT_ASSETS_TO_S3_HASH = HashingUtils::HashString("EXPORT_ASSETS_TO_S3");
static const int EXPORT_ASSET_TO_SIGNED_URL_HASH = HashingUtils::HashString("EXPORT_ASSET_TO_SIGNED_URL");
Type GetTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == IMPORT_ASSETS_FROM_S3_HASH)
{
return Type::IMPORT_ASSETS_FROM_S3;
}
else if (hashCode == IMPORT_ASSET_FROM_SIGNED_URL_HASH)
{
return Type::IMPORT_ASSET_FROM_SIGNED_URL;
}
else if (hashCode == EXPORT_ASSETS_TO_S3_HASH)
{
return Type::EXPORT_ASSETS_TO_S3;
}
else if (hashCode == EXPORT_ASSET_TO_SIGNED_URL_HASH)
{
return Type::EXPORT_ASSET_TO_SIGNED_URL;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Type>(hashCode);
}
return Type::NOT_SET;
}
Aws::String GetNameForType(Type enumValue)
{
switch(enumValue)
{
case Type::IMPORT_ASSETS_FROM_S3:
return "IMPORT_ASSETS_FROM_S3";
case Type::IMPORT_ASSET_FROM_SIGNED_URL:
return "IMPORT_ASSET_FROM_SIGNED_URL";
case Type::EXPORT_ASSETS_TO_S3:
return "EXPORT_ASSETS_TO_S3";
case Type::EXPORT_ASSET_TO_SIGNED_URL:
return "EXPORT_ASSET_TO_SIGNED_URL";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace TypeMapper
} // namespace Model
} // namespace DataExchange
} // namespace Aws

View File

@@ -0,0 +1,45 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/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::DataExchange::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,38 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/UpdateAssetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateAssetRequest::UpdateAssetRequest() :
m_assetIdHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String UpdateAssetRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,96 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/UpdateAssetResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateAssetResult::UpdateAssetResult() :
m_assetType(AssetType::NOT_SET)
{
}
UpdateAssetResult::UpdateAssetResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_assetType(AssetType::NOT_SET)
{
*this = result;
}
UpdateAssetResult& UpdateAssetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("AssetDetails"))
{
m_assetDetails = jsonValue.GetObject("AssetDetails");
}
if(jsonValue.ValueExists("AssetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("AssetType"));
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("RevisionId"))
{
m_revisionId = jsonValue.GetString("RevisionId");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
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/dataexchange/model/UpdateDataSetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateDataSetRequest::UpdateDataSetRequest() :
m_dataSetIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_nameHasBeenSet(false)
{
}
Aws::String UpdateDataSetRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/UpdateDataSetResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateDataSetResult::UpdateDataSetResult() :
m_assetType(AssetType::NOT_SET),
m_origin(Origin::NOT_SET)
{
}
UpdateDataSetResult::UpdateDataSetResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_assetType(AssetType::NOT_SET),
m_origin(Origin::NOT_SET)
{
*this = result;
}
UpdateDataSetResult& UpdateDataSetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("AssetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("AssetType"));
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Origin"))
{
m_origin = OriginMapper::GetOriginForName(jsonValue.GetString("Origin"));
}
if(jsonValue.ValueExists("OriginDetails"))
{
m_originDetails = jsonValue.GetObject("OriginDetails");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
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/dataexchange/model/UpdateRevisionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateRevisionRequest::UpdateRevisionRequest() :
m_commentHasBeenSet(false),
m_dataSetIdHasBeenSet(false),
m_finalized(false),
m_finalizedHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String UpdateRevisionRequest::SerializePayload() const
{
JsonValue payload;
if(m_commentHasBeenSet)
{
payload.WithString("Comment", m_comment);
}
if(m_finalizedHasBeenSet)
{
payload.WithBool("Finalized", m_finalized);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dataexchange/model/UpdateRevisionResult.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::DataExchange::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateRevisionResult::UpdateRevisionResult() :
m_finalized(false)
{
}
UpdateRevisionResult::UpdateRevisionResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_finalized(false)
{
*this = result;
}
UpdateRevisionResult& UpdateRevisionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Arn"))
{
m_arn = jsonValue.GetString("Arn");
}
if(jsonValue.ValueExists("Comment"))
{
m_comment = jsonValue.GetString("Comment");
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
}
if(jsonValue.ValueExists("DataSetId"))
{
m_dataSetId = jsonValue.GetString("DataSetId");
}
if(jsonValue.ValueExists("Finalized"))
{
m_finalized = jsonValue.GetBool("Finalized");
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("SourceId"))
{
m_sourceId = jsonValue.GetString("SourceId");
}
if(jsonValue.ValueExists("UpdatedAt"))
{
m_updatedAt = jsonValue.GetString("UpdatedAt");
}
return *this;
}