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,544 @@
/**
* 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/license-manager/LicenseManagerClient.h>
#include <aws/license-manager/LicenseManagerEndpoint.h>
#include <aws/license-manager/LicenseManagerErrorMarshaller.h>
#include <aws/license-manager/model/CreateLicenseConfigurationRequest.h>
#include <aws/license-manager/model/DeleteLicenseConfigurationRequest.h>
#include <aws/license-manager/model/GetLicenseConfigurationRequest.h>
#include <aws/license-manager/model/GetServiceSettingsRequest.h>
#include <aws/license-manager/model/ListAssociationsForLicenseConfigurationRequest.h>
#include <aws/license-manager/model/ListFailuresForLicenseConfigurationOperationsRequest.h>
#include <aws/license-manager/model/ListLicenseConfigurationsRequest.h>
#include <aws/license-manager/model/ListLicenseSpecificationsForResourceRequest.h>
#include <aws/license-manager/model/ListResourceInventoryRequest.h>
#include <aws/license-manager/model/ListTagsForResourceRequest.h>
#include <aws/license-manager/model/ListUsageForLicenseConfigurationRequest.h>
#include <aws/license-manager/model/TagResourceRequest.h>
#include <aws/license-manager/model/UntagResourceRequest.h>
#include <aws/license-manager/model/UpdateLicenseConfigurationRequest.h>
#include <aws/license-manager/model/UpdateLicenseSpecificationsForResourceRequest.h>
#include <aws/license-manager/model/UpdateServiceSettingsRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::LicenseManager;
using namespace Aws::LicenseManager::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "license-manager";
static const char* ALLOCATION_TAG = "LicenseManagerClient";
LicenseManagerClient::LicenseManagerClient(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<LicenseManagerErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
LicenseManagerClient::LicenseManagerClient(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<LicenseManagerErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
LicenseManagerClient::LicenseManagerClient(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<LicenseManagerErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
LicenseManagerClient::~LicenseManagerClient()
{
}
void LicenseManagerClient::init(const ClientConfiguration& config)
{
SetServiceClientName("License Manager");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + LicenseManagerEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void LicenseManagerClient::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;
}
}
CreateLicenseConfigurationOutcome LicenseManagerClient::CreateLicenseConfiguration(const CreateLicenseConfigurationRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return CreateLicenseConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateLicenseConfigurationOutcomeCallable LicenseManagerClient::CreateLicenseConfigurationCallable(const CreateLicenseConfigurationRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateLicenseConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateLicenseConfiguration(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::CreateLicenseConfigurationAsync(const CreateLicenseConfigurationRequest& request, const CreateLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateLicenseConfigurationAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::CreateLicenseConfigurationAsyncHelper(const CreateLicenseConfigurationRequest& request, const CreateLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateLicenseConfiguration(request), context);
}
DeleteLicenseConfigurationOutcome LicenseManagerClient::DeleteLicenseConfiguration(const DeleteLicenseConfigurationRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return DeleteLicenseConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DeleteLicenseConfigurationOutcomeCallable LicenseManagerClient::DeleteLicenseConfigurationCallable(const DeleteLicenseConfigurationRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteLicenseConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteLicenseConfiguration(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::DeleteLicenseConfigurationAsync(const DeleteLicenseConfigurationRequest& request, const DeleteLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteLicenseConfigurationAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::DeleteLicenseConfigurationAsyncHelper(const DeleteLicenseConfigurationRequest& request, const DeleteLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteLicenseConfiguration(request), context);
}
GetLicenseConfigurationOutcome LicenseManagerClient::GetLicenseConfiguration(const GetLicenseConfigurationRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return GetLicenseConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
GetLicenseConfigurationOutcomeCallable LicenseManagerClient::GetLicenseConfigurationCallable(const GetLicenseConfigurationRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetLicenseConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetLicenseConfiguration(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::GetLicenseConfigurationAsync(const GetLicenseConfigurationRequest& request, const GetLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetLicenseConfigurationAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::GetLicenseConfigurationAsyncHelper(const GetLicenseConfigurationRequest& request, const GetLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetLicenseConfiguration(request), context);
}
GetServiceSettingsOutcome LicenseManagerClient::GetServiceSettings(const GetServiceSettingsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return GetServiceSettingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
GetServiceSettingsOutcomeCallable LicenseManagerClient::GetServiceSettingsCallable(const GetServiceSettingsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetServiceSettingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetServiceSettings(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::GetServiceSettingsAsync(const GetServiceSettingsRequest& request, const GetServiceSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetServiceSettingsAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::GetServiceSettingsAsyncHelper(const GetServiceSettingsRequest& request, const GetServiceSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetServiceSettings(request), context);
}
ListAssociationsForLicenseConfigurationOutcome LicenseManagerClient::ListAssociationsForLicenseConfiguration(const ListAssociationsForLicenseConfigurationRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListAssociationsForLicenseConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListAssociationsForLicenseConfigurationOutcomeCallable LicenseManagerClient::ListAssociationsForLicenseConfigurationCallable(const ListAssociationsForLicenseConfigurationRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListAssociationsForLicenseConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListAssociationsForLicenseConfiguration(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::ListAssociationsForLicenseConfigurationAsync(const ListAssociationsForLicenseConfigurationRequest& request, const ListAssociationsForLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListAssociationsForLicenseConfigurationAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::ListAssociationsForLicenseConfigurationAsyncHelper(const ListAssociationsForLicenseConfigurationRequest& request, const ListAssociationsForLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListAssociationsForLicenseConfiguration(request), context);
}
ListFailuresForLicenseConfigurationOperationsOutcome LicenseManagerClient::ListFailuresForLicenseConfigurationOperations(const ListFailuresForLicenseConfigurationOperationsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListFailuresForLicenseConfigurationOperationsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListFailuresForLicenseConfigurationOperationsOutcomeCallable LicenseManagerClient::ListFailuresForLicenseConfigurationOperationsCallable(const ListFailuresForLicenseConfigurationOperationsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListFailuresForLicenseConfigurationOperationsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListFailuresForLicenseConfigurationOperations(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::ListFailuresForLicenseConfigurationOperationsAsync(const ListFailuresForLicenseConfigurationOperationsRequest& request, const ListFailuresForLicenseConfigurationOperationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListFailuresForLicenseConfigurationOperationsAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::ListFailuresForLicenseConfigurationOperationsAsyncHelper(const ListFailuresForLicenseConfigurationOperationsRequest& request, const ListFailuresForLicenseConfigurationOperationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListFailuresForLicenseConfigurationOperations(request), context);
}
ListLicenseConfigurationsOutcome LicenseManagerClient::ListLicenseConfigurations(const ListLicenseConfigurationsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListLicenseConfigurationsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListLicenseConfigurationsOutcomeCallable LicenseManagerClient::ListLicenseConfigurationsCallable(const ListLicenseConfigurationsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListLicenseConfigurationsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListLicenseConfigurations(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::ListLicenseConfigurationsAsync(const ListLicenseConfigurationsRequest& request, const ListLicenseConfigurationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListLicenseConfigurationsAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::ListLicenseConfigurationsAsyncHelper(const ListLicenseConfigurationsRequest& request, const ListLicenseConfigurationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListLicenseConfigurations(request), context);
}
ListLicenseSpecificationsForResourceOutcome LicenseManagerClient::ListLicenseSpecificationsForResource(const ListLicenseSpecificationsForResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListLicenseSpecificationsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListLicenseSpecificationsForResourceOutcomeCallable LicenseManagerClient::ListLicenseSpecificationsForResourceCallable(const ListLicenseSpecificationsForResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListLicenseSpecificationsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListLicenseSpecificationsForResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::ListLicenseSpecificationsForResourceAsync(const ListLicenseSpecificationsForResourceRequest& request, const ListLicenseSpecificationsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListLicenseSpecificationsForResourceAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::ListLicenseSpecificationsForResourceAsyncHelper(const ListLicenseSpecificationsForResourceRequest& request, const ListLicenseSpecificationsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListLicenseSpecificationsForResource(request), context);
}
ListResourceInventoryOutcome LicenseManagerClient::ListResourceInventory(const ListResourceInventoryRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListResourceInventoryOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListResourceInventoryOutcomeCallable LicenseManagerClient::ListResourceInventoryCallable(const ListResourceInventoryRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListResourceInventoryOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListResourceInventory(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::ListResourceInventoryAsync(const ListResourceInventoryRequest& request, const ListResourceInventoryResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListResourceInventoryAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::ListResourceInventoryAsyncHelper(const ListResourceInventoryRequest& request, const ListResourceInventoryResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListResourceInventory(request), context);
}
ListTagsForResourceOutcome LicenseManagerClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListTagsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListTagsForResourceOutcomeCallable LicenseManagerClient::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 LicenseManagerClient::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 LicenseManagerClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListTagsForResource(request), context);
}
ListUsageForLicenseConfigurationOutcome LicenseManagerClient::ListUsageForLicenseConfiguration(const ListUsageForLicenseConfigurationRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListUsageForLicenseConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListUsageForLicenseConfigurationOutcomeCallable LicenseManagerClient::ListUsageForLicenseConfigurationCallable(const ListUsageForLicenseConfigurationRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListUsageForLicenseConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListUsageForLicenseConfiguration(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::ListUsageForLicenseConfigurationAsync(const ListUsageForLicenseConfigurationRequest& request, const ListUsageForLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListUsageForLicenseConfigurationAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::ListUsageForLicenseConfigurationAsyncHelper(const ListUsageForLicenseConfigurationRequest& request, const ListUsageForLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListUsageForLicenseConfiguration(request), context);
}
TagResourceOutcome LicenseManagerClient::TagResource(const TagResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return TagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
TagResourceOutcomeCallable LicenseManagerClient::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 LicenseManagerClient::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 LicenseManagerClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, TagResource(request), context);
}
UntagResourceOutcome LicenseManagerClient::UntagResource(const UntagResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return UntagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UntagResourceOutcomeCallable LicenseManagerClient::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 LicenseManagerClient::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 LicenseManagerClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UntagResource(request), context);
}
UpdateLicenseConfigurationOutcome LicenseManagerClient::UpdateLicenseConfiguration(const UpdateLicenseConfigurationRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return UpdateLicenseConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UpdateLicenseConfigurationOutcomeCallable LicenseManagerClient::UpdateLicenseConfigurationCallable(const UpdateLicenseConfigurationRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateLicenseConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateLicenseConfiguration(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::UpdateLicenseConfigurationAsync(const UpdateLicenseConfigurationRequest& request, const UpdateLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateLicenseConfigurationAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::UpdateLicenseConfigurationAsyncHelper(const UpdateLicenseConfigurationRequest& request, const UpdateLicenseConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateLicenseConfiguration(request), context);
}
UpdateLicenseSpecificationsForResourceOutcome LicenseManagerClient::UpdateLicenseSpecificationsForResource(const UpdateLicenseSpecificationsForResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return UpdateLicenseSpecificationsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UpdateLicenseSpecificationsForResourceOutcomeCallable LicenseManagerClient::UpdateLicenseSpecificationsForResourceCallable(const UpdateLicenseSpecificationsForResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateLicenseSpecificationsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateLicenseSpecificationsForResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::UpdateLicenseSpecificationsForResourceAsync(const UpdateLicenseSpecificationsForResourceRequest& request, const UpdateLicenseSpecificationsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateLicenseSpecificationsForResourceAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::UpdateLicenseSpecificationsForResourceAsyncHelper(const UpdateLicenseSpecificationsForResourceRequest& request, const UpdateLicenseSpecificationsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateLicenseSpecificationsForResource(request), context);
}
UpdateServiceSettingsOutcome LicenseManagerClient::UpdateServiceSettings(const UpdateServiceSettingsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return UpdateServiceSettingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UpdateServiceSettingsOutcomeCallable LicenseManagerClient::UpdateServiceSettingsCallable(const UpdateServiceSettingsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateServiceSettingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateServiceSettings(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LicenseManagerClient::UpdateServiceSettingsAsync(const UpdateServiceSettingsRequest& request, const UpdateServiceSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateServiceSettingsAsyncHelper( request, handler, context ); } );
}
void LicenseManagerClient::UpdateServiceSettingsAsyncHelper(const UpdateServiceSettingsRequest& request, const UpdateServiceSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateServiceSettings(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/license-manager/LicenseManagerEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::LicenseManager;
namespace Aws
{
namespace LicenseManager
{
namespace LicenseManagerEndpoint
{
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 << "license-manager" << ".";
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 LicenseManagerEndpoint
} // namespace LicenseManager
} // 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/license-manager/LicenseManagerErrorMarshaller.h>
#include <aws/license-manager/LicenseManagerErrors.h>
using namespace Aws::Client;
using namespace Aws::LicenseManager;
AWSError<CoreErrors> LicenseManagerErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = LicenseManagerErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,72 @@
/**
* 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/license-manager/LicenseManagerErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::LicenseManager;
namespace Aws
{
namespace LicenseManager
{
namespace LicenseManagerErrorMapper
{
static const int SERVER_INTERNAL_HASH = HashingUtils::HashString("ServerInternalException");
static const int AUTHORIZATION_HASH = HashingUtils::HashString("AuthorizationException");
static const int FAILED_DEPENDENCY_HASH = HashingUtils::HashString("FailedDependencyException");
static const int LICENSE_USAGE_HASH = HashingUtils::HashString("LicenseUsageException");
static const int RESOURCE_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ResourceLimitExceededException");
static const int RATE_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("RateLimitExceededException");
static const int INVALID_RESOURCE_STATE_HASH = HashingUtils::HashString("InvalidResourceStateException");
static const int FILTER_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("FilterLimitExceededException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == SERVER_INTERNAL_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::SERVER_INTERNAL), false);
}
else if (hashCode == AUTHORIZATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::AUTHORIZATION), false);
}
else if (hashCode == FAILED_DEPENDENCY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::FAILED_DEPENDENCY), false);
}
else if (hashCode == LICENSE_USAGE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::LICENSE_USAGE), false);
}
else if (hashCode == RESOURCE_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::RESOURCE_LIMIT_EXCEEDED), false);
}
else if (hashCode == RATE_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::RATE_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_RESOURCE_STATE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::INVALID_RESOURCE_STATE), false);
}
else if (hashCode == FILTER_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LicenseManagerErrors::FILTER_LIMIT_EXCEEDED), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace LicenseManagerErrorMapper
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/AutomatedDiscoveryInformation.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
AutomatedDiscoveryInformation::AutomatedDiscoveryInformation() :
m_lastRunTimeHasBeenSet(false)
{
}
AutomatedDiscoveryInformation::AutomatedDiscoveryInformation(JsonView jsonValue) :
m_lastRunTimeHasBeenSet(false)
{
*this = jsonValue;
}
AutomatedDiscoveryInformation& AutomatedDiscoveryInformation::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("LastRunTime"))
{
m_lastRunTime = jsonValue.GetDouble("LastRunTime");
m_lastRunTimeHasBeenSet = true;
}
return *this;
}
JsonValue AutomatedDiscoveryInformation::Jsonize() const
{
JsonValue payload;
if(m_lastRunTimeHasBeenSet)
{
payload.WithDouble("LastRunTime", m_lastRunTime.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ConsumedLicenseSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
ConsumedLicenseSummary::ConsumedLicenseSummary() :
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_consumedLicenses(0),
m_consumedLicensesHasBeenSet(false)
{
}
ConsumedLicenseSummary::ConsumedLicenseSummary(JsonView jsonValue) :
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_consumedLicenses(0),
m_consumedLicensesHasBeenSet(false)
{
*this = jsonValue;
}
ConsumedLicenseSummary& ConsumedLicenseSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ConsumedLicenses"))
{
m_consumedLicenses = jsonValue.GetInt64("ConsumedLicenses");
m_consumedLicensesHasBeenSet = true;
}
return *this;
}
JsonValue ConsumedLicenseSummary::Jsonize() const
{
JsonValue payload;
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_consumedLicensesHasBeenSet)
{
payload.WithInt64("ConsumedLicenses", m_consumedLicenses);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,109 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/CreateLicenseConfigurationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateLicenseConfigurationRequest::CreateLicenseConfigurationRequest() :
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_licenseCountingType(LicenseCountingType::NOT_SET),
m_licenseCountingTypeHasBeenSet(false),
m_licenseCount(0),
m_licenseCountHasBeenSet(false),
m_licenseCountHardLimit(false),
m_licenseCountHardLimitHasBeenSet(false),
m_licenseRulesHasBeenSet(false),
m_tagsHasBeenSet(false),
m_productInformationListHasBeenSet(false)
{
}
Aws::String CreateLicenseConfigurationRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_licenseCountingTypeHasBeenSet)
{
payload.WithString("LicenseCountingType", LicenseCountingTypeMapper::GetNameForLicenseCountingType(m_licenseCountingType));
}
if(m_licenseCountHasBeenSet)
{
payload.WithInt64("LicenseCount", m_licenseCount);
}
if(m_licenseCountHardLimitHasBeenSet)
{
payload.WithBool("LicenseCountHardLimit", m_licenseCountHardLimit);
}
if(m_licenseRulesHasBeenSet)
{
Array<JsonValue> licenseRulesJsonList(m_licenseRules.size());
for(unsigned licenseRulesIndex = 0; licenseRulesIndex < licenseRulesJsonList.GetLength(); ++licenseRulesIndex)
{
licenseRulesJsonList[licenseRulesIndex].AsString(m_licenseRules[licenseRulesIndex]);
}
payload.WithArray("LicenseRules", std::move(licenseRulesJsonList));
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("Tags", std::move(tagsJsonList));
}
if(m_productInformationListHasBeenSet)
{
Array<JsonValue> productInformationListJsonList(m_productInformationList.size());
for(unsigned productInformationListIndex = 0; productInformationListIndex < productInformationListJsonList.GetLength(); ++productInformationListIndex)
{
productInformationListJsonList[productInformationListIndex].AsObject(m_productInformationList[productInformationListIndex].Jsonize());
}
payload.WithArray("ProductInformationList", std::move(productInformationListJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateLicenseConfigurationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.CreateLicenseConfiguration"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/CreateLicenseConfigurationResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateLicenseConfigurationResult::CreateLicenseConfigurationResult()
{
}
CreateLicenseConfigurationResult::CreateLicenseConfigurationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateLicenseConfigurationResult& CreateLicenseConfigurationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("LicenseConfigurationArn"))
{
m_licenseConfigurationArn = jsonValue.GetString("LicenseConfigurationArn");
}
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/license-manager/model/DeleteLicenseConfigurationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteLicenseConfigurationRequest::DeleteLicenseConfigurationRequest() :
m_licenseConfigurationArnHasBeenSet(false)
{
}
Aws::String DeleteLicenseConfigurationRequest::SerializePayload() const
{
JsonValue payload;
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteLicenseConfigurationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.DeleteLicenseConfiguration"));
return headers;
}

View File

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

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/Filter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
Filter::Filter() :
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
Filter::Filter(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
Filter& Filter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("Values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue Filter::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("Values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/GetLicenseConfigurationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetLicenseConfigurationRequest::GetLicenseConfigurationRequest() :
m_licenseConfigurationArnHasBeenSet(false)
{
}
Aws::String GetLicenseConfigurationRequest::SerializePayload() const
{
JsonValue payload;
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetLicenseConfigurationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.GetLicenseConfiguration"));
return headers;
}

View File

@@ -0,0 +1,153 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/GetLicenseConfigurationResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetLicenseConfigurationResult::GetLicenseConfigurationResult() :
m_licenseCountingType(LicenseCountingType::NOT_SET),
m_licenseCount(0),
m_licenseCountHardLimit(false),
m_consumedLicenses(0)
{
}
GetLicenseConfigurationResult::GetLicenseConfigurationResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_licenseCountingType(LicenseCountingType::NOT_SET),
m_licenseCount(0),
m_licenseCountHardLimit(false),
m_consumedLicenses(0)
{
*this = result;
}
GetLicenseConfigurationResult& GetLicenseConfigurationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("LicenseConfigurationId"))
{
m_licenseConfigurationId = jsonValue.GetString("LicenseConfigurationId");
}
if(jsonValue.ValueExists("LicenseConfigurationArn"))
{
m_licenseConfigurationArn = jsonValue.GetString("LicenseConfigurationArn");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
}
if(jsonValue.ValueExists("LicenseCountingType"))
{
m_licenseCountingType = LicenseCountingTypeMapper::GetLicenseCountingTypeForName(jsonValue.GetString("LicenseCountingType"));
}
if(jsonValue.ValueExists("LicenseRules"))
{
Array<JsonView> licenseRulesJsonList = jsonValue.GetArray("LicenseRules");
for(unsigned licenseRulesIndex = 0; licenseRulesIndex < licenseRulesJsonList.GetLength(); ++licenseRulesIndex)
{
m_licenseRules.push_back(licenseRulesJsonList[licenseRulesIndex].AsString());
}
}
if(jsonValue.ValueExists("LicenseCount"))
{
m_licenseCount = jsonValue.GetInt64("LicenseCount");
}
if(jsonValue.ValueExists("LicenseCountHardLimit"))
{
m_licenseCountHardLimit = jsonValue.GetBool("LicenseCountHardLimit");
}
if(jsonValue.ValueExists("ConsumedLicenses"))
{
m_consumedLicenses = jsonValue.GetInt64("ConsumedLicenses");
}
if(jsonValue.ValueExists("Status"))
{
m_status = jsonValue.GetString("Status");
}
if(jsonValue.ValueExists("OwnerAccountId"))
{
m_ownerAccountId = jsonValue.GetString("OwnerAccountId");
}
if(jsonValue.ValueExists("ConsumedLicenseSummaryList"))
{
Array<JsonView> consumedLicenseSummaryListJsonList = jsonValue.GetArray("ConsumedLicenseSummaryList");
for(unsigned consumedLicenseSummaryListIndex = 0; consumedLicenseSummaryListIndex < consumedLicenseSummaryListJsonList.GetLength(); ++consumedLicenseSummaryListIndex)
{
m_consumedLicenseSummaryList.push_back(consumedLicenseSummaryListJsonList[consumedLicenseSummaryListIndex].AsObject());
}
}
if(jsonValue.ValueExists("ManagedResourceSummaryList"))
{
Array<JsonView> managedResourceSummaryListJsonList = jsonValue.GetArray("ManagedResourceSummaryList");
for(unsigned managedResourceSummaryListIndex = 0; managedResourceSummaryListIndex < managedResourceSummaryListJsonList.GetLength(); ++managedResourceSummaryListIndex)
{
m_managedResourceSummaryList.push_back(managedResourceSummaryListJsonList[managedResourceSummaryListIndex].AsObject());
}
}
if(jsonValue.ValueExists("Tags"))
{
Array<JsonView> tagsJsonList = jsonValue.GetArray("Tags");
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
m_tags.push_back(tagsJsonList[tagsIndex].AsObject());
}
}
if(jsonValue.ValueExists("ProductInformationList"))
{
Array<JsonView> productInformationListJsonList = jsonValue.GetArray("ProductInformationList");
for(unsigned productInformationListIndex = 0; productInformationListIndex < productInformationListJsonList.GetLength(); ++productInformationListIndex)
{
m_productInformationList.push_back(productInformationListJsonList[productInformationListIndex].AsObject());
}
}
if(jsonValue.ValueExists("AutomatedDiscoveryInformation"))
{
m_automatedDiscoveryInformation = jsonValue.GetObject("AutomatedDiscoveryInformation");
}
return *this;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/GetServiceSettingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetServiceSettingsRequest::GetServiceSettingsRequest()
{
}
Aws::String GetServiceSettingsRequest::SerializePayload() const
{
return "{}";
}
Aws::Http::HeaderValueCollection GetServiceSettingsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.GetServiceSettings"));
return headers;
}

View File

@@ -0,0 +1,66 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/GetServiceSettingsResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetServiceSettingsResult::GetServiceSettingsResult() :
m_enableCrossAccountsDiscovery(false)
{
}
GetServiceSettingsResult::GetServiceSettingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_enableCrossAccountsDiscovery(false)
{
*this = result;
}
GetServiceSettingsResult& GetServiceSettingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("S3BucketArn"))
{
m_s3BucketArn = jsonValue.GetString("S3BucketArn");
}
if(jsonValue.ValueExists("SnsTopicArn"))
{
m_snsTopicArn = jsonValue.GetString("SnsTopicArn");
}
if(jsonValue.ValueExists("OrganizationConfiguration"))
{
m_organizationConfiguration = jsonValue.GetObject("OrganizationConfiguration");
}
if(jsonValue.ValueExists("EnableCrossAccountsDiscovery"))
{
m_enableCrossAccountsDiscovery = jsonValue.GetBool("EnableCrossAccountsDiscovery");
}
if(jsonValue.ValueExists("LicenseManagerResourceShareArn"))
{
m_licenseManagerResourceShareArn = jsonValue.GetString("LicenseManagerResourceShareArn");
}
return *this;
}

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/InventoryFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
InventoryFilter::InventoryFilter() :
m_nameHasBeenSet(false),
m_condition(InventoryFilterCondition::NOT_SET),
m_conditionHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
InventoryFilter::InventoryFilter(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_condition(InventoryFilterCondition::NOT_SET),
m_conditionHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
InventoryFilter& InventoryFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Condition"))
{
m_condition = InventoryFilterConditionMapper::GetInventoryFilterConditionForName(jsonValue.GetString("Condition"));
m_conditionHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue InventoryFilter::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_conditionHasBeenSet)
{
payload.WithString("Condition", InventoryFilterConditionMapper::GetNameForInventoryFilterCondition(m_condition));
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/InventoryFilterCondition.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 LicenseManager
{
namespace Model
{
namespace InventoryFilterConditionMapper
{
static const int EQUALS_HASH = HashingUtils::HashString("EQUALS");
static const int NOT_EQUALS_HASH = HashingUtils::HashString("NOT_EQUALS");
static const int BEGINS_WITH_HASH = HashingUtils::HashString("BEGINS_WITH");
static const int CONTAINS_HASH = HashingUtils::HashString("CONTAINS");
InventoryFilterCondition GetInventoryFilterConditionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EQUALS_HASH)
{
return InventoryFilterCondition::EQUALS;
}
else if (hashCode == NOT_EQUALS_HASH)
{
return InventoryFilterCondition::NOT_EQUALS;
}
else if (hashCode == BEGINS_WITH_HASH)
{
return InventoryFilterCondition::BEGINS_WITH;
}
else if (hashCode == CONTAINS_HASH)
{
return InventoryFilterCondition::CONTAINS;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<InventoryFilterCondition>(hashCode);
}
return InventoryFilterCondition::NOT_SET;
}
Aws::String GetNameForInventoryFilterCondition(InventoryFilterCondition enumValue)
{
switch(enumValue)
{
case InventoryFilterCondition::EQUALS:
return "EQUALS";
case InventoryFilterCondition::NOT_EQUALS:
return "NOT_EQUALS";
case InventoryFilterCondition::BEGINS_WITH:
return "BEGINS_WITH";
case InventoryFilterCondition::CONTAINS:
return "CONTAINS";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace InventoryFilterConditionMapper
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,308 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/LicenseConfiguration.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
LicenseConfiguration::LicenseConfiguration() :
m_licenseConfigurationIdHasBeenSet(false),
m_licenseConfigurationArnHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_licenseCountingType(LicenseCountingType::NOT_SET),
m_licenseCountingTypeHasBeenSet(false),
m_licenseRulesHasBeenSet(false),
m_licenseCount(0),
m_licenseCountHasBeenSet(false),
m_licenseCountHardLimit(false),
m_licenseCountHardLimitHasBeenSet(false),
m_consumedLicenses(0),
m_consumedLicensesHasBeenSet(false),
m_statusHasBeenSet(false),
m_ownerAccountIdHasBeenSet(false),
m_consumedLicenseSummaryListHasBeenSet(false),
m_managedResourceSummaryListHasBeenSet(false),
m_productInformationListHasBeenSet(false),
m_automatedDiscoveryInformationHasBeenSet(false)
{
}
LicenseConfiguration::LicenseConfiguration(JsonView jsonValue) :
m_licenseConfigurationIdHasBeenSet(false),
m_licenseConfigurationArnHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_licenseCountingType(LicenseCountingType::NOT_SET),
m_licenseCountingTypeHasBeenSet(false),
m_licenseRulesHasBeenSet(false),
m_licenseCount(0),
m_licenseCountHasBeenSet(false),
m_licenseCountHardLimit(false),
m_licenseCountHardLimitHasBeenSet(false),
m_consumedLicenses(0),
m_consumedLicensesHasBeenSet(false),
m_statusHasBeenSet(false),
m_ownerAccountIdHasBeenSet(false),
m_consumedLicenseSummaryListHasBeenSet(false),
m_managedResourceSummaryListHasBeenSet(false),
m_productInformationListHasBeenSet(false),
m_automatedDiscoveryInformationHasBeenSet(false)
{
*this = jsonValue;
}
LicenseConfiguration& LicenseConfiguration::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("LicenseConfigurationId"))
{
m_licenseConfigurationId = jsonValue.GetString("LicenseConfigurationId");
m_licenseConfigurationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("LicenseConfigurationArn"))
{
m_licenseConfigurationArn = jsonValue.GetString("LicenseConfigurationArn");
m_licenseConfigurationArnHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("LicenseCountingType"))
{
m_licenseCountingType = LicenseCountingTypeMapper::GetLicenseCountingTypeForName(jsonValue.GetString("LicenseCountingType"));
m_licenseCountingTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("LicenseRules"))
{
Array<JsonView> licenseRulesJsonList = jsonValue.GetArray("LicenseRules");
for(unsigned licenseRulesIndex = 0; licenseRulesIndex < licenseRulesJsonList.GetLength(); ++licenseRulesIndex)
{
m_licenseRules.push_back(licenseRulesJsonList[licenseRulesIndex].AsString());
}
m_licenseRulesHasBeenSet = true;
}
if(jsonValue.ValueExists("LicenseCount"))
{
m_licenseCount = jsonValue.GetInt64("LicenseCount");
m_licenseCountHasBeenSet = true;
}
if(jsonValue.ValueExists("LicenseCountHardLimit"))
{
m_licenseCountHardLimit = jsonValue.GetBool("LicenseCountHardLimit");
m_licenseCountHardLimitHasBeenSet = true;
}
if(jsonValue.ValueExists("ConsumedLicenses"))
{
m_consumedLicenses = jsonValue.GetInt64("ConsumedLicenses");
m_consumedLicensesHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = jsonValue.GetString("Status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("OwnerAccountId"))
{
m_ownerAccountId = jsonValue.GetString("OwnerAccountId");
m_ownerAccountIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ConsumedLicenseSummaryList"))
{
Array<JsonView> consumedLicenseSummaryListJsonList = jsonValue.GetArray("ConsumedLicenseSummaryList");
for(unsigned consumedLicenseSummaryListIndex = 0; consumedLicenseSummaryListIndex < consumedLicenseSummaryListJsonList.GetLength(); ++consumedLicenseSummaryListIndex)
{
m_consumedLicenseSummaryList.push_back(consumedLicenseSummaryListJsonList[consumedLicenseSummaryListIndex].AsObject());
}
m_consumedLicenseSummaryListHasBeenSet = true;
}
if(jsonValue.ValueExists("ManagedResourceSummaryList"))
{
Array<JsonView> managedResourceSummaryListJsonList = jsonValue.GetArray("ManagedResourceSummaryList");
for(unsigned managedResourceSummaryListIndex = 0; managedResourceSummaryListIndex < managedResourceSummaryListJsonList.GetLength(); ++managedResourceSummaryListIndex)
{
m_managedResourceSummaryList.push_back(managedResourceSummaryListJsonList[managedResourceSummaryListIndex].AsObject());
}
m_managedResourceSummaryListHasBeenSet = true;
}
if(jsonValue.ValueExists("ProductInformationList"))
{
Array<JsonView> productInformationListJsonList = jsonValue.GetArray("ProductInformationList");
for(unsigned productInformationListIndex = 0; productInformationListIndex < productInformationListJsonList.GetLength(); ++productInformationListIndex)
{
m_productInformationList.push_back(productInformationListJsonList[productInformationListIndex].AsObject());
}
m_productInformationListHasBeenSet = true;
}
if(jsonValue.ValueExists("AutomatedDiscoveryInformation"))
{
m_automatedDiscoveryInformation = jsonValue.GetObject("AutomatedDiscoveryInformation");
m_automatedDiscoveryInformationHasBeenSet = true;
}
return *this;
}
JsonValue LicenseConfiguration::Jsonize() const
{
JsonValue payload;
if(m_licenseConfigurationIdHasBeenSet)
{
payload.WithString("LicenseConfigurationId", m_licenseConfigurationId);
}
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_licenseCountingTypeHasBeenSet)
{
payload.WithString("LicenseCountingType", LicenseCountingTypeMapper::GetNameForLicenseCountingType(m_licenseCountingType));
}
if(m_licenseRulesHasBeenSet)
{
Array<JsonValue> licenseRulesJsonList(m_licenseRules.size());
for(unsigned licenseRulesIndex = 0; licenseRulesIndex < licenseRulesJsonList.GetLength(); ++licenseRulesIndex)
{
licenseRulesJsonList[licenseRulesIndex].AsString(m_licenseRules[licenseRulesIndex]);
}
payload.WithArray("LicenseRules", std::move(licenseRulesJsonList));
}
if(m_licenseCountHasBeenSet)
{
payload.WithInt64("LicenseCount", m_licenseCount);
}
if(m_licenseCountHardLimitHasBeenSet)
{
payload.WithBool("LicenseCountHardLimit", m_licenseCountHardLimit);
}
if(m_consumedLicensesHasBeenSet)
{
payload.WithInt64("ConsumedLicenses", m_consumedLicenses);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", m_status);
}
if(m_ownerAccountIdHasBeenSet)
{
payload.WithString("OwnerAccountId", m_ownerAccountId);
}
if(m_consumedLicenseSummaryListHasBeenSet)
{
Array<JsonValue> consumedLicenseSummaryListJsonList(m_consumedLicenseSummaryList.size());
for(unsigned consumedLicenseSummaryListIndex = 0; consumedLicenseSummaryListIndex < consumedLicenseSummaryListJsonList.GetLength(); ++consumedLicenseSummaryListIndex)
{
consumedLicenseSummaryListJsonList[consumedLicenseSummaryListIndex].AsObject(m_consumedLicenseSummaryList[consumedLicenseSummaryListIndex].Jsonize());
}
payload.WithArray("ConsumedLicenseSummaryList", std::move(consumedLicenseSummaryListJsonList));
}
if(m_managedResourceSummaryListHasBeenSet)
{
Array<JsonValue> managedResourceSummaryListJsonList(m_managedResourceSummaryList.size());
for(unsigned managedResourceSummaryListIndex = 0; managedResourceSummaryListIndex < managedResourceSummaryListJsonList.GetLength(); ++managedResourceSummaryListIndex)
{
managedResourceSummaryListJsonList[managedResourceSummaryListIndex].AsObject(m_managedResourceSummaryList[managedResourceSummaryListIndex].Jsonize());
}
payload.WithArray("ManagedResourceSummaryList", std::move(managedResourceSummaryListJsonList));
}
if(m_productInformationListHasBeenSet)
{
Array<JsonValue> productInformationListJsonList(m_productInformationList.size());
for(unsigned productInformationListIndex = 0; productInformationListIndex < productInformationListJsonList.GetLength(); ++productInformationListIndex)
{
productInformationListJsonList[productInformationListIndex].AsObject(m_productInformationList[productInformationListIndex].Jsonize());
}
payload.WithArray("ProductInformationList", std::move(productInformationListJsonList));
}
if(m_automatedDiscoveryInformationHasBeenSet)
{
payload.WithObject("AutomatedDiscoveryInformation", m_automatedDiscoveryInformation.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/LicenseConfigurationAssociation.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
LicenseConfigurationAssociation::LicenseConfigurationAssociation() :
m_resourceArnHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceOwnerIdHasBeenSet(false),
m_associationTimeHasBeenSet(false)
{
}
LicenseConfigurationAssociation::LicenseConfigurationAssociation(JsonView jsonValue) :
m_resourceArnHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceOwnerIdHasBeenSet(false),
m_associationTimeHasBeenSet(false)
{
*this = jsonValue;
}
LicenseConfigurationAssociation& LicenseConfigurationAssociation::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceOwnerId"))
{
m_resourceOwnerId = jsonValue.GetString("ResourceOwnerId");
m_resourceOwnerIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationTime"))
{
m_associationTime = jsonValue.GetDouble("AssociationTime");
m_associationTimeHasBeenSet = true;
}
return *this;
}
JsonValue LicenseConfigurationAssociation::Jsonize() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_resourceOwnerIdHasBeenSet)
{
payload.WithString("ResourceOwnerId", m_resourceOwnerId);
}
if(m_associationTimeHasBeenSet)
{
payload.WithDouble("AssociationTime", m_associationTime.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/LicenseConfigurationStatus.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 LicenseManager
{
namespace Model
{
namespace LicenseConfigurationStatusMapper
{
static const int AVAILABLE_HASH = HashingUtils::HashString("AVAILABLE");
static const int DISABLED_HASH = HashingUtils::HashString("DISABLED");
LicenseConfigurationStatus GetLicenseConfigurationStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == AVAILABLE_HASH)
{
return LicenseConfigurationStatus::AVAILABLE;
}
else if (hashCode == DISABLED_HASH)
{
return LicenseConfigurationStatus::DISABLED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<LicenseConfigurationStatus>(hashCode);
}
return LicenseConfigurationStatus::NOT_SET;
}
Aws::String GetNameForLicenseConfigurationStatus(LicenseConfigurationStatus enumValue)
{
switch(enumValue)
{
case LicenseConfigurationStatus::AVAILABLE:
return "AVAILABLE";
case LicenseConfigurationStatus::DISABLED:
return "DISABLED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace LicenseConfigurationStatusMapper
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,136 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/LicenseConfigurationUsage.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
LicenseConfigurationUsage::LicenseConfigurationUsage() :
m_resourceArnHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceStatusHasBeenSet(false),
m_resourceOwnerIdHasBeenSet(false),
m_associationTimeHasBeenSet(false),
m_consumedLicenses(0),
m_consumedLicensesHasBeenSet(false)
{
}
LicenseConfigurationUsage::LicenseConfigurationUsage(JsonView jsonValue) :
m_resourceArnHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceStatusHasBeenSet(false),
m_resourceOwnerIdHasBeenSet(false),
m_associationTimeHasBeenSet(false),
m_consumedLicenses(0),
m_consumedLicensesHasBeenSet(false)
{
*this = jsonValue;
}
LicenseConfigurationUsage& LicenseConfigurationUsage::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceStatus"))
{
m_resourceStatus = jsonValue.GetString("ResourceStatus");
m_resourceStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceOwnerId"))
{
m_resourceOwnerId = jsonValue.GetString("ResourceOwnerId");
m_resourceOwnerIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationTime"))
{
m_associationTime = jsonValue.GetDouble("AssociationTime");
m_associationTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("ConsumedLicenses"))
{
m_consumedLicenses = jsonValue.GetInt64("ConsumedLicenses");
m_consumedLicensesHasBeenSet = true;
}
return *this;
}
JsonValue LicenseConfigurationUsage::Jsonize() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_resourceStatusHasBeenSet)
{
payload.WithString("ResourceStatus", m_resourceStatus);
}
if(m_resourceOwnerIdHasBeenSet)
{
payload.WithString("ResourceOwnerId", m_resourceOwnerId);
}
if(m_associationTimeHasBeenSet)
{
payload.WithDouble("AssociationTime", m_associationTime.SecondsWithMSPrecision());
}
if(m_consumedLicensesHasBeenSet)
{
payload.WithInt64("ConsumedLicenses", m_consumedLicenses);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/LicenseCountingType.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 LicenseManager
{
namespace Model
{
namespace LicenseCountingTypeMapper
{
static const int vCPU_HASH = HashingUtils::HashString("vCPU");
static const int Instance_HASH = HashingUtils::HashString("Instance");
static const int Core_HASH = HashingUtils::HashString("Core");
static const int Socket_HASH = HashingUtils::HashString("Socket");
LicenseCountingType GetLicenseCountingTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == vCPU_HASH)
{
return LicenseCountingType::vCPU;
}
else if (hashCode == Instance_HASH)
{
return LicenseCountingType::Instance;
}
else if (hashCode == Core_HASH)
{
return LicenseCountingType::Core;
}
else if (hashCode == Socket_HASH)
{
return LicenseCountingType::Socket;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<LicenseCountingType>(hashCode);
}
return LicenseCountingType::NOT_SET;
}
Aws::String GetNameForLicenseCountingType(LicenseCountingType enumValue)
{
switch(enumValue)
{
case LicenseCountingType::vCPU:
return "vCPU";
case LicenseCountingType::Instance:
return "Instance";
case LicenseCountingType::Core:
return "Core";
case LicenseCountingType::Socket:
return "Socket";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace LicenseCountingTypeMapper
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/LicenseOperationFailure.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
LicenseOperationFailure::LicenseOperationFailure() :
m_resourceArnHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_errorMessageHasBeenSet(false),
m_failureTimeHasBeenSet(false),
m_operationNameHasBeenSet(false),
m_resourceOwnerIdHasBeenSet(false),
m_operationRequestedByHasBeenSet(false),
m_metadataListHasBeenSet(false)
{
}
LicenseOperationFailure::LicenseOperationFailure(JsonView jsonValue) :
m_resourceArnHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_errorMessageHasBeenSet(false),
m_failureTimeHasBeenSet(false),
m_operationNameHasBeenSet(false),
m_resourceOwnerIdHasBeenSet(false),
m_operationRequestedByHasBeenSet(false),
m_metadataListHasBeenSet(false)
{
*this = jsonValue;
}
LicenseOperationFailure& LicenseOperationFailure::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ErrorMessage"))
{
m_errorMessage = jsonValue.GetString("ErrorMessage");
m_errorMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("FailureTime"))
{
m_failureTime = jsonValue.GetDouble("FailureTime");
m_failureTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("OperationName"))
{
m_operationName = jsonValue.GetString("OperationName");
m_operationNameHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceOwnerId"))
{
m_resourceOwnerId = jsonValue.GetString("ResourceOwnerId");
m_resourceOwnerIdHasBeenSet = true;
}
if(jsonValue.ValueExists("OperationRequestedBy"))
{
m_operationRequestedBy = jsonValue.GetString("OperationRequestedBy");
m_operationRequestedByHasBeenSet = true;
}
if(jsonValue.ValueExists("MetadataList"))
{
Array<JsonView> metadataListJsonList = jsonValue.GetArray("MetadataList");
for(unsigned metadataListIndex = 0; metadataListIndex < metadataListJsonList.GetLength(); ++metadataListIndex)
{
m_metadataList.push_back(metadataListJsonList[metadataListIndex].AsObject());
}
m_metadataListHasBeenSet = true;
}
return *this;
}
JsonValue LicenseOperationFailure::Jsonize() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_errorMessageHasBeenSet)
{
payload.WithString("ErrorMessage", m_errorMessage);
}
if(m_failureTimeHasBeenSet)
{
payload.WithDouble("FailureTime", m_failureTime.SecondsWithMSPrecision());
}
if(m_operationNameHasBeenSet)
{
payload.WithString("OperationName", m_operationName);
}
if(m_resourceOwnerIdHasBeenSet)
{
payload.WithString("ResourceOwnerId", m_resourceOwnerId);
}
if(m_operationRequestedByHasBeenSet)
{
payload.WithString("OperationRequestedBy", m_operationRequestedBy);
}
if(m_metadataListHasBeenSet)
{
Array<JsonValue> metadataListJsonList(m_metadataList.size());
for(unsigned metadataListIndex = 0; metadataListIndex < metadataListJsonList.GetLength(); ++metadataListIndex)
{
metadataListJsonList[metadataListIndex].AsObject(m_metadataList[metadataListIndex].Jsonize());
}
payload.WithArray("MetadataList", std::move(metadataListJsonList));
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/LicenseSpecification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
LicenseSpecification::LicenseSpecification() :
m_licenseConfigurationArnHasBeenSet(false)
{
}
LicenseSpecification::LicenseSpecification(JsonView jsonValue) :
m_licenseConfigurationArnHasBeenSet(false)
{
*this = jsonValue;
}
LicenseSpecification& LicenseSpecification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("LicenseConfigurationArn"))
{
m_licenseConfigurationArn = jsonValue.GetString("LicenseConfigurationArn");
m_licenseConfigurationArnHasBeenSet = true;
}
return *this;
}
JsonValue LicenseSpecification::Jsonize() const
{
JsonValue payload;
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListAssociationsForLicenseConfigurationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAssociationsForLicenseConfigurationRequest::ListAssociationsForLicenseConfigurationRequest() :
m_licenseConfigurationArnHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListAssociationsForLicenseConfigurationRequest::SerializePayload() const
{
JsonValue payload;
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAssociationsForLicenseConfigurationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.ListAssociationsForLicenseConfiguration"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListAssociationsForLicenseConfigurationResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListAssociationsForLicenseConfigurationResult::ListAssociationsForLicenseConfigurationResult()
{
}
ListAssociationsForLicenseConfigurationResult::ListAssociationsForLicenseConfigurationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListAssociationsForLicenseConfigurationResult& ListAssociationsForLicenseConfigurationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("LicenseConfigurationAssociations"))
{
Array<JsonView> licenseConfigurationAssociationsJsonList = jsonValue.GetArray("LicenseConfigurationAssociations");
for(unsigned licenseConfigurationAssociationsIndex = 0; licenseConfigurationAssociationsIndex < licenseConfigurationAssociationsJsonList.GetLength(); ++licenseConfigurationAssociationsIndex)
{
m_licenseConfigurationAssociations.push_back(licenseConfigurationAssociationsJsonList[licenseConfigurationAssociationsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
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/license-manager/model/ListFailuresForLicenseConfigurationOperationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListFailuresForLicenseConfigurationOperationsRequest::ListFailuresForLicenseConfigurationOperationsRequest() :
m_licenseConfigurationArnHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListFailuresForLicenseConfigurationOperationsRequest::SerializePayload() const
{
JsonValue payload;
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListFailuresForLicenseConfigurationOperationsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.ListFailuresForLicenseConfigurationOperations"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListFailuresForLicenseConfigurationOperationsResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListFailuresForLicenseConfigurationOperationsResult::ListFailuresForLicenseConfigurationOperationsResult()
{
}
ListFailuresForLicenseConfigurationOperationsResult::ListFailuresForLicenseConfigurationOperationsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListFailuresForLicenseConfigurationOperationsResult& ListFailuresForLicenseConfigurationOperationsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("LicenseOperationFailureList"))
{
Array<JsonView> licenseOperationFailureListJsonList = jsonValue.GetArray("LicenseOperationFailureList");
for(unsigned licenseOperationFailureListIndex = 0; licenseOperationFailureListIndex < licenseOperationFailureListJsonList.GetLength(); ++licenseOperationFailureListIndex)
{
m_licenseOperationFailureList.push_back(licenseOperationFailureListJsonList[licenseOperationFailureListIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListLicenseConfigurationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListLicenseConfigurationsRequest::ListLicenseConfigurationsRequest() :
m_licenseConfigurationArnsHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_filtersHasBeenSet(false)
{
}
Aws::String ListLicenseConfigurationsRequest::SerializePayload() const
{
JsonValue payload;
if(m_licenseConfigurationArnsHasBeenSet)
{
Array<JsonValue> licenseConfigurationArnsJsonList(m_licenseConfigurationArns.size());
for(unsigned licenseConfigurationArnsIndex = 0; licenseConfigurationArnsIndex < licenseConfigurationArnsJsonList.GetLength(); ++licenseConfigurationArnsIndex)
{
licenseConfigurationArnsJsonList[licenseConfigurationArnsIndex].AsString(m_licenseConfigurationArns[licenseConfigurationArnsIndex]);
}
payload.WithArray("LicenseConfigurationArns", std::move(licenseConfigurationArnsJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("Filters", std::move(filtersJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListLicenseConfigurationsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.ListLicenseConfigurations"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListLicenseConfigurationsResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListLicenseConfigurationsResult::ListLicenseConfigurationsResult()
{
}
ListLicenseConfigurationsResult::ListLicenseConfigurationsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListLicenseConfigurationsResult& ListLicenseConfigurationsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("LicenseConfigurations"))
{
Array<JsonView> licenseConfigurationsJsonList = jsonValue.GetArray("LicenseConfigurations");
for(unsigned licenseConfigurationsIndex = 0; licenseConfigurationsIndex < licenseConfigurationsJsonList.GetLength(); ++licenseConfigurationsIndex)
{
m_licenseConfigurations.push_back(licenseConfigurationsJsonList[licenseConfigurationsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
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/license-manager/model/ListLicenseSpecificationsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListLicenseSpecificationsForResourceRequest::ListLicenseSpecificationsForResourceRequest() :
m_resourceArnHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListLicenseSpecificationsForResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListLicenseSpecificationsForResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.ListLicenseSpecificationsForResource"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListLicenseSpecificationsForResourceResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListLicenseSpecificationsForResourceResult::ListLicenseSpecificationsForResourceResult()
{
}
ListLicenseSpecificationsForResourceResult::ListLicenseSpecificationsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListLicenseSpecificationsForResourceResult& ListLicenseSpecificationsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("LicenseSpecifications"))
{
Array<JsonView> licenseSpecificationsJsonList = jsonValue.GetArray("LicenseSpecifications");
for(unsigned licenseSpecificationsIndex = 0; licenseSpecificationsIndex < licenseSpecificationsJsonList.GetLength(); ++licenseSpecificationsIndex)
{
m_licenseSpecifications.push_back(licenseSpecificationsJsonList[licenseSpecificationsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListResourceInventoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListResourceInventoryRequest::ListResourceInventoryRequest() :
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_filtersHasBeenSet(false)
{
}
Aws::String ListResourceInventoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("Filters", std::move(filtersJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListResourceInventoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.ListResourceInventory"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListResourceInventoryResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListResourceInventoryResult::ListResourceInventoryResult()
{
}
ListResourceInventoryResult::ListResourceInventoryResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListResourceInventoryResult& ListResourceInventoryResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceInventoryList"))
{
Array<JsonView> resourceInventoryListJsonList = jsonValue.GetArray("ResourceInventoryList");
for(unsigned resourceInventoryListIndex = 0; resourceInventoryListIndex < resourceInventoryListJsonList.GetLength(); ++resourceInventoryListIndex)
{
m_resourceInventoryList.push_back(resourceInventoryListJsonList[resourceInventoryListIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
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/license-manager/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListTagsForResourceRequest::ListTagsForResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String ListTagsForResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListTagsForResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.ListTagsForResource"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/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::LicenseManager::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"))
{
Array<JsonView> tagsJsonList = jsonValue.GetArray("Tags");
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
m_tags.push_back(tagsJsonList[tagsIndex].AsObject());
}
}
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/license-manager/model/ListUsageForLicenseConfigurationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListUsageForLicenseConfigurationRequest::ListUsageForLicenseConfigurationRequest() :
m_licenseConfigurationArnHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_filtersHasBeenSet(false)
{
}
Aws::String ListUsageForLicenseConfigurationRequest::SerializePayload() const
{
JsonValue payload;
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("Filters", std::move(filtersJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListUsageForLicenseConfigurationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.ListUsageForLicenseConfiguration"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ListUsageForLicenseConfigurationResult.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::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListUsageForLicenseConfigurationResult::ListUsageForLicenseConfigurationResult()
{
}
ListUsageForLicenseConfigurationResult::ListUsageForLicenseConfigurationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListUsageForLicenseConfigurationResult& ListUsageForLicenseConfigurationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("LicenseConfigurationUsageList"))
{
Array<JsonView> licenseConfigurationUsageListJsonList = jsonValue.GetArray("LicenseConfigurationUsageList");
for(unsigned licenseConfigurationUsageListIndex = 0; licenseConfigurationUsageListIndex < licenseConfigurationUsageListJsonList.GetLength(); ++licenseConfigurationUsageListIndex)
{
m_licenseConfigurationUsageList.push_back(licenseConfigurationUsageListJsonList[licenseConfigurationUsageListIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ManagedResourceSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
ManagedResourceSummary::ManagedResourceSummary() :
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_associationCount(0),
m_associationCountHasBeenSet(false)
{
}
ManagedResourceSummary::ManagedResourceSummary(JsonView jsonValue) :
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_associationCount(0),
m_associationCountHasBeenSet(false)
{
*this = jsonValue;
}
ManagedResourceSummary& ManagedResourceSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("ResourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationCount"))
{
m_associationCount = jsonValue.GetInt64("AssociationCount");
m_associationCountHasBeenSet = true;
}
return *this;
}
JsonValue ManagedResourceSummary::Jsonize() const
{
JsonValue payload;
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_associationCountHasBeenSet)
{
payload.WithInt64("AssociationCount", m_associationCount);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/Metadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
Metadata::Metadata() :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
Metadata::Metadata(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
Metadata& Metadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue Metadata::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/OrganizationConfiguration.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
OrganizationConfiguration::OrganizationConfiguration() :
m_enableIntegration(false),
m_enableIntegrationHasBeenSet(false)
{
}
OrganizationConfiguration::OrganizationConfiguration(JsonView jsonValue) :
m_enableIntegration(false),
m_enableIntegrationHasBeenSet(false)
{
*this = jsonValue;
}
OrganizationConfiguration& OrganizationConfiguration::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("EnableIntegration"))
{
m_enableIntegration = jsonValue.GetBool("EnableIntegration");
m_enableIntegrationHasBeenSet = true;
}
return *this;
}
JsonValue OrganizationConfiguration::Jsonize() const
{
JsonValue payload;
if(m_enableIntegrationHasBeenSet)
{
payload.WithBool("EnableIntegration", m_enableIntegration);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ProductInformation.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
ProductInformation::ProductInformation() :
m_resourceTypeHasBeenSet(false),
m_productInformationFilterListHasBeenSet(false)
{
}
ProductInformation::ProductInformation(JsonView jsonValue) :
m_resourceTypeHasBeenSet(false),
m_productInformationFilterListHasBeenSet(false)
{
*this = jsonValue;
}
ProductInformation& ProductInformation::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ProductInformationFilterList"))
{
Array<JsonView> productInformationFilterListJsonList = jsonValue.GetArray("ProductInformationFilterList");
for(unsigned productInformationFilterListIndex = 0; productInformationFilterListIndex < productInformationFilterListJsonList.GetLength(); ++productInformationFilterListIndex)
{
m_productInformationFilterList.push_back(productInformationFilterListJsonList[productInformationFilterListIndex].AsObject());
}
m_productInformationFilterListHasBeenSet = true;
}
return *this;
}
JsonValue ProductInformation::Jsonize() const
{
JsonValue payload;
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
if(m_productInformationFilterListHasBeenSet)
{
Array<JsonValue> productInformationFilterListJsonList(m_productInformationFilterList.size());
for(unsigned productInformationFilterListIndex = 0; productInformationFilterListIndex < productInformationFilterListJsonList.GetLength(); ++productInformationFilterListIndex)
{
productInformationFilterListJsonList[productInformationFilterListIndex].AsObject(m_productInformationFilterList[productInformationFilterListIndex].Jsonize());
}
payload.WithArray("ProductInformationFilterList", std::move(productInformationFilterListJsonList));
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/ProductInformationFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
ProductInformationFilter::ProductInformationFilter() :
m_productInformationFilterNameHasBeenSet(false),
m_productInformationFilterValueHasBeenSet(false),
m_productInformationFilterComparatorHasBeenSet(false)
{
}
ProductInformationFilter::ProductInformationFilter(JsonView jsonValue) :
m_productInformationFilterNameHasBeenSet(false),
m_productInformationFilterValueHasBeenSet(false),
m_productInformationFilterComparatorHasBeenSet(false)
{
*this = jsonValue;
}
ProductInformationFilter& ProductInformationFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ProductInformationFilterName"))
{
m_productInformationFilterName = jsonValue.GetString("ProductInformationFilterName");
m_productInformationFilterNameHasBeenSet = true;
}
if(jsonValue.ValueExists("ProductInformationFilterValue"))
{
Array<JsonView> productInformationFilterValueJsonList = jsonValue.GetArray("ProductInformationFilterValue");
for(unsigned productInformationFilterValueIndex = 0; productInformationFilterValueIndex < productInformationFilterValueJsonList.GetLength(); ++productInformationFilterValueIndex)
{
m_productInformationFilterValue.push_back(productInformationFilterValueJsonList[productInformationFilterValueIndex].AsString());
}
m_productInformationFilterValueHasBeenSet = true;
}
if(jsonValue.ValueExists("ProductInformationFilterComparator"))
{
m_productInformationFilterComparator = jsonValue.GetString("ProductInformationFilterComparator");
m_productInformationFilterComparatorHasBeenSet = true;
}
return *this;
}
JsonValue ProductInformationFilter::Jsonize() const
{
JsonValue payload;
if(m_productInformationFilterNameHasBeenSet)
{
payload.WithString("ProductInformationFilterName", m_productInformationFilterName);
}
if(m_productInformationFilterValueHasBeenSet)
{
Array<JsonValue> productInformationFilterValueJsonList(m_productInformationFilterValue.size());
for(unsigned productInformationFilterValueIndex = 0; productInformationFilterValueIndex < productInformationFilterValueJsonList.GetLength(); ++productInformationFilterValueIndex)
{
productInformationFilterValueJsonList[productInformationFilterValueIndex].AsString(m_productInformationFilterValue[productInformationFilterValueIndex]);
}
payload.WithArray("ProductInformationFilterValue", std::move(productInformationFilterValueJsonList));
}
if(m_productInformationFilterComparatorHasBeenSet)
{
payload.WithString("ProductInformationFilterComparator", m_productInformationFilterComparator);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,135 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/ResourceInventory.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
ResourceInventory::ResourceInventory() :
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceArnHasBeenSet(false),
m_platformHasBeenSet(false),
m_platformVersionHasBeenSet(false),
m_resourceOwningAccountIdHasBeenSet(false)
{
}
ResourceInventory::ResourceInventory(JsonView jsonValue) :
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceArnHasBeenSet(false),
m_platformHasBeenSet(false),
m_platformVersionHasBeenSet(false),
m_resourceOwningAccountIdHasBeenSet(false)
{
*this = jsonValue;
}
ResourceInventory& ResourceInventory::operator =(JsonView jsonValue)
{
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;
}
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("Platform"))
{
m_platform = jsonValue.GetString("Platform");
m_platformHasBeenSet = true;
}
if(jsonValue.ValueExists("PlatformVersion"))
{
m_platformVersion = jsonValue.GetString("PlatformVersion");
m_platformVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceOwningAccountId"))
{
m_resourceOwningAccountId = jsonValue.GetString("ResourceOwningAccountId");
m_resourceOwningAccountIdHasBeenSet = true;
}
return *this;
}
JsonValue ResourceInventory::Jsonize() const
{
JsonValue payload;
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_platformHasBeenSet)
{
payload.WithString("Platform", m_platform);
}
if(m_platformVersionHasBeenSet)
{
payload.WithString("PlatformVersion", m_platformVersion);
}
if(m_resourceOwningAccountIdHasBeenSet)
{
payload.WithString("ResourceOwningAccountId", m_resourceOwningAccountId);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/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 LicenseManager
{
namespace Model
{
namespace ResourceTypeMapper
{
static const int EC2_INSTANCE_HASH = HashingUtils::HashString("EC2_INSTANCE");
static const int EC2_HOST_HASH = HashingUtils::HashString("EC2_HOST");
static const int EC2_AMI_HASH = HashingUtils::HashString("EC2_AMI");
static const int RDS_HASH = HashingUtils::HashString("RDS");
static const int SYSTEMS_MANAGER_MANAGED_INSTANCE_HASH = HashingUtils::HashString("SYSTEMS_MANAGER_MANAGED_INSTANCE");
ResourceType GetResourceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EC2_INSTANCE_HASH)
{
return ResourceType::EC2_INSTANCE;
}
else if (hashCode == EC2_HOST_HASH)
{
return ResourceType::EC2_HOST;
}
else if (hashCode == EC2_AMI_HASH)
{
return ResourceType::EC2_AMI;
}
else if (hashCode == RDS_HASH)
{
return ResourceType::RDS;
}
else if (hashCode == SYSTEMS_MANAGER_MANAGED_INSTANCE_HASH)
{
return ResourceType::SYSTEMS_MANAGER_MANAGED_INSTANCE;
}
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::EC2_INSTANCE:
return "EC2_INSTANCE";
case ResourceType::EC2_HOST:
return "EC2_HOST";
case ResourceType::EC2_AMI:
return "EC2_AMI";
case ResourceType::RDS:
return "RDS";
case ResourceType::SYSTEMS_MANAGER_MANAGED_INSTANCE:
return "SYSTEMS_MANAGER_MANAGED_INSTANCE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ResourceTypeMapper
} // namespace Model
} // namespace LicenseManager
} // 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/license-manager/model/Tag.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LicenseManager
{
namespace Model
{
Tag::Tag() :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
Tag::Tag(JsonView jsonValue) :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
Tag& Tag::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = jsonValue.GetString("Key");
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue Tag::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", m_key);
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace LicenseManager
} // namespace Aws

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/TagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::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_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("Tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection TagResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.TagResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/TagResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
TagResourceResult::TagResourceResult()
{
}
TagResourceResult::TagResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
TagResourceResult& TagResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/UntagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UntagResourceRequest::UntagResourceRequest() :
m_resourceArnHasBeenSet(false),
m_tagKeysHasBeenSet(false)
{
}
Aws::String UntagResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_tagKeysHasBeenSet)
{
Array<JsonValue> tagKeysJsonList(m_tagKeys.size());
for(unsigned tagKeysIndex = 0; tagKeysIndex < tagKeysJsonList.GetLength(); ++tagKeysIndex)
{
tagKeysJsonList[tagKeysIndex].AsString(m_tagKeys[tagKeysIndex]);
}
payload.WithArray("TagKeys", std::move(tagKeysJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UntagResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.UntagResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/UntagResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UntagResourceResult::UntagResourceResult()
{
}
UntagResourceResult::UntagResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UntagResourceResult& UntagResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/UpdateLicenseConfigurationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateLicenseConfigurationRequest::UpdateLicenseConfigurationRequest() :
m_licenseConfigurationArnHasBeenSet(false),
m_licenseConfigurationStatus(LicenseConfigurationStatus::NOT_SET),
m_licenseConfigurationStatusHasBeenSet(false),
m_licenseRulesHasBeenSet(false),
m_licenseCount(0),
m_licenseCountHasBeenSet(false),
m_licenseCountHardLimit(false),
m_licenseCountHardLimitHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_productInformationListHasBeenSet(false)
{
}
Aws::String UpdateLicenseConfigurationRequest::SerializePayload() const
{
JsonValue payload;
if(m_licenseConfigurationArnHasBeenSet)
{
payload.WithString("LicenseConfigurationArn", m_licenseConfigurationArn);
}
if(m_licenseConfigurationStatusHasBeenSet)
{
payload.WithString("LicenseConfigurationStatus", LicenseConfigurationStatusMapper::GetNameForLicenseConfigurationStatus(m_licenseConfigurationStatus));
}
if(m_licenseRulesHasBeenSet)
{
Array<JsonValue> licenseRulesJsonList(m_licenseRules.size());
for(unsigned licenseRulesIndex = 0; licenseRulesIndex < licenseRulesJsonList.GetLength(); ++licenseRulesIndex)
{
licenseRulesJsonList[licenseRulesIndex].AsString(m_licenseRules[licenseRulesIndex]);
}
payload.WithArray("LicenseRules", std::move(licenseRulesJsonList));
}
if(m_licenseCountHasBeenSet)
{
payload.WithInt64("LicenseCount", m_licenseCount);
}
if(m_licenseCountHardLimitHasBeenSet)
{
payload.WithBool("LicenseCountHardLimit", m_licenseCountHardLimit);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_productInformationListHasBeenSet)
{
Array<JsonValue> productInformationListJsonList(m_productInformationList.size());
for(unsigned productInformationListIndex = 0; productInformationListIndex < productInformationListJsonList.GetLength(); ++productInformationListIndex)
{
productInformationListJsonList[productInformationListIndex].AsObject(m_productInformationList[productInformationListIndex].Jsonize());
}
payload.WithArray("ProductInformationList", std::move(productInformationListJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateLicenseConfigurationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.UpdateLicenseConfiguration"));
return headers;
}

View File

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

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/UpdateLicenseSpecificationsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateLicenseSpecificationsForResourceRequest::UpdateLicenseSpecificationsForResourceRequest() :
m_resourceArnHasBeenSet(false),
m_addLicenseSpecificationsHasBeenSet(false),
m_removeLicenseSpecificationsHasBeenSet(false)
{
}
Aws::String UpdateLicenseSpecificationsForResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_addLicenseSpecificationsHasBeenSet)
{
Array<JsonValue> addLicenseSpecificationsJsonList(m_addLicenseSpecifications.size());
for(unsigned addLicenseSpecificationsIndex = 0; addLicenseSpecificationsIndex < addLicenseSpecificationsJsonList.GetLength(); ++addLicenseSpecificationsIndex)
{
addLicenseSpecificationsJsonList[addLicenseSpecificationsIndex].AsObject(m_addLicenseSpecifications[addLicenseSpecificationsIndex].Jsonize());
}
payload.WithArray("AddLicenseSpecifications", std::move(addLicenseSpecificationsJsonList));
}
if(m_removeLicenseSpecificationsHasBeenSet)
{
Array<JsonValue> removeLicenseSpecificationsJsonList(m_removeLicenseSpecifications.size());
for(unsigned removeLicenseSpecificationsIndex = 0; removeLicenseSpecificationsIndex < removeLicenseSpecificationsJsonList.GetLength(); ++removeLicenseSpecificationsIndex)
{
removeLicenseSpecificationsJsonList[removeLicenseSpecificationsIndex].AsObject(m_removeLicenseSpecifications[removeLicenseSpecificationsIndex].Jsonize());
}
payload.WithArray("RemoveLicenseSpecifications", std::move(removeLicenseSpecificationsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateLicenseSpecificationsForResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.UpdateLicenseSpecificationsForResource"));
return headers;
}

View File

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

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/license-manager/model/UpdateServiceSettingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LicenseManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateServiceSettingsRequest::UpdateServiceSettingsRequest() :
m_s3BucketArnHasBeenSet(false),
m_snsTopicArnHasBeenSet(false),
m_organizationConfigurationHasBeenSet(false),
m_enableCrossAccountsDiscovery(false),
m_enableCrossAccountsDiscoveryHasBeenSet(false)
{
}
Aws::String UpdateServiceSettingsRequest::SerializePayload() const
{
JsonValue payload;
if(m_s3BucketArnHasBeenSet)
{
payload.WithString("S3BucketArn", m_s3BucketArn);
}
if(m_snsTopicArnHasBeenSet)
{
payload.WithString("SnsTopicArn", m_snsTopicArn);
}
if(m_organizationConfigurationHasBeenSet)
{
payload.WithObject("OrganizationConfiguration", m_organizationConfiguration.Jsonize());
}
if(m_enableCrossAccountsDiscoveryHasBeenSet)
{
payload.WithBool("EnableCrossAccountsDiscovery", m_enableCrossAccountsDiscovery);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateServiceSettingsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLicenseManager.UpdateServiceSettings"));
return headers;
}

View File

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