KMS SDK Auto Released By shenshi,Version:1.34.57
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
845
kms/src/KmsClient.cc
Normal file
845
kms/src/KmsClient.cc
Normal file
@@ -0,0 +1,845 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/KmsClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "Kms";
|
||||
}
|
||||
|
||||
KmsClient::KmsClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms");
|
||||
}
|
||||
|
||||
KmsClient::KmsClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms");
|
||||
}
|
||||
|
||||
KmsClient::KmsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms");
|
||||
}
|
||||
|
||||
KmsClient::~KmsClient()
|
||||
{}
|
||||
|
||||
KmsClient::ListAliasesOutcome KmsClient::listAliases(const ListAliasesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListAliasesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListAliasesOutcome(ListAliasesResult(outcome.result()));
|
||||
else
|
||||
return ListAliasesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::listAliasesAsync(const ListAliasesRequest& request, const ListAliasesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listAliases(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ListAliasesOutcomeCallable KmsClient::listAliasesCallable(const ListAliasesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListAliasesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listAliases(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GenerateDataKeyOutcome KmsClient::generateDataKey(const GenerateDataKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GenerateDataKeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GenerateDataKeyOutcome(GenerateDataKeyResult(outcome.result()));
|
||||
else
|
||||
return GenerateDataKeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::generateDataKeyAsync(const GenerateDataKeyRequest& request, const GenerateDataKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, generateDataKey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::GenerateDataKeyOutcomeCallable KmsClient::generateDataKeyCallable(const GenerateDataKeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GenerateDataKeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->generateDataKey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CancelKeyDeletionOutcome KmsClient::cancelKeyDeletion(const CancelKeyDeletionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CancelKeyDeletionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CancelKeyDeletionOutcome(CancelKeyDeletionResult(outcome.result()));
|
||||
else
|
||||
return CancelKeyDeletionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::cancelKeyDeletionAsync(const CancelKeyDeletionRequest& request, const CancelKeyDeletionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, cancelKeyDeletion(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CancelKeyDeletionOutcomeCallable KmsClient::cancelKeyDeletionCallable(const CancelKeyDeletionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CancelKeyDeletionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->cancelKeyDeletion(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DisableKeyOutcome KmsClient::disableKey(const DisableKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DisableKeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DisableKeyOutcome(DisableKeyResult(outcome.result()));
|
||||
else
|
||||
return DisableKeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::disableKeyAsync(const DisableKeyRequest& request, const DisableKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, disableKey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DisableKeyOutcomeCallable KmsClient::disableKeyCallable(const DisableKeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DisableKeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->disableKey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DeleteAliasOutcome KmsClient::deleteAlias(const DeleteAliasRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteAliasOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteAliasOutcome(DeleteAliasResult(outcome.result()));
|
||||
else
|
||||
return DeleteAliasOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::deleteAliasAsync(const DeleteAliasRequest& request, const DeleteAliasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteAlias(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DeleteAliasOutcomeCallable KmsClient::deleteAliasCallable(const DeleteAliasRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteAliasOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteAlias(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DecryptOutcome KmsClient::decrypt(const DecryptRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DecryptOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DecryptOutcome(DecryptResult(outcome.result()));
|
||||
else
|
||||
return DecryptOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::decryptAsync(const DecryptRequest& request, const DecryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, decrypt(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DecryptOutcomeCallable KmsClient::decryptCallable(const DecryptRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DecryptOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->decrypt(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::TagResourceOutcome KmsClient::tagResource(const TagResourceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TagResourceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TagResourceOutcome(TagResourceResult(outcome.result()));
|
||||
else
|
||||
return TagResourceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::tagResourceAsync(const TagResourceRequest& request, const TagResourceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, tagResource(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::TagResourceOutcomeCallable KmsClient::tagResourceCallable(const TagResourceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TagResourceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->tagResource(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeKeyOutcome KmsClient::describeKey(const DescribeKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeKeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeKeyOutcome(DescribeKeyResult(outcome.result()));
|
||||
else
|
||||
return DescribeKeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::describeKeyAsync(const DescribeKeyRequest& request, const DescribeKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeKey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DescribeKeyOutcomeCallable KmsClient::describeKeyCallable(const DescribeKeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeKeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeKey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CreateAliasOutcome KmsClient::createAlias(const CreateAliasRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateAliasOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateAliasOutcome(CreateAliasResult(outcome.result()));
|
||||
else
|
||||
return CreateAliasOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::createAliasAsync(const CreateAliasRequest& request, const CreateAliasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createAlias(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CreateAliasOutcomeCallable KmsClient::createAliasCallable(const CreateAliasRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateAliasOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createAlias(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DeleteKeyMaterialOutcome KmsClient::deleteKeyMaterial(const DeleteKeyMaterialRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteKeyMaterialOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteKeyMaterialOutcome(DeleteKeyMaterialResult(outcome.result()));
|
||||
else
|
||||
return DeleteKeyMaterialOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::deleteKeyMaterialAsync(const DeleteKeyMaterialRequest& request, const DeleteKeyMaterialAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteKeyMaterial(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DeleteKeyMaterialOutcomeCallable KmsClient::deleteKeyMaterialCallable(const DeleteKeyMaterialRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteKeyMaterialOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteKeyMaterial(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListResourceTagsOutcome KmsClient::listResourceTags(const ListResourceTagsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListResourceTagsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListResourceTagsOutcome(ListResourceTagsResult(outcome.result()));
|
||||
else
|
||||
return ListResourceTagsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::listResourceTagsAsync(const ListResourceTagsRequest& request, const ListResourceTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listResourceTags(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ListResourceTagsOutcomeCallable KmsClient::listResourceTagsCallable(const ListResourceTagsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListResourceTagsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listResourceTags(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ImportKeyMaterialOutcome KmsClient::importKeyMaterial(const ImportKeyMaterialRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ImportKeyMaterialOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ImportKeyMaterialOutcome(ImportKeyMaterialResult(outcome.result()));
|
||||
else
|
||||
return ImportKeyMaterialOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::importKeyMaterialAsync(const ImportKeyMaterialRequest& request, const ImportKeyMaterialAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, importKeyMaterial(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ImportKeyMaterialOutcomeCallable KmsClient::importKeyMaterialCallable(const ImportKeyMaterialRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ImportKeyMaterialOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->importKeyMaterial(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::EncryptOutcome KmsClient::encrypt(const EncryptRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EncryptOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EncryptOutcome(EncryptResult(outcome.result()));
|
||||
else
|
||||
return EncryptOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::encryptAsync(const EncryptRequest& request, const EncryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, encrypt(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::EncryptOutcomeCallable KmsClient::encryptCallable(const EncryptRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EncryptOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->encrypt(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UntagResourceOutcome KmsClient::untagResource(const UntagResourceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UntagResourceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UntagResourceOutcome(UntagResourceResult(outcome.result()));
|
||||
else
|
||||
return UntagResourceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::untagResourceAsync(const UntagResourceRequest& request, const UntagResourceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, untagResource(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UntagResourceOutcomeCallable KmsClient::untagResourceCallable(const UntagResourceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UntagResourceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->untagResource(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UpdateAliasOutcome KmsClient::updateAlias(const UpdateAliasRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateAliasOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateAliasOutcome(UpdateAliasResult(outcome.result()));
|
||||
else
|
||||
return UpdateAliasOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::updateAliasAsync(const UpdateAliasRequest& request, const UpdateAliasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateAlias(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UpdateAliasOutcomeCallable KmsClient::updateAliasCallable(const UpdateAliasRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateAliasOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateAlias(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListAliasesByKeyIdOutcome KmsClient::listAliasesByKeyId(const ListAliasesByKeyIdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListAliasesByKeyIdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListAliasesByKeyIdOutcome(ListAliasesByKeyIdResult(outcome.result()));
|
||||
else
|
||||
return ListAliasesByKeyIdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::listAliasesByKeyIdAsync(const ListAliasesByKeyIdRequest& request, const ListAliasesByKeyIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listAliasesByKeyId(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ListAliasesByKeyIdOutcomeCallable KmsClient::listAliasesByKeyIdCallable(const ListAliasesByKeyIdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListAliasesByKeyIdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listAliasesByKeyId(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::EnableKeyOutcome KmsClient::enableKey(const EnableKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EnableKeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EnableKeyOutcome(EnableKeyResult(outcome.result()));
|
||||
else
|
||||
return EnableKeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::enableKeyAsync(const EnableKeyRequest& request, const EnableKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, enableKey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::EnableKeyOutcomeCallable KmsClient::enableKeyCallable(const EnableKeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EnableKeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->enableKey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ScheduleKeyDeletionOutcome KmsClient::scheduleKeyDeletion(const ScheduleKeyDeletionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ScheduleKeyDeletionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ScheduleKeyDeletionOutcome(ScheduleKeyDeletionResult(outcome.result()));
|
||||
else
|
||||
return ScheduleKeyDeletionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::scheduleKeyDeletionAsync(const ScheduleKeyDeletionRequest& request, const ScheduleKeyDeletionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, scheduleKeyDeletion(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ScheduleKeyDeletionOutcomeCallable KmsClient::scheduleKeyDeletionCallable(const ScheduleKeyDeletionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ScheduleKeyDeletionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->scheduleKeyDeletion(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeRegionsOutcome KmsClient::describeRegions(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeRegionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeRegionsOutcome(DescribeRegionsResult(outcome.result()));
|
||||
else
|
||||
return DescribeRegionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::describeRegionsAsync(const DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeRegions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DescribeRegionsOutcomeCallable KmsClient::describeRegionsCallable(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeRegionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeRegions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListKeysOutcome KmsClient::listKeys(const ListKeysRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListKeysOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListKeysOutcome(ListKeysResult(outcome.result()));
|
||||
else
|
||||
return ListKeysOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::listKeysAsync(const ListKeysRequest& request, const ListKeysAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listKeys(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ListKeysOutcomeCallable KmsClient::listKeysCallable(const ListKeysRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListKeysOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listKeys(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetParametersForImportOutcome KmsClient::getParametersForImport(const GetParametersForImportRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetParametersForImportOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetParametersForImportOutcome(GetParametersForImportResult(outcome.result()));
|
||||
else
|
||||
return GetParametersForImportOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::getParametersForImportAsync(const GetParametersForImportRequest& request, const GetParametersForImportAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getParametersForImport(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::GetParametersForImportOutcomeCallable KmsClient::getParametersForImportCallable(const GetParametersForImportRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetParametersForImportOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getParametersForImport(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CreateKeyOutcome KmsClient::createKey(const CreateKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateKeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateKeyOutcome(CreateKeyResult(outcome.result()));
|
||||
else
|
||||
return CreateKeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::createKeyAsync(const CreateKeyRequest& request, const CreateKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createKey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CreateKeyOutcomeCallable KmsClient::createKeyCallable(const CreateKeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateKeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createKey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
49
kms/src/model/CancelKeyDeletionRequest.cc
Normal file
49
kms/src/model/CancelKeyDeletionRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/CancelKeyDeletionRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CancelKeyDeletionRequest;
|
||||
|
||||
CancelKeyDeletionRequest::CancelKeyDeletionRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CancelKeyDeletion")
|
||||
{}
|
||||
|
||||
CancelKeyDeletionRequest::~CancelKeyDeletionRequest()
|
||||
{}
|
||||
|
||||
std::string CancelKeyDeletionRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void CancelKeyDeletionRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string CancelKeyDeletionRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void CancelKeyDeletionRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/CancelKeyDeletionResult.cc
Normal file
45
kms/src/model/CancelKeyDeletionResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/CancelKeyDeletionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CancelKeyDeletionResult::CancelKeyDeletionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CancelKeyDeletionResult::CancelKeyDeletionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CancelKeyDeletionResult::~CancelKeyDeletionResult()
|
||||
{}
|
||||
|
||||
void CancelKeyDeletionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
60
kms/src/model/CreateAliasRequest.cc
Normal file
60
kms/src/model/CreateAliasRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/CreateAliasRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CreateAliasRequest;
|
||||
|
||||
CreateAliasRequest::CreateAliasRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CreateAlias")
|
||||
{}
|
||||
|
||||
CreateAliasRequest::~CreateAliasRequest()
|
||||
{}
|
||||
|
||||
std::string CreateAliasRequest::getAliasName()const
|
||||
{
|
||||
return aliasName_;
|
||||
}
|
||||
|
||||
void CreateAliasRequest::setAliasName(const std::string& aliasName)
|
||||
{
|
||||
aliasName_ = aliasName;
|
||||
setParameter("AliasName", aliasName);
|
||||
}
|
||||
|
||||
std::string CreateAliasRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void CreateAliasRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string CreateAliasRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void CreateAliasRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/CreateAliasResult.cc
Normal file
45
kms/src/model/CreateAliasResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/CreateAliasResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CreateAliasResult::CreateAliasResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateAliasResult::CreateAliasResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateAliasResult::~CreateAliasResult()
|
||||
{}
|
||||
|
||||
void CreateAliasResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
71
kms/src/model/CreateKeyRequest.cc
Normal file
71
kms/src/model/CreateKeyRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/CreateKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CreateKeyRequest;
|
||||
|
||||
CreateKeyRequest::CreateKeyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CreateKey")
|
||||
{}
|
||||
|
||||
CreateKeyRequest::~CreateKeyRequest()
|
||||
{}
|
||||
|
||||
std::string CreateKeyRequest::getKeyUsage()const
|
||||
{
|
||||
return keyUsage_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setKeyUsage(const std::string& keyUsage)
|
||||
{
|
||||
keyUsage_ = keyUsage;
|
||||
setParameter("KeyUsage", keyUsage);
|
||||
}
|
||||
|
||||
std::string CreateKeyRequest::getOrigin()const
|
||||
{
|
||||
return origin_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setOrigin(const std::string& origin)
|
||||
{
|
||||
origin_ = origin;
|
||||
setParameter("Origin", origin);
|
||||
}
|
||||
|
||||
std::string CreateKeyRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string CreateKeyRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
71
kms/src/model/CreateKeyResult.cc
Normal file
71
kms/src/model/CreateKeyResult.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/CreateKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CreateKeyResult::CreateKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateKeyResult::CreateKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateKeyResult::~CreateKeyResult()
|
||||
{}
|
||||
|
||||
void CreateKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto keyMetadataNode = value["KeyMetadata"];
|
||||
if(!keyMetadataNode["CreationDate"].isNull())
|
||||
keyMetadata_.creationDate = keyMetadataNode["CreationDate"].asString();
|
||||
if(!keyMetadataNode["Description"].isNull())
|
||||
keyMetadata_.description = keyMetadataNode["Description"].asString();
|
||||
if(!keyMetadataNode["KeyId"].isNull())
|
||||
keyMetadata_.keyId = keyMetadataNode["KeyId"].asString();
|
||||
if(!keyMetadataNode["KeyState"].isNull())
|
||||
keyMetadata_.keyState = keyMetadataNode["KeyState"].asString();
|
||||
if(!keyMetadataNode["KeyUsage"].isNull())
|
||||
keyMetadata_.keyUsage = keyMetadataNode["KeyUsage"].asString();
|
||||
if(!keyMetadataNode["DeleteDate"].isNull())
|
||||
keyMetadata_.deleteDate = keyMetadataNode["DeleteDate"].asString();
|
||||
if(!keyMetadataNode["Creator"].isNull())
|
||||
keyMetadata_.creator = keyMetadataNode["Creator"].asString();
|
||||
if(!keyMetadataNode["Arn"].isNull())
|
||||
keyMetadata_.arn = keyMetadataNode["Arn"].asString();
|
||||
if(!keyMetadataNode["Origin"].isNull())
|
||||
keyMetadata_.origin = keyMetadataNode["Origin"].asString();
|
||||
if(!keyMetadataNode["MaterialExpireTime"].isNull())
|
||||
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
CreateKeyResult::KeyMetadata CreateKeyResult::getKeyMetadata()const
|
||||
{
|
||||
return keyMetadata_;
|
||||
}
|
||||
|
||||
60
kms/src/model/DecryptRequest.cc
Normal file
60
kms/src/model/DecryptRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DecryptRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DecryptRequest;
|
||||
|
||||
DecryptRequest::DecryptRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "Decrypt")
|
||||
{}
|
||||
|
||||
DecryptRequest::~DecryptRequest()
|
||||
{}
|
||||
|
||||
std::string DecryptRequest::getEncryptionContext()const
|
||||
{
|
||||
return encryptionContext_;
|
||||
}
|
||||
|
||||
void DecryptRequest::setEncryptionContext(const std::string& encryptionContext)
|
||||
{
|
||||
encryptionContext_ = encryptionContext;
|
||||
setParameter("EncryptionContext", encryptionContext);
|
||||
}
|
||||
|
||||
std::string DecryptRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void DecryptRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
std::string DecryptRequest::getCiphertextBlob()const
|
||||
{
|
||||
return ciphertextBlob_;
|
||||
}
|
||||
|
||||
void DecryptRequest::setCiphertextBlob(const std::string& ciphertextBlob)
|
||||
{
|
||||
ciphertextBlob_ = ciphertextBlob;
|
||||
setParameter("CiphertextBlob", ciphertextBlob);
|
||||
}
|
||||
|
||||
59
kms/src/model/DecryptResult.cc
Normal file
59
kms/src/model/DecryptResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DecryptResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DecryptResult::DecryptResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DecryptResult::DecryptResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DecryptResult::~DecryptResult()
|
||||
{}
|
||||
|
||||
void DecryptResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Plaintext"].isNull())
|
||||
plaintext_ = value["Plaintext"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DecryptResult::getPlaintext()const
|
||||
{
|
||||
return plaintext_;
|
||||
}
|
||||
|
||||
std::string DecryptResult::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
49
kms/src/model/DeleteAliasRequest.cc
Normal file
49
kms/src/model/DeleteAliasRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DeleteAliasRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DeleteAliasRequest;
|
||||
|
||||
DeleteAliasRequest::DeleteAliasRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DeleteAlias")
|
||||
{}
|
||||
|
||||
DeleteAliasRequest::~DeleteAliasRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteAliasRequest::getAliasName()const
|
||||
{
|
||||
return aliasName_;
|
||||
}
|
||||
|
||||
void DeleteAliasRequest::setAliasName(const std::string& aliasName)
|
||||
{
|
||||
aliasName_ = aliasName;
|
||||
setParameter("AliasName", aliasName);
|
||||
}
|
||||
|
||||
std::string DeleteAliasRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void DeleteAliasRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/DeleteAliasResult.cc
Normal file
45
kms/src/model/DeleteAliasResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DeleteAliasResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DeleteAliasResult::DeleteAliasResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteAliasResult::DeleteAliasResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteAliasResult::~DeleteAliasResult()
|
||||
{}
|
||||
|
||||
void DeleteAliasResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
49
kms/src/model/DeleteKeyMaterialRequest.cc
Normal file
49
kms/src/model/DeleteKeyMaterialRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DeleteKeyMaterialRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DeleteKeyMaterialRequest;
|
||||
|
||||
DeleteKeyMaterialRequest::DeleteKeyMaterialRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DeleteKeyMaterial")
|
||||
{}
|
||||
|
||||
DeleteKeyMaterialRequest::~DeleteKeyMaterialRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteKeyMaterialRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void DeleteKeyMaterialRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string DeleteKeyMaterialRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void DeleteKeyMaterialRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/DeleteKeyMaterialResult.cc
Normal file
45
kms/src/model/DeleteKeyMaterialResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DeleteKeyMaterialResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DeleteKeyMaterialResult::DeleteKeyMaterialResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteKeyMaterialResult::DeleteKeyMaterialResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteKeyMaterialResult::~DeleteKeyMaterialResult()
|
||||
{}
|
||||
|
||||
void DeleteKeyMaterialResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
49
kms/src/model/DescribeKeyRequest.cc
Normal file
49
kms/src/model/DescribeKeyRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DescribeKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DescribeKeyRequest;
|
||||
|
||||
DescribeKeyRequest::DescribeKeyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DescribeKey")
|
||||
{}
|
||||
|
||||
DescribeKeyRequest::~DescribeKeyRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeKeyRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void DescribeKeyRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string DescribeKeyRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void DescribeKeyRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
71
kms/src/model/DescribeKeyResult.cc
Normal file
71
kms/src/model/DescribeKeyResult.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DescribeKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DescribeKeyResult::DescribeKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeKeyResult::DescribeKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeKeyResult::~DescribeKeyResult()
|
||||
{}
|
||||
|
||||
void DescribeKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto keyMetadataNode = value["KeyMetadata"];
|
||||
if(!keyMetadataNode["CreationDate"].isNull())
|
||||
keyMetadata_.creationDate = keyMetadataNode["CreationDate"].asString();
|
||||
if(!keyMetadataNode["Description"].isNull())
|
||||
keyMetadata_.description = keyMetadataNode["Description"].asString();
|
||||
if(!keyMetadataNode["KeyId"].isNull())
|
||||
keyMetadata_.keyId = keyMetadataNode["KeyId"].asString();
|
||||
if(!keyMetadataNode["KeyState"].isNull())
|
||||
keyMetadata_.keyState = keyMetadataNode["KeyState"].asString();
|
||||
if(!keyMetadataNode["KeyUsage"].isNull())
|
||||
keyMetadata_.keyUsage = keyMetadataNode["KeyUsage"].asString();
|
||||
if(!keyMetadataNode["DeleteDate"].isNull())
|
||||
keyMetadata_.deleteDate = keyMetadataNode["DeleteDate"].asString();
|
||||
if(!keyMetadataNode["Creator"].isNull())
|
||||
keyMetadata_.creator = keyMetadataNode["Creator"].asString();
|
||||
if(!keyMetadataNode["Arn"].isNull())
|
||||
keyMetadata_.arn = keyMetadataNode["Arn"].asString();
|
||||
if(!keyMetadataNode["Origin"].isNull())
|
||||
keyMetadata_.origin = keyMetadataNode["Origin"].asString();
|
||||
if(!keyMetadataNode["MaterialExpireTime"].isNull())
|
||||
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
DescribeKeyResult::KeyMetadata DescribeKeyResult::getKeyMetadata()const
|
||||
{
|
||||
return keyMetadata_;
|
||||
}
|
||||
|
||||
38
kms/src/model/DescribeRegionsRequest.cc
Normal file
38
kms/src/model/DescribeRegionsRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DescribeRegionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DescribeRegionsRequest;
|
||||
|
||||
DescribeRegionsRequest::DescribeRegionsRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DescribeRegions")
|
||||
{}
|
||||
|
||||
DescribeRegionsRequest::~DescribeRegionsRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeRegionsRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void DescribeRegionsRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
58
kms/src/model/DescribeRegionsResult.cc
Normal file
58
kms/src/model/DescribeRegionsResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DescribeRegionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeRegionsResult::~DescribeRegionsResult()
|
||||
{}
|
||||
|
||||
void DescribeRegionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRegions = value["Regions"]["Region"];
|
||||
for (auto value : allRegions)
|
||||
{
|
||||
Region regionsObject;
|
||||
if(!value["RegionId"].isNull())
|
||||
regionsObject.regionId = value["RegionId"].asString();
|
||||
regions_.push_back(regionsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeRegionsResult::Region> DescribeRegionsResult::getRegions()const
|
||||
{
|
||||
return regions_;
|
||||
}
|
||||
|
||||
49
kms/src/model/DisableKeyRequest.cc
Normal file
49
kms/src/model/DisableKeyRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DisableKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DisableKeyRequest;
|
||||
|
||||
DisableKeyRequest::DisableKeyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DisableKey")
|
||||
{}
|
||||
|
||||
DisableKeyRequest::~DisableKeyRequest()
|
||||
{}
|
||||
|
||||
std::string DisableKeyRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void DisableKeyRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string DisableKeyRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void DisableKeyRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/DisableKeyResult.cc
Normal file
45
kms/src/model/DisableKeyResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DisableKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DisableKeyResult::DisableKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DisableKeyResult::DisableKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DisableKeyResult::~DisableKeyResult()
|
||||
{}
|
||||
|
||||
void DisableKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
49
kms/src/model/EnableKeyRequest.cc
Normal file
49
kms/src/model/EnableKeyRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/EnableKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::EnableKeyRequest;
|
||||
|
||||
EnableKeyRequest::EnableKeyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "EnableKey")
|
||||
{}
|
||||
|
||||
EnableKeyRequest::~EnableKeyRequest()
|
||||
{}
|
||||
|
||||
std::string EnableKeyRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void EnableKeyRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string EnableKeyRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void EnableKeyRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/EnableKeyResult.cc
Normal file
45
kms/src/model/EnableKeyResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/EnableKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
EnableKeyResult::EnableKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EnableKeyResult::EnableKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EnableKeyResult::~EnableKeyResult()
|
||||
{}
|
||||
|
||||
void EnableKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
71
kms/src/model/EncryptRequest.cc
Normal file
71
kms/src/model/EncryptRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/EncryptRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::EncryptRequest;
|
||||
|
||||
EncryptRequest::EncryptRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "Encrypt")
|
||||
{}
|
||||
|
||||
EncryptRequest::~EncryptRequest()
|
||||
{}
|
||||
|
||||
std::string EncryptRequest::getEncryptionContext()const
|
||||
{
|
||||
return encryptionContext_;
|
||||
}
|
||||
|
||||
void EncryptRequest::setEncryptionContext(const std::string& encryptionContext)
|
||||
{
|
||||
encryptionContext_ = encryptionContext;
|
||||
setParameter("EncryptionContext", encryptionContext);
|
||||
}
|
||||
|
||||
std::string EncryptRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void EncryptRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string EncryptRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void EncryptRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
std::string EncryptRequest::getPlaintext()const
|
||||
{
|
||||
return plaintext_;
|
||||
}
|
||||
|
||||
void EncryptRequest::setPlaintext(const std::string& plaintext)
|
||||
{
|
||||
plaintext_ = plaintext;
|
||||
setParameter("Plaintext", plaintext);
|
||||
}
|
||||
|
||||
59
kms/src/model/EncryptResult.cc
Normal file
59
kms/src/model/EncryptResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/EncryptResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
EncryptResult::EncryptResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EncryptResult::EncryptResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EncryptResult::~EncryptResult()
|
||||
{}
|
||||
|
||||
void EncryptResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CiphertextBlob"].isNull())
|
||||
ciphertextBlob_ = value["CiphertextBlob"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string EncryptResult::getCiphertextBlob()const
|
||||
{
|
||||
return ciphertextBlob_;
|
||||
}
|
||||
|
||||
std::string EncryptResult::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
82
kms/src/model/GenerateDataKeyRequest.cc
Normal file
82
kms/src/model/GenerateDataKeyRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/GenerateDataKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::GenerateDataKeyRequest;
|
||||
|
||||
GenerateDataKeyRequest::GenerateDataKeyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKey")
|
||||
{}
|
||||
|
||||
GenerateDataKeyRequest::~GenerateDataKeyRequest()
|
||||
{}
|
||||
|
||||
std::string GenerateDataKeyRequest::getEncryptionContext()const
|
||||
{
|
||||
return encryptionContext_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyRequest::setEncryptionContext(const std::string& encryptionContext)
|
||||
{
|
||||
encryptionContext_ = encryptionContext;
|
||||
setParameter("EncryptionContext", encryptionContext);
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyRequest::getKeySpec()const
|
||||
{
|
||||
return keySpec_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyRequest::setKeySpec(const std::string& keySpec)
|
||||
{
|
||||
keySpec_ = keySpec;
|
||||
setParameter("KeySpec", keySpec);
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
int GenerateDataKeyRequest::getNumberOfBytes()const
|
||||
{
|
||||
return numberOfBytes_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyRequest::setNumberOfBytes(int numberOfBytes)
|
||||
{
|
||||
numberOfBytes_ = numberOfBytes;
|
||||
setParameter("NumberOfBytes", std::to_string(numberOfBytes));
|
||||
}
|
||||
|
||||
66
kms/src/model/GenerateDataKeyResult.cc
Normal file
66
kms/src/model/GenerateDataKeyResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/GenerateDataKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
GenerateDataKeyResult::GenerateDataKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenerateDataKeyResult::GenerateDataKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenerateDataKeyResult::~GenerateDataKeyResult()
|
||||
{}
|
||||
|
||||
void GenerateDataKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CiphertextBlob"].isNull())
|
||||
ciphertextBlob_ = value["CiphertextBlob"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["Plaintext"].isNull())
|
||||
plaintext_ = value["Plaintext"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyResult::getCiphertextBlob()const
|
||||
{
|
||||
return ciphertextBlob_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyResult::getPlaintext()const
|
||||
{
|
||||
return plaintext_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyResult::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
71
kms/src/model/GetParametersForImportRequest.cc
Normal file
71
kms/src/model/GetParametersForImportRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/GetParametersForImportRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::GetParametersForImportRequest;
|
||||
|
||||
GetParametersForImportRequest::GetParametersForImportRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "GetParametersForImport")
|
||||
{}
|
||||
|
||||
GetParametersForImportRequest::~GetParametersForImportRequest()
|
||||
{}
|
||||
|
||||
std::string GetParametersForImportRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void GetParametersForImportRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string GetParametersForImportRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void GetParametersForImportRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
std::string GetParametersForImportRequest::getWrappingAlgorithm()const
|
||||
{
|
||||
return wrappingAlgorithm_;
|
||||
}
|
||||
|
||||
void GetParametersForImportRequest::setWrappingAlgorithm(const std::string& wrappingAlgorithm)
|
||||
{
|
||||
wrappingAlgorithm_ = wrappingAlgorithm;
|
||||
setParameter("WrappingAlgorithm", wrappingAlgorithm);
|
||||
}
|
||||
|
||||
std::string GetParametersForImportRequest::getWrappingKeySpec()const
|
||||
{
|
||||
return wrappingKeySpec_;
|
||||
}
|
||||
|
||||
void GetParametersForImportRequest::setWrappingKeySpec(const std::string& wrappingKeySpec)
|
||||
{
|
||||
wrappingKeySpec_ = wrappingKeySpec;
|
||||
setParameter("WrappingKeySpec", wrappingKeySpec);
|
||||
}
|
||||
|
||||
73
kms/src/model/GetParametersForImportResult.cc
Normal file
73
kms/src/model/GetParametersForImportResult.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/GetParametersForImportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
GetParametersForImportResult::GetParametersForImportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetParametersForImportResult::GetParametersForImportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetParametersForImportResult::~GetParametersForImportResult()
|
||||
{}
|
||||
|
||||
void GetParametersForImportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["ImportToken"].isNull())
|
||||
importToken_ = value["ImportToken"].asString();
|
||||
if(!value["PublicKey"].isNull())
|
||||
publicKey_ = value["PublicKey"].asString();
|
||||
if(!value["TokenExpireTime"].isNull())
|
||||
tokenExpireTime_ = value["TokenExpireTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetParametersForImportResult::getPublicKey()const
|
||||
{
|
||||
return publicKey_;
|
||||
}
|
||||
|
||||
std::string GetParametersForImportResult::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string GetParametersForImportResult::getTokenExpireTime()const
|
||||
{
|
||||
return tokenExpireTime_;
|
||||
}
|
||||
|
||||
std::string GetParametersForImportResult::getImportToken()const
|
||||
{
|
||||
return importToken_;
|
||||
}
|
||||
|
||||
82
kms/src/model/ImportKeyMaterialRequest.cc
Normal file
82
kms/src/model/ImportKeyMaterialRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ImportKeyMaterialRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ImportKeyMaterialRequest;
|
||||
|
||||
ImportKeyMaterialRequest::ImportKeyMaterialRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ImportKeyMaterial")
|
||||
{}
|
||||
|
||||
ImportKeyMaterialRequest::~ImportKeyMaterialRequest()
|
||||
{}
|
||||
|
||||
std::string ImportKeyMaterialRequest::getImportToken()const
|
||||
{
|
||||
return importToken_;
|
||||
}
|
||||
|
||||
void ImportKeyMaterialRequest::setImportToken(const std::string& importToken)
|
||||
{
|
||||
importToken_ = importToken;
|
||||
setParameter("ImportToken", importToken);
|
||||
}
|
||||
|
||||
std::string ImportKeyMaterialRequest::getEncryptedKeyMaterial()const
|
||||
{
|
||||
return encryptedKeyMaterial_;
|
||||
}
|
||||
|
||||
void ImportKeyMaterialRequest::setEncryptedKeyMaterial(const std::string& encryptedKeyMaterial)
|
||||
{
|
||||
encryptedKeyMaterial_ = encryptedKeyMaterial;
|
||||
setParameter("EncryptedKeyMaterial", encryptedKeyMaterial);
|
||||
}
|
||||
|
||||
long ImportKeyMaterialRequest::getKeyMaterialExpireUnix()const
|
||||
{
|
||||
return keyMaterialExpireUnix_;
|
||||
}
|
||||
|
||||
void ImportKeyMaterialRequest::setKeyMaterialExpireUnix(long keyMaterialExpireUnix)
|
||||
{
|
||||
keyMaterialExpireUnix_ = keyMaterialExpireUnix;
|
||||
setParameter("KeyMaterialExpireUnix", std::to_string(keyMaterialExpireUnix));
|
||||
}
|
||||
|
||||
std::string ImportKeyMaterialRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void ImportKeyMaterialRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string ImportKeyMaterialRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void ImportKeyMaterialRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/ImportKeyMaterialResult.cc
Normal file
45
kms/src/model/ImportKeyMaterialResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ImportKeyMaterialResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ImportKeyMaterialResult::ImportKeyMaterialResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ImportKeyMaterialResult::ImportKeyMaterialResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ImportKeyMaterialResult::~ImportKeyMaterialResult()
|
||||
{}
|
||||
|
||||
void ImportKeyMaterialResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
71
kms/src/model/ListAliasesByKeyIdRequest.cc
Normal file
71
kms/src/model/ListAliasesByKeyIdRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListAliasesByKeyIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ListAliasesByKeyIdRequest;
|
||||
|
||||
ListAliasesByKeyIdRequest::ListAliasesByKeyIdRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ListAliasesByKeyId")
|
||||
{}
|
||||
|
||||
ListAliasesByKeyIdRequest::~ListAliasesByKeyIdRequest()
|
||||
{}
|
||||
|
||||
int ListAliasesByKeyIdRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListAliasesByKeyIdRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListAliasesByKeyIdRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void ListAliasesByKeyIdRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string ListAliasesByKeyIdRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void ListAliasesByKeyIdRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
int ListAliasesByKeyIdRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListAliasesByKeyIdRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
83
kms/src/model/ListAliasesByKeyIdResult.cc
Normal file
83
kms/src/model/ListAliasesByKeyIdResult.cc
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListAliasesByKeyIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ListAliasesByKeyIdResult::ListAliasesByKeyIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListAliasesByKeyIdResult::ListAliasesByKeyIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListAliasesByKeyIdResult::~ListAliasesByKeyIdResult()
|
||||
{}
|
||||
|
||||
void ListAliasesByKeyIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAliases = value["Aliases"]["Alias"];
|
||||
for (auto value : allAliases)
|
||||
{
|
||||
Alias aliasesObject;
|
||||
if(!value["KeyId"].isNull())
|
||||
aliasesObject.keyId = value["KeyId"].asString();
|
||||
if(!value["AliasName"].isNull())
|
||||
aliasesObject.aliasName = value["AliasName"].asString();
|
||||
if(!value["AliasArn"].isNull())
|
||||
aliasesObject.aliasArn = value["AliasArn"].asString();
|
||||
aliases_.push_back(aliasesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListAliasesByKeyIdResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ListAliasesByKeyIdResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListAliasesByKeyIdResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<ListAliasesByKeyIdResult::Alias> ListAliasesByKeyIdResult::getAliases()const
|
||||
{
|
||||
return aliases_;
|
||||
}
|
||||
|
||||
60
kms/src/model/ListAliasesRequest.cc
Normal file
60
kms/src/model/ListAliasesRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListAliasesRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ListAliasesRequest;
|
||||
|
||||
ListAliasesRequest::ListAliasesRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ListAliases")
|
||||
{}
|
||||
|
||||
ListAliasesRequest::~ListAliasesRequest()
|
||||
{}
|
||||
|
||||
int ListAliasesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListAliasesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListAliasesRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void ListAliasesRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
int ListAliasesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListAliasesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
83
kms/src/model/ListAliasesResult.cc
Normal file
83
kms/src/model/ListAliasesResult.cc
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListAliasesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ListAliasesResult::ListAliasesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListAliasesResult::ListAliasesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListAliasesResult::~ListAliasesResult()
|
||||
{}
|
||||
|
||||
void ListAliasesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAliases = value["Aliases"]["Alias"];
|
||||
for (auto value : allAliases)
|
||||
{
|
||||
Alias aliasesObject;
|
||||
if(!value["KeyId"].isNull())
|
||||
aliasesObject.keyId = value["KeyId"].asString();
|
||||
if(!value["AliasName"].isNull())
|
||||
aliasesObject.aliasName = value["AliasName"].asString();
|
||||
if(!value["AliasArn"].isNull())
|
||||
aliasesObject.aliasArn = value["AliasArn"].asString();
|
||||
aliases_.push_back(aliasesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListAliasesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ListAliasesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListAliasesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<ListAliasesResult::Alias> ListAliasesResult::getAliases()const
|
||||
{
|
||||
return aliases_;
|
||||
}
|
||||
|
||||
60
kms/src/model/ListKeysRequest.cc
Normal file
60
kms/src/model/ListKeysRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListKeysRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ListKeysRequest;
|
||||
|
||||
ListKeysRequest::ListKeysRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ListKeys")
|
||||
{}
|
||||
|
||||
ListKeysRequest::~ListKeysRequest()
|
||||
{}
|
||||
|
||||
int ListKeysRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListKeysRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListKeysRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void ListKeysRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
int ListKeysRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListKeysRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
81
kms/src/model/ListKeysResult.cc
Normal file
81
kms/src/model/ListKeysResult.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListKeysResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ListKeysResult::ListKeysResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListKeysResult::ListKeysResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListKeysResult::~ListKeysResult()
|
||||
{}
|
||||
|
||||
void ListKeysResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allKeys = value["Keys"]["Key"];
|
||||
for (auto value : allKeys)
|
||||
{
|
||||
Key keysObject;
|
||||
if(!value["KeyId"].isNull())
|
||||
keysObject.keyId = value["KeyId"].asString();
|
||||
if(!value["KeyArn"].isNull())
|
||||
keysObject.keyArn = value["KeyArn"].asString();
|
||||
keys_.push_back(keysObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListKeysResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ListKeysResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListKeysResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<ListKeysResult::Key> ListKeysResult::getKeys()const
|
||||
{
|
||||
return keys_;
|
||||
}
|
||||
|
||||
49
kms/src/model/ListResourceTagsRequest.cc
Normal file
49
kms/src/model/ListResourceTagsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListResourceTagsRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ListResourceTagsRequest;
|
||||
|
||||
ListResourceTagsRequest::ListResourceTagsRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ListResourceTags")
|
||||
{}
|
||||
|
||||
ListResourceTagsRequest::~ListResourceTagsRequest()
|
||||
{}
|
||||
|
||||
std::string ListResourceTagsRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void ListResourceTagsRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string ListResourceTagsRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void ListResourceTagsRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
62
kms/src/model/ListResourceTagsResult.cc
Normal file
62
kms/src/model/ListResourceTagsResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListResourceTagsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ListResourceTagsResult::ListResourceTagsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListResourceTagsResult::ListResourceTagsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListResourceTagsResult::~ListResourceTagsResult()
|
||||
{}
|
||||
|
||||
void ListResourceTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTags = value["Tags"]["Tag"];
|
||||
for (auto value : allTags)
|
||||
{
|
||||
Tag tagsObject;
|
||||
if(!value["KeyId"].isNull())
|
||||
tagsObject.keyId = value["KeyId"].asString();
|
||||
if(!value["TagKey"].isNull())
|
||||
tagsObject.tagKey = value["TagKey"].asString();
|
||||
if(!value["TagValue"].isNull())
|
||||
tagsObject.tagValue = value["TagValue"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListResourceTagsResult::Tag> ListResourceTagsResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
60
kms/src/model/ScheduleKeyDeletionRequest.cc
Normal file
60
kms/src/model/ScheduleKeyDeletionRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ScheduleKeyDeletionRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ScheduleKeyDeletionRequest;
|
||||
|
||||
ScheduleKeyDeletionRequest::ScheduleKeyDeletionRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ScheduleKeyDeletion")
|
||||
{}
|
||||
|
||||
ScheduleKeyDeletionRequest::~ScheduleKeyDeletionRequest()
|
||||
{}
|
||||
|
||||
int ScheduleKeyDeletionRequest::getPendingWindowInDays()const
|
||||
{
|
||||
return pendingWindowInDays_;
|
||||
}
|
||||
|
||||
void ScheduleKeyDeletionRequest::setPendingWindowInDays(int pendingWindowInDays)
|
||||
{
|
||||
pendingWindowInDays_ = pendingWindowInDays;
|
||||
setParameter("PendingWindowInDays", std::to_string(pendingWindowInDays));
|
||||
}
|
||||
|
||||
std::string ScheduleKeyDeletionRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void ScheduleKeyDeletionRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string ScheduleKeyDeletionRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void ScheduleKeyDeletionRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/ScheduleKeyDeletionResult.cc
Normal file
45
kms/src/model/ScheduleKeyDeletionResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ScheduleKeyDeletionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ScheduleKeyDeletionResult::ScheduleKeyDeletionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ScheduleKeyDeletionResult::ScheduleKeyDeletionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ScheduleKeyDeletionResult::~ScheduleKeyDeletionResult()
|
||||
{}
|
||||
|
||||
void ScheduleKeyDeletionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
60
kms/src/model/TagResourceRequest.cc
Normal file
60
kms/src/model/TagResourceRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/TagResourceRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::TagResourceRequest;
|
||||
|
||||
TagResourceRequest::TagResourceRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "TagResource")
|
||||
{}
|
||||
|
||||
TagResourceRequest::~TagResourceRequest()
|
||||
{}
|
||||
|
||||
std::string TagResourceRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void TagResourceRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string TagResourceRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void TagResourceRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
std::string TagResourceRequest::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
void TagResourceRequest::setTags(const std::string& tags)
|
||||
{
|
||||
tags_ = tags;
|
||||
setParameter("Tags", tags);
|
||||
}
|
||||
|
||||
45
kms/src/model/TagResourceResult.cc
Normal file
45
kms/src/model/TagResourceResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/TagResourceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
TagResourceResult::TagResourceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TagResourceResult::TagResourceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TagResourceResult::~TagResourceResult()
|
||||
{}
|
||||
|
||||
void TagResourceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
60
kms/src/model/UntagResourceRequest.cc
Normal file
60
kms/src/model/UntagResourceRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UntagResourceRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UntagResourceRequest;
|
||||
|
||||
UntagResourceRequest::UntagResourceRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UntagResource")
|
||||
{}
|
||||
|
||||
UntagResourceRequest::~UntagResourceRequest()
|
||||
{}
|
||||
|
||||
std::string UntagResourceRequest::getTagKeys()const
|
||||
{
|
||||
return tagKeys_;
|
||||
}
|
||||
|
||||
void UntagResourceRequest::setTagKeys(const std::string& tagKeys)
|
||||
{
|
||||
tagKeys_ = tagKeys;
|
||||
setParameter("TagKeys", tagKeys);
|
||||
}
|
||||
|
||||
std::string UntagResourceRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void UntagResourceRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string UntagResourceRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void UntagResourceRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
52
kms/src/model/UntagResourceResult.cc
Normal file
52
kms/src/model/UntagResourceResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UntagResourceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UntagResourceResult::UntagResourceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UntagResourceResult::UntagResourceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UntagResourceResult::~UntagResourceResult()
|
||||
{}
|
||||
|
||||
void UntagResourceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UntagResourceResult::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
60
kms/src/model/UpdateAliasRequest.cc
Normal file
60
kms/src/model/UpdateAliasRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UpdateAliasRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UpdateAliasRequest;
|
||||
|
||||
UpdateAliasRequest::UpdateAliasRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UpdateAlias")
|
||||
{}
|
||||
|
||||
UpdateAliasRequest::~UpdateAliasRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateAliasRequest::getAliasName()const
|
||||
{
|
||||
return aliasName_;
|
||||
}
|
||||
|
||||
void UpdateAliasRequest::setAliasName(const std::string& aliasName)
|
||||
{
|
||||
aliasName_ = aliasName;
|
||||
setParameter("AliasName", aliasName);
|
||||
}
|
||||
|
||||
std::string UpdateAliasRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void UpdateAliasRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string UpdateAliasRequest::getSTSToken()const
|
||||
{
|
||||
return sTSToken_;
|
||||
}
|
||||
|
||||
void UpdateAliasRequest::setSTSToken(const std::string& sTSToken)
|
||||
{
|
||||
sTSToken_ = sTSToken;
|
||||
setParameter("STSToken", sTSToken);
|
||||
}
|
||||
|
||||
45
kms/src/model/UpdateAliasResult.cc
Normal file
45
kms/src/model/UpdateAliasResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UpdateAliasResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UpdateAliasResult::UpdateAliasResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateAliasResult::UpdateAliasResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateAliasResult::~UpdateAliasResult()
|
||||
{}
|
||||
|
||||
void UpdateAliasResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user