Add Certificate Manager Api.
This commit is contained in:
@@ -31,21 +31,21 @@ KmsClient::KmsClient(const Credentials &credentials, const ClientConfiguration &
|
||||
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");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms-service");
|
||||
}
|
||||
|
||||
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");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms-service");
|
||||
}
|
||||
|
||||
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");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms-service");
|
||||
}
|
||||
|
||||
KmsClient::~KmsClient()
|
||||
@@ -231,6 +231,150 @@ KmsClient::CancelKeyDeletionOutcomeCallable KmsClient::cancelKeyDeletionCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CertificatePrivateKeyDecryptOutcome KmsClient::certificatePrivateKeyDecrypt(const CertificatePrivateKeyDecryptRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CertificatePrivateKeyDecryptOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CertificatePrivateKeyDecryptOutcome(CertificatePrivateKeyDecryptResult(outcome.result()));
|
||||
else
|
||||
return CertificatePrivateKeyDecryptOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::certificatePrivateKeyDecryptAsync(const CertificatePrivateKeyDecryptRequest& request, const CertificatePrivateKeyDecryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, certificatePrivateKeyDecrypt(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CertificatePrivateKeyDecryptOutcomeCallable KmsClient::certificatePrivateKeyDecryptCallable(const CertificatePrivateKeyDecryptRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CertificatePrivateKeyDecryptOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->certificatePrivateKeyDecrypt(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CertificatePrivateKeySignOutcome KmsClient::certificatePrivateKeySign(const CertificatePrivateKeySignRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CertificatePrivateKeySignOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CertificatePrivateKeySignOutcome(CertificatePrivateKeySignResult(outcome.result()));
|
||||
else
|
||||
return CertificatePrivateKeySignOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::certificatePrivateKeySignAsync(const CertificatePrivateKeySignRequest& request, const CertificatePrivateKeySignAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, certificatePrivateKeySign(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CertificatePrivateKeySignOutcomeCallable KmsClient::certificatePrivateKeySignCallable(const CertificatePrivateKeySignRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CertificatePrivateKeySignOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->certificatePrivateKeySign(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CertificatePublicKeyEncryptOutcome KmsClient::certificatePublicKeyEncrypt(const CertificatePublicKeyEncryptRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CertificatePublicKeyEncryptOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CertificatePublicKeyEncryptOutcome(CertificatePublicKeyEncryptResult(outcome.result()));
|
||||
else
|
||||
return CertificatePublicKeyEncryptOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::certificatePublicKeyEncryptAsync(const CertificatePublicKeyEncryptRequest& request, const CertificatePublicKeyEncryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, certificatePublicKeyEncrypt(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CertificatePublicKeyEncryptOutcomeCallable KmsClient::certificatePublicKeyEncryptCallable(const CertificatePublicKeyEncryptRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CertificatePublicKeyEncryptOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->certificatePublicKeyEncrypt(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CertificatePublicKeyVerifyOutcome KmsClient::certificatePublicKeyVerify(const CertificatePublicKeyVerifyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CertificatePublicKeyVerifyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CertificatePublicKeyVerifyOutcome(CertificatePublicKeyVerifyResult(outcome.result()));
|
||||
else
|
||||
return CertificatePublicKeyVerifyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::certificatePublicKeyVerifyAsync(const CertificatePublicKeyVerifyRequest& request, const CertificatePublicKeyVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, certificatePublicKeyVerify(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CertificatePublicKeyVerifyOutcomeCallable KmsClient::certificatePublicKeyVerifyCallable(const CertificatePublicKeyVerifyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CertificatePublicKeyVerifyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->certificatePublicKeyVerify(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CreateAliasOutcome KmsClient::createAlias(const CreateAliasRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -267,6 +411,42 @@ KmsClient::CreateAliasOutcomeCallable KmsClient::createAliasCallable(const Creat
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CreateCertificateOutcome KmsClient::createCertificate(const CreateCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateCertificateOutcome(CreateCertificateResult(outcome.result()));
|
||||
else
|
||||
return CreateCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::createCertificateAsync(const CreateCertificateRequest& request, const CreateCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::CreateCertificateOutcomeCallable KmsClient::createCertificateCallable(const CreateCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::CreateKeyOutcome KmsClient::createKey(const CreateKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -447,6 +627,42 @@ KmsClient::DeleteAliasOutcomeCallable KmsClient::deleteAliasCallable(const Delet
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DeleteCertificateOutcome KmsClient::deleteCertificate(const DeleteCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteCertificateOutcome(DeleteCertificateResult(outcome.result()));
|
||||
else
|
||||
return DeleteCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::deleteCertificateAsync(const DeleteCertificateRequest& request, const DeleteCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DeleteCertificateOutcomeCallable KmsClient::deleteCertificateCallable(const DeleteCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DeleteKeyMaterialOutcome KmsClient::deleteKeyMaterial(const DeleteKeyMaterialRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -555,6 +771,42 @@ KmsClient::DescribeAccountKmsStatusOutcomeCallable KmsClient::describeAccountKms
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeCertificateOutcome KmsClient::describeCertificate(const DescribeCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeCertificateOutcome(DescribeCertificateResult(outcome.result()));
|
||||
else
|
||||
return DescribeCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::describeCertificateAsync(const DescribeCertificateRequest& request, const DescribeCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DescribeCertificateOutcomeCallable KmsClient::describeCertificateCallable(const DescribeCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeKeyOutcome KmsClient::describeKey(const DescribeKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -843,6 +1095,42 @@ KmsClient::EncryptOutcomeCallable KmsClient::encryptCallable(const EncryptReques
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ExportCertificateOutcome KmsClient::exportCertificate(const ExportCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ExportCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ExportCertificateOutcome(ExportCertificateResult(outcome.result()));
|
||||
else
|
||||
return ExportCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::exportCertificateAsync(const ExportCertificateRequest& request, const ExportCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, exportCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ExportCertificateOutcomeCallable KmsClient::exportCertificateCallable(const ExportCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ExportCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->exportCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ExportDataKeyOutcome KmsClient::exportDataKey(const ExportDataKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -987,6 +1275,42 @@ KmsClient::GenerateDataKeyWithoutPlaintextOutcomeCallable KmsClient::generateDat
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetCertificateOutcome KmsClient::getCertificate(const GetCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetCertificateOutcome(GetCertificateResult(outcome.result()));
|
||||
else
|
||||
return GetCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::getCertificateAsync(const GetCertificateRequest& request, const GetCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::GetCertificateOutcomeCallable KmsClient::getCertificateCallable(const GetCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetParametersForImportOutcome KmsClient::getParametersForImport(const GetParametersForImportRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1131,6 +1455,78 @@ KmsClient::GetSecretValueOutcomeCallable KmsClient::getSecretValueCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ImportCertificateOutcome KmsClient::importCertificate(const ImportCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ImportCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ImportCertificateOutcome(ImportCertificateResult(outcome.result()));
|
||||
else
|
||||
return ImportCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::importCertificateAsync(const ImportCertificateRequest& request, const ImportCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, importCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ImportCertificateOutcomeCallable KmsClient::importCertificateCallable(const ImportCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ImportCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->importCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ImportEncryptionCertificateOutcome KmsClient::importEncryptionCertificate(const ImportEncryptionCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ImportEncryptionCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ImportEncryptionCertificateOutcome(ImportEncryptionCertificateResult(outcome.result()));
|
||||
else
|
||||
return ImportEncryptionCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::importEncryptionCertificateAsync(const ImportEncryptionCertificateRequest& request, const ImportEncryptionCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, importEncryptionCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ImportEncryptionCertificateOutcomeCallable KmsClient::importEncryptionCertificateCallable(const ImportEncryptionCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ImportEncryptionCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->importEncryptionCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ImportKeyMaterialOutcome KmsClient::importKeyMaterial(const ImportKeyMaterialRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1239,6 +1635,42 @@ KmsClient::ListAliasesByKeyIdOutcomeCallable KmsClient::listAliasesByKeyIdCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListCertificatesOutcome KmsClient::listCertificates(const ListCertificatesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListCertificatesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListCertificatesOutcome(ListCertificatesResult(outcome.result()));
|
||||
else
|
||||
return ListCertificatesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::listCertificatesAsync(const ListCertificatesRequest& request, const ListCertificatesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listCertificates(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ListCertificatesOutcomeCallable KmsClient::listCertificatesCallable(const ListCertificatesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListCertificatesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listCertificates(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListKeyVersionsOutcome KmsClient::listKeyVersions(const ListKeyVersionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1707,6 +2139,42 @@ KmsClient::UpdateAliasOutcomeCallable KmsClient::updateAliasCallable(const Updat
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UpdateCertificateStatusOutcome KmsClient::updateCertificateStatus(const UpdateCertificateStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateCertificateStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateCertificateStatusOutcome(UpdateCertificateStatusResult(outcome.result()));
|
||||
else
|
||||
return UpdateCertificateStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::updateCertificateStatusAsync(const UpdateCertificateStatusRequest& request, const UpdateCertificateStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateCertificateStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UpdateCertificateStatusOutcomeCallable KmsClient::updateCertificateStatusCallable(const UpdateCertificateStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateCertificateStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateCertificateStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UpdateKeyDescriptionOutcome KmsClient::updateKeyDescription(const UpdateKeyDescriptionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1851,3 +2319,39 @@ KmsClient::UpdateSecretVersionStageOutcomeCallable KmsClient::updateSecretVersio
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UploadCertificateOutcome KmsClient::uploadCertificate(const UploadCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UploadCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UploadCertificateOutcome(UploadCertificateResult(outcome.result()));
|
||||
else
|
||||
return UploadCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::uploadCertificateAsync(const UploadCertificateRequest& request, const UploadCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, uploadCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UploadCertificateOutcomeCallable KmsClient::uploadCertificateCallable(const UploadCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UploadCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->uploadCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
62
kms/src/model/CertificatePrivateKeyDecryptRequest.cc
Normal file
62
kms/src/model/CertificatePrivateKeyDecryptRequest.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/CertificatePrivateKeyDecryptRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CertificatePrivateKeyDecryptRequest;
|
||||
|
||||
CertificatePrivateKeyDecryptRequest::CertificatePrivateKeyDecryptRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CertificatePrivateKeyDecrypt")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CertificatePrivateKeyDecryptRequest::~CertificatePrivateKeyDecryptRequest()
|
||||
{}
|
||||
|
||||
std::string CertificatePrivateKeyDecryptRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void CertificatePrivateKeyDecryptRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeyDecryptRequest::getAlgorithm()const
|
||||
{
|
||||
return algorithm_;
|
||||
}
|
||||
|
||||
void CertificatePrivateKeyDecryptRequest::setAlgorithm(const std::string& algorithm)
|
||||
{
|
||||
algorithm_ = algorithm;
|
||||
setParameter("Algorithm", algorithm);
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeyDecryptRequest::getCiphertextBlob()const
|
||||
{
|
||||
return ciphertextBlob_;
|
||||
}
|
||||
|
||||
void CertificatePrivateKeyDecryptRequest::setCiphertextBlob(const std::string& ciphertextBlob)
|
||||
{
|
||||
ciphertextBlob_ = ciphertextBlob;
|
||||
setParameter("CiphertextBlob", ciphertextBlob);
|
||||
}
|
||||
|
||||
58
kms/src/model/CertificatePrivateKeyDecryptResult.cc
Normal file
58
kms/src/model/CertificatePrivateKeyDecryptResult.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/CertificatePrivateKeyDecryptResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CertificatePrivateKeyDecryptResult::CertificatePrivateKeyDecryptResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CertificatePrivateKeyDecryptResult::CertificatePrivateKeyDecryptResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CertificatePrivateKeyDecryptResult::~CertificatePrivateKeyDecryptResult()
|
||||
{}
|
||||
|
||||
void CertificatePrivateKeyDecryptResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["Plaintext"].isNull())
|
||||
plaintext_ = value["Plaintext"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeyDecryptResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeyDecryptResult::getPlaintext()const
|
||||
{
|
||||
return plaintext_;
|
||||
}
|
||||
|
||||
73
kms/src/model/CertificatePrivateKeySignRequest.cc
Normal file
73
kms/src/model/CertificatePrivateKeySignRequest.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/CertificatePrivateKeySignRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CertificatePrivateKeySignRequest;
|
||||
|
||||
CertificatePrivateKeySignRequest::CertificatePrivateKeySignRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CertificatePrivateKeySign")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CertificatePrivateKeySignRequest::~CertificatePrivateKeySignRequest()
|
||||
{}
|
||||
|
||||
std::string CertificatePrivateKeySignRequest::getMessageType()const
|
||||
{
|
||||
return messageType_;
|
||||
}
|
||||
|
||||
void CertificatePrivateKeySignRequest::setMessageType(const std::string& messageType)
|
||||
{
|
||||
messageType_ = messageType;
|
||||
setParameter("MessageType", messageType);
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeySignRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void CertificatePrivateKeySignRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeySignRequest::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
void CertificatePrivateKeySignRequest::setMessage(const std::string& message)
|
||||
{
|
||||
message_ = message;
|
||||
setParameter("Message", message);
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeySignRequest::getAlgorithm()const
|
||||
{
|
||||
return algorithm_;
|
||||
}
|
||||
|
||||
void CertificatePrivateKeySignRequest::setAlgorithm(const std::string& algorithm)
|
||||
{
|
||||
algorithm_ = algorithm;
|
||||
setParameter("Algorithm", algorithm);
|
||||
}
|
||||
|
||||
58
kms/src/model/CertificatePrivateKeySignResult.cc
Normal file
58
kms/src/model/CertificatePrivateKeySignResult.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/CertificatePrivateKeySignResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CertificatePrivateKeySignResult::CertificatePrivateKeySignResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CertificatePrivateKeySignResult::CertificatePrivateKeySignResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CertificatePrivateKeySignResult::~CertificatePrivateKeySignResult()
|
||||
{}
|
||||
|
||||
void CertificatePrivateKeySignResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["SignatureValue"].isNull())
|
||||
signatureValue_ = value["SignatureValue"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeySignResult::getSignatureValue()const
|
||||
{
|
||||
return signatureValue_;
|
||||
}
|
||||
|
||||
std::string CertificatePrivateKeySignResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
62
kms/src/model/CertificatePublicKeyEncryptRequest.cc
Normal file
62
kms/src/model/CertificatePublicKeyEncryptRequest.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/CertificatePublicKeyEncryptRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CertificatePublicKeyEncryptRequest;
|
||||
|
||||
CertificatePublicKeyEncryptRequest::CertificatePublicKeyEncryptRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CertificatePublicKeyEncrypt")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CertificatePublicKeyEncryptRequest::~CertificatePublicKeyEncryptRequest()
|
||||
{}
|
||||
|
||||
std::string CertificatePublicKeyEncryptRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyEncryptRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyEncryptRequest::getPlaintext()const
|
||||
{
|
||||
return plaintext_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyEncryptRequest::setPlaintext(const std::string& plaintext)
|
||||
{
|
||||
plaintext_ = plaintext;
|
||||
setParameter("Plaintext", plaintext);
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyEncryptRequest::getAlgorithm()const
|
||||
{
|
||||
return algorithm_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyEncryptRequest::setAlgorithm(const std::string& algorithm)
|
||||
{
|
||||
algorithm_ = algorithm;
|
||||
setParameter("Algorithm", algorithm);
|
||||
}
|
||||
|
||||
58
kms/src/model/CertificatePublicKeyEncryptResult.cc
Normal file
58
kms/src/model/CertificatePublicKeyEncryptResult.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/CertificatePublicKeyEncryptResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CertificatePublicKeyEncryptResult::CertificatePublicKeyEncryptResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CertificatePublicKeyEncryptResult::CertificatePublicKeyEncryptResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CertificatePublicKeyEncryptResult::~CertificatePublicKeyEncryptResult()
|
||||
{}
|
||||
|
||||
void CertificatePublicKeyEncryptResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["CiphertextBlob"].isNull())
|
||||
ciphertextBlob_ = value["CiphertextBlob"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyEncryptResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyEncryptResult::getCiphertextBlob()const
|
||||
{
|
||||
return ciphertextBlob_;
|
||||
}
|
||||
|
||||
84
kms/src/model/CertificatePublicKeyVerifyRequest.cc
Normal file
84
kms/src/model/CertificatePublicKeyVerifyRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/CertificatePublicKeyVerifyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CertificatePublicKeyVerifyRequest;
|
||||
|
||||
CertificatePublicKeyVerifyRequest::CertificatePublicKeyVerifyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CertificatePublicKeyVerify")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CertificatePublicKeyVerifyRequest::~CertificatePublicKeyVerifyRequest()
|
||||
{}
|
||||
|
||||
std::string CertificatePublicKeyVerifyRequest::getSignatureValue()const
|
||||
{
|
||||
return signatureValue_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyVerifyRequest::setSignatureValue(const std::string& signatureValue)
|
||||
{
|
||||
signatureValue_ = signatureValue;
|
||||
setParameter("SignatureValue", signatureValue);
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyVerifyRequest::getMessageType()const
|
||||
{
|
||||
return messageType_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyVerifyRequest::setMessageType(const std::string& messageType)
|
||||
{
|
||||
messageType_ = messageType;
|
||||
setParameter("MessageType", messageType);
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyVerifyRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyVerifyRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyVerifyRequest::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyVerifyRequest::setMessage(const std::string& message)
|
||||
{
|
||||
message_ = message;
|
||||
setParameter("Message", message);
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyVerifyRequest::getAlgorithm()const
|
||||
{
|
||||
return algorithm_;
|
||||
}
|
||||
|
||||
void CertificatePublicKeyVerifyRequest::setAlgorithm(const std::string& algorithm)
|
||||
{
|
||||
algorithm_ = algorithm;
|
||||
setParameter("Algorithm", algorithm);
|
||||
}
|
||||
|
||||
58
kms/src/model/CertificatePublicKeyVerifyResult.cc
Normal file
58
kms/src/model/CertificatePublicKeyVerifyResult.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/CertificatePublicKeyVerifyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CertificatePublicKeyVerifyResult::CertificatePublicKeyVerifyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CertificatePublicKeyVerifyResult::CertificatePublicKeyVerifyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CertificatePublicKeyVerifyResult::~CertificatePublicKeyVerifyResult()
|
||||
{}
|
||||
|
||||
void CertificatePublicKeyVerifyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["SignatureValid"].isNull())
|
||||
signatureValid_ = value["SignatureValid"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string CertificatePublicKeyVerifyResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
bool CertificatePublicKeyVerifyResult::getSignatureValid()const
|
||||
{
|
||||
return signatureValid_;
|
||||
}
|
||||
|
||||
73
kms/src/model/CreateCertificateRequest.cc
Normal file
73
kms/src/model/CreateCertificateRequest.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/CreateCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::CreateCertificateRequest;
|
||||
|
||||
CreateCertificateRequest::CreateCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "CreateCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateCertificateRequest::~CreateCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string CreateCertificateRequest::getProtectionLevel()const
|
||||
{
|
||||
return protectionLevel_;
|
||||
}
|
||||
|
||||
void CreateCertificateRequest::setProtectionLevel(const std::string& protectionLevel)
|
||||
{
|
||||
protectionLevel_ = protectionLevel;
|
||||
setParameter("ProtectionLevel", protectionLevel);
|
||||
}
|
||||
|
||||
std::string CreateCertificateRequest::getSubject()const
|
||||
{
|
||||
return subject_;
|
||||
}
|
||||
|
||||
void CreateCertificateRequest::setSubject(const std::string& subject)
|
||||
{
|
||||
subject_ = subject;
|
||||
setParameter("Subject", subject);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> CreateCertificateRequest::getSubjectAlternativeNames()const
|
||||
{
|
||||
return subjectAlternativeNames_;
|
||||
}
|
||||
|
||||
void CreateCertificateRequest::setSubjectAlternativeNames(const std::map<std::string, std::string>& subjectAlternativeNames)
|
||||
{
|
||||
subjectAlternativeNames_ = subjectAlternativeNames;
|
||||
setJsonParameters("SubjectAlternativeNames", subjectAlternativeNames);
|
||||
}
|
||||
|
||||
std::string CreateCertificateRequest::getKeySpec()const
|
||||
{
|
||||
return keySpec_;
|
||||
}
|
||||
|
||||
void CreateCertificateRequest::setKeySpec(const std::string& keySpec)
|
||||
{
|
||||
keySpec_ = keySpec;
|
||||
setParameter("KeySpec", keySpec);
|
||||
}
|
||||
|
||||
65
kms/src/model/CreateCertificateResult.cc
Normal file
65
kms/src/model/CreateCertificateResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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/CreateCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
CreateCertificateResult::CreateCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCertificateResult::CreateCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCertificateResult::~CreateCertificateResult()
|
||||
{}
|
||||
|
||||
void CreateCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["Arn"].isNull())
|
||||
arn_ = value["Arn"].asString();
|
||||
if(!value["Csr"].isNull())
|
||||
csr_ = value["Csr"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCertificateResult::getCsr()const
|
||||
{
|
||||
return csr_;
|
||||
}
|
||||
|
||||
std::string CreateCertificateResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string CreateCertificateResult::getArn()const
|
||||
{
|
||||
return arn_;
|
||||
}
|
||||
|
||||
40
kms/src/model/DeleteCertificateRequest.cc
Normal file
40
kms/src/model/DeleteCertificateRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/DeleteCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DeleteCertificateRequest;
|
||||
|
||||
DeleteCertificateRequest::DeleteCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DeleteCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteCertificateRequest::~DeleteCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteCertificateRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void DeleteCertificateRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
44
kms/src/model/DeleteCertificateResult.cc
Normal file
44
kms/src/model/DeleteCertificateResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/DeleteCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DeleteCertificateResult::DeleteCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteCertificateResult::DeleteCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteCertificateResult::~DeleteCertificateResult()
|
||||
{}
|
||||
|
||||
void DeleteCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
40
kms/src/model/DescribeCertificateRequest.cc
Normal file
40
kms/src/model/DescribeCertificateRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/DescribeCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DescribeCertificateRequest;
|
||||
|
||||
DescribeCertificateRequest::DescribeCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DescribeCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeCertificateRequest::~DescribeCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeCertificateRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void DescribeCertificateRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
164
kms/src/model/DescribeCertificateResult.cc
Normal file
164
kms/src/model/DescribeCertificateResult.cc
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* 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/DescribeCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DescribeCertificateResult::DescribeCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeCertificateResult::DescribeCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeCertificateResult::~DescribeCertificateResult()
|
||||
{}
|
||||
|
||||
void DescribeCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSubjectAlternativeNames = value["SubjectAlternativeNames"]["SubjectAlternativeName"];
|
||||
for (const auto &item : allSubjectAlternativeNames)
|
||||
subjectAlternativeNames_.push_back(item.asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["Arn"].isNull())
|
||||
arn_ = value["Arn"].asString();
|
||||
if(!value["KeySpec"].isNull())
|
||||
keySpec_ = value["KeySpec"].asString();
|
||||
if(!value["ProtectionLevel"].isNull())
|
||||
protectionLevel_ = value["ProtectionLevel"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["CreatedAt"].isNull())
|
||||
createdAt_ = value["CreatedAt"].asString();
|
||||
if(!value["UpdatedAt"].isNull())
|
||||
updatedAt_ = value["UpdatedAt"].asString();
|
||||
if(!value["Serial"].isNull())
|
||||
serial_ = value["Serial"].asString();
|
||||
if(!value["Subject"].isNull())
|
||||
subject_ = value["Subject"].asString();
|
||||
if(!value["Issuer"].isNull())
|
||||
issuer_ = value["Issuer"].asString();
|
||||
if(!value["NotBefore"].isNull())
|
||||
notBefore_ = value["NotBefore"].asString();
|
||||
if(!value["NotAfter"].isNull())
|
||||
notAfter_ = value["NotAfter"].asString();
|
||||
if(!value["SignatureAlgorithm"].isNull())
|
||||
signatureAlgorithm_ = value["SignatureAlgorithm"].asString();
|
||||
if(!value["SubjectPublicKey"].isNull())
|
||||
subjectPublicKey_ = value["SubjectPublicKey"].asString();
|
||||
if(!value["SubjectKeyIdentifier"].isNull())
|
||||
subjectKeyIdentifier_ = value["SubjectKeyIdentifier"].asString();
|
||||
if(!value["Tags"].isNull())
|
||||
tags_ = value["Tags"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getProtectionLevel()const
|
||||
{
|
||||
return protectionLevel_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getIssuer()const
|
||||
{
|
||||
return issuer_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getKeySpec()const
|
||||
{
|
||||
return keySpec_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getCreatedAt()const
|
||||
{
|
||||
return createdAt_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeCertificateResult::getSubjectAlternativeNames()const
|
||||
{
|
||||
return subjectAlternativeNames_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getSignatureAlgorithm()const
|
||||
{
|
||||
return signatureAlgorithm_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getSubjectKeyIdentifier()const
|
||||
{
|
||||
return subjectKeyIdentifier_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getNotAfter()const
|
||||
{
|
||||
return notAfter_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getUpdatedAt()const
|
||||
{
|
||||
return updatedAt_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getSubject()const
|
||||
{
|
||||
return subject_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getSerial()const
|
||||
{
|
||||
return serial_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getSubjectPublicKey()const
|
||||
{
|
||||
return subjectPublicKey_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getArn()const
|
||||
{
|
||||
return arn_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getNotBefore()const
|
||||
{
|
||||
return notBefore_;
|
||||
}
|
||||
|
||||
std::string DescribeCertificateResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
62
kms/src/model/ExportCertificateRequest.cc
Normal file
62
kms/src/model/ExportCertificateRequest.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/ExportCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ExportCertificateRequest;
|
||||
|
||||
ExportCertificateRequest::ExportCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ExportCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ExportCertificateRequest::~ExportCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string ExportCertificateRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void ExportCertificateRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string ExportCertificateRequest::getPassphrase()const
|
||||
{
|
||||
return passphrase_;
|
||||
}
|
||||
|
||||
void ExportCertificateRequest::setPassphrase(const std::string& passphrase)
|
||||
{
|
||||
passphrase_ = passphrase;
|
||||
setParameter("Passphrase", passphrase);
|
||||
}
|
||||
|
||||
std::string ExportCertificateRequest::getExportFormat()const
|
||||
{
|
||||
return exportFormat_;
|
||||
}
|
||||
|
||||
void ExportCertificateRequest::setExportFormat(const std::string& exportFormat)
|
||||
{
|
||||
exportFormat_ = exportFormat;
|
||||
setParameter("ExportFormat", exportFormat);
|
||||
}
|
||||
|
||||
79
kms/src/model/ExportCertificateResult.cc
Normal file
79
kms/src/model/ExportCertificateResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/ExportCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ExportCertificateResult::ExportCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ExportCertificateResult::ExportCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ExportCertificateResult::~ExportCertificateResult()
|
||||
{}
|
||||
|
||||
void ExportCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["Certificate"].isNull())
|
||||
certificate_ = value["Certificate"].asString();
|
||||
if(!value["CertificateChain"].isNull())
|
||||
certificateChain_ = value["CertificateChain"].asString();
|
||||
if(!value["PrivateKey"].isNull())
|
||||
privateKey_ = value["PrivateKey"].asString();
|
||||
if(!value["PKCS12Blob"].isNull())
|
||||
pKCS12Blob_ = value["PKCS12Blob"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ExportCertificateResult::getPrivateKey()const
|
||||
{
|
||||
return privateKey_;
|
||||
}
|
||||
|
||||
std::string ExportCertificateResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string ExportCertificateResult::getCertificateChain()const
|
||||
{
|
||||
return certificateChain_;
|
||||
}
|
||||
|
||||
std::string ExportCertificateResult::getPKCS12Blob()const
|
||||
{
|
||||
return pKCS12Blob_;
|
||||
}
|
||||
|
||||
std::string ExportCertificateResult::getCertificate()const
|
||||
{
|
||||
return certificate_;
|
||||
}
|
||||
|
||||
40
kms/src/model/GetCertificateRequest.cc
Normal file
40
kms/src/model/GetCertificateRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/GetCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::GetCertificateRequest;
|
||||
|
||||
GetCertificateRequest::GetCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "GetCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetCertificateRequest::~GetCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string GetCertificateRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void GetCertificateRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
72
kms/src/model/GetCertificateResult.cc
Normal file
72
kms/src/model/GetCertificateResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/GetCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
GetCertificateResult::GetCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetCertificateResult::GetCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetCertificateResult::~GetCertificateResult()
|
||||
{}
|
||||
|
||||
void GetCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Certificate"].isNull())
|
||||
certificate_ = value["Certificate"].asString();
|
||||
if(!value["CertificateChain"].isNull())
|
||||
certificateChain_ = value["CertificateChain"].asString();
|
||||
if(!value["Csr"].isNull())
|
||||
csr_ = value["Csr"].asString();
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetCertificateResult::getCsr()const
|
||||
{
|
||||
return csr_;
|
||||
}
|
||||
|
||||
std::string GetCertificateResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string GetCertificateResult::getCertificateChain()const
|
||||
{
|
||||
return certificateChain_;
|
||||
}
|
||||
|
||||
std::string GetCertificateResult::getCertificate()const
|
||||
{
|
||||
return certificate_;
|
||||
}
|
||||
|
||||
51
kms/src/model/ImportCertificateRequest.cc
Normal file
51
kms/src/model/ImportCertificateRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/ImportCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ImportCertificateRequest;
|
||||
|
||||
ImportCertificateRequest::ImportCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ImportCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ImportCertificateRequest::~ImportCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string ImportCertificateRequest::getPKCS12Blob()const
|
||||
{
|
||||
return pKCS12Blob_;
|
||||
}
|
||||
|
||||
void ImportCertificateRequest::setPKCS12Blob(const std::string& pKCS12Blob)
|
||||
{
|
||||
pKCS12Blob_ = pKCS12Blob;
|
||||
setParameter("PKCS12Blob", pKCS12Blob);
|
||||
}
|
||||
|
||||
std::string ImportCertificateRequest::getPassphrase()const
|
||||
{
|
||||
return passphrase_;
|
||||
}
|
||||
|
||||
void ImportCertificateRequest::setPassphrase(const std::string& passphrase)
|
||||
{
|
||||
passphrase_ = passphrase;
|
||||
setParameter("Passphrase", passphrase);
|
||||
}
|
||||
|
||||
58
kms/src/model/ImportCertificateResult.cc
Normal file
58
kms/src/model/ImportCertificateResult.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/ImportCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ImportCertificateResult::ImportCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ImportCertificateResult::ImportCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ImportCertificateResult::~ImportCertificateResult()
|
||||
{}
|
||||
|
||||
void ImportCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["Arn"].isNull())
|
||||
arn_ = value["Arn"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ImportCertificateResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string ImportCertificateResult::getArn()const
|
||||
{
|
||||
return arn_;
|
||||
}
|
||||
|
||||
106
kms/src/model/ImportEncryptionCertificateRequest.cc
Normal file
106
kms/src/model/ImportEncryptionCertificateRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/ImportEncryptionCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ImportEncryptionCertificateRequest;
|
||||
|
||||
ImportEncryptionCertificateRequest::ImportEncryptionCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ImportEncryptionCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ImportEncryptionCertificateRequest::~ImportEncryptionCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string ImportEncryptionCertificateRequest::getAsymmetricAlgorithm()const
|
||||
{
|
||||
return asymmetricAlgorithm_;
|
||||
}
|
||||
|
||||
void ImportEncryptionCertificateRequest::setAsymmetricAlgorithm(const std::string& asymmetricAlgorithm)
|
||||
{
|
||||
asymmetricAlgorithm_ = asymmetricAlgorithm;
|
||||
setParameter("AsymmetricAlgorithm", asymmetricAlgorithm);
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateRequest::getSymmetricAlgorithm()const
|
||||
{
|
||||
return symmetricAlgorithm_;
|
||||
}
|
||||
|
||||
void ImportEncryptionCertificateRequest::setSymmetricAlgorithm(const std::string& symmetricAlgorithm)
|
||||
{
|
||||
symmetricAlgorithm_ = symmetricAlgorithm;
|
||||
setParameter("SymmetricAlgorithm", symmetricAlgorithm);
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateRequest::getEncryptedPrivateKey()const
|
||||
{
|
||||
return encryptedPrivateKey_;
|
||||
}
|
||||
|
||||
void ImportEncryptionCertificateRequest::setEncryptedPrivateKey(const std::string& encryptedPrivateKey)
|
||||
{
|
||||
encryptedPrivateKey_ = encryptedPrivateKey;
|
||||
setParameter("EncryptedPrivateKey", encryptedPrivateKey);
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateRequest::getEncryptedSymmetricKey()const
|
||||
{
|
||||
return encryptedSymmetricKey_;
|
||||
}
|
||||
|
||||
void ImportEncryptionCertificateRequest::setEncryptedSymmetricKey(const std::string& encryptedSymmetricKey)
|
||||
{
|
||||
encryptedSymmetricKey_ = encryptedSymmetricKey;
|
||||
setParameter("EncryptedSymmetricKey", encryptedSymmetricKey);
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void ImportEncryptionCertificateRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateRequest::getCertificate()const
|
||||
{
|
||||
return certificate_;
|
||||
}
|
||||
|
||||
void ImportEncryptionCertificateRequest::setCertificate(const std::string& certificate)
|
||||
{
|
||||
certificate_ = certificate;
|
||||
setParameter("Certificate", certificate);
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateRequest::getCertificateChain()const
|
||||
{
|
||||
return certificateChain_;
|
||||
}
|
||||
|
||||
void ImportEncryptionCertificateRequest::setCertificateChain(const std::string& certificateChain)
|
||||
{
|
||||
certificateChain_ = certificateChain;
|
||||
setParameter("CertificateChain", certificateChain);
|
||||
}
|
||||
|
||||
58
kms/src/model/ImportEncryptionCertificateResult.cc
Normal file
58
kms/src/model/ImportEncryptionCertificateResult.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/ImportEncryptionCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ImportEncryptionCertificateResult::ImportEncryptionCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ImportEncryptionCertificateResult::ImportEncryptionCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ImportEncryptionCertificateResult::~ImportEncryptionCertificateResult()
|
||||
{}
|
||||
|
||||
void ImportEncryptionCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertificateId"].isNull())
|
||||
certificateId_ = value["CertificateId"].asString();
|
||||
if(!value["Arn"].isNull())
|
||||
arn_ = value["Arn"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateResult::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
std::string ImportEncryptionCertificateResult::getArn()const
|
||||
{
|
||||
return arn_;
|
||||
}
|
||||
|
||||
84
kms/src/model/ListCertificatesRequest.cc
Normal file
84
kms/src/model/ListCertificatesRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/ListCertificatesRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ListCertificatesRequest;
|
||||
|
||||
ListCertificatesRequest::ListCertificatesRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ListCertificates")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListCertificatesRequest::~ListCertificatesRequest()
|
||||
{}
|
||||
|
||||
std::string ListCertificatesRequest::getSubject()const
|
||||
{
|
||||
return subject_;
|
||||
}
|
||||
|
||||
void ListCertificatesRequest::setSubject(const std::string& subject)
|
||||
{
|
||||
subject_ = subject;
|
||||
setParameter("Subject", subject);
|
||||
}
|
||||
|
||||
int ListCertificatesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListCertificatesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListCertificatesRequest::getIssuer()const
|
||||
{
|
||||
return issuer_;
|
||||
}
|
||||
|
||||
void ListCertificatesRequest::setIssuer(const std::string& issuer)
|
||||
{
|
||||
issuer_ = issuer;
|
||||
setParameter("Issuer", issuer);
|
||||
}
|
||||
|
||||
int ListCertificatesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListCertificatesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListCertificatesRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void ListCertificatesRequest::setStatus(const std::string& status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", status);
|
||||
}
|
||||
|
||||
92
kms/src/model/ListCertificatesResult.cc
Normal file
92
kms/src/model/ListCertificatesResult.cc
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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/ListCertificatesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ListCertificatesResult::ListCertificatesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListCertificatesResult::ListCertificatesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListCertificatesResult::~ListCertificatesResult()
|
||||
{}
|
||||
|
||||
void ListCertificatesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCertificateSummaryListNode = value["CertificateSummaryList"]["CertificateSummary"];
|
||||
for (auto valueCertificateSummaryListCertificateSummary : allCertificateSummaryListNode)
|
||||
{
|
||||
CertificateSummary certificateSummaryListObject;
|
||||
if(!valueCertificateSummaryListCertificateSummary["CertificateId"].isNull())
|
||||
certificateSummaryListObject.certificateId = valueCertificateSummaryListCertificateSummary["CertificateId"].asString();
|
||||
if(!valueCertificateSummaryListCertificateSummary["Subject"].isNull())
|
||||
certificateSummaryListObject.subject = valueCertificateSummaryListCertificateSummary["Subject"].asString();
|
||||
if(!valueCertificateSummaryListCertificateSummary["Issuer"].isNull())
|
||||
certificateSummaryListObject.issuer = valueCertificateSummaryListCertificateSummary["Issuer"].asString();
|
||||
if(!valueCertificateSummaryListCertificateSummary["KeySpec"].isNull())
|
||||
certificateSummaryListObject.keySpec = valueCertificateSummaryListCertificateSummary["KeySpec"].asString();
|
||||
if(!valueCertificateSummaryListCertificateSummary["ProtectionLevel"].isNull())
|
||||
certificateSummaryListObject.protectionLevel = valueCertificateSummaryListCertificateSummary["ProtectionLevel"].asString();
|
||||
if(!valueCertificateSummaryListCertificateSummary["NotBefore"].isNull())
|
||||
certificateSummaryListObject.notBefore = valueCertificateSummaryListCertificateSummary["NotBefore"].asString();
|
||||
if(!valueCertificateSummaryListCertificateSummary["NotAfter"].isNull())
|
||||
certificateSummaryListObject.notAfter = valueCertificateSummaryListCertificateSummary["NotAfter"].asString();
|
||||
if(!valueCertificateSummaryListCertificateSummary["Status"].isNull())
|
||||
certificateSummaryListObject.status = valueCertificateSummaryListCertificateSummary["Status"].asString();
|
||||
certificateSummaryList_.push_back(certificateSummaryListObject);
|
||||
}
|
||||
if(!value["TotalSize"].isNull())
|
||||
totalSize_ = std::stoi(value["TotalSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListCertificatesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListCertificatesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<ListCertificatesResult::CertificateSummary> ListCertificatesResult::getCertificateSummaryList()const
|
||||
{
|
||||
return certificateSummaryList_;
|
||||
}
|
||||
|
||||
int ListCertificatesResult::getTotalSize()const
|
||||
{
|
||||
return totalSize_;
|
||||
}
|
||||
|
||||
@@ -51,14 +51,14 @@ void ListSecretsResult::parse(const std::string &payload)
|
||||
secretListObject.secretName = valueSecretListSecret["SecretName"].asString();
|
||||
if(!valueSecretListSecret["UpdateTime"].isNull())
|
||||
secretListObject.updateTime = valueSecretListSecret["UpdateTime"].asString();
|
||||
auto allTagsNode = allSecretListNode["Tags"]["Tag"];
|
||||
for (auto allSecretListNodeTagsTag : allTagsNode)
|
||||
auto allTagsNode = valueSecretListSecret["Tags"]["Tag"];
|
||||
for (auto valueSecretListSecretTagsTag : allTagsNode)
|
||||
{
|
||||
Secret::Tag tagsObject;
|
||||
if(!allSecretListNodeTagsTag["TagKey"].isNull())
|
||||
tagsObject.tagKey = allSecretListNodeTagsTag["TagKey"].asString();
|
||||
if(!allSecretListNodeTagsTag["TagValue"].isNull())
|
||||
tagsObject.tagValue = allSecretListNodeTagsTag["TagValue"].asString();
|
||||
if(!valueSecretListSecretTagsTag["TagKey"].isNull())
|
||||
tagsObject.tagKey = valueSecretListSecretTagsTag["TagKey"].asString();
|
||||
if(!valueSecretListSecretTagsTag["TagValue"].isNull())
|
||||
tagsObject.tagValue = valueSecretListSecretTagsTag["TagValue"].asString();
|
||||
secretListObject.tags.push_back(tagsObject);
|
||||
}
|
||||
secretList_.push_back(secretListObject);
|
||||
|
||||
@@ -27,6 +27,17 @@ TagResourceRequest::TagResourceRequest() :
|
||||
TagResourceRequest::~TagResourceRequest()
|
||||
{}
|
||||
|
||||
std::string TagResourceRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void TagResourceRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string TagResourceRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
|
||||
@@ -27,6 +27,17 @@ UntagResourceRequest::UntagResourceRequest() :
|
||||
UntagResourceRequest::~UntagResourceRequest()
|
||||
{}
|
||||
|
||||
std::string UntagResourceRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void UntagResourceRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string UntagResourceRequest::getTagKeys()const
|
||||
{
|
||||
return tagKeys_;
|
||||
|
||||
51
kms/src/model/UpdateCertificateStatusRequest.cc
Normal file
51
kms/src/model/UpdateCertificateStatusRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/UpdateCertificateStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UpdateCertificateStatusRequest;
|
||||
|
||||
UpdateCertificateStatusRequest::UpdateCertificateStatusRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UpdateCertificateStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateCertificateStatusRequest::~UpdateCertificateStatusRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateCertificateStatusRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void UpdateCertificateStatusRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string UpdateCertificateStatusRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void UpdateCertificateStatusRequest::setStatus(const std::string& status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", status);
|
||||
}
|
||||
|
||||
44
kms/src/model/UpdateCertificateStatusResult.cc
Normal file
44
kms/src/model/UpdateCertificateStatusResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/UpdateCertificateStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UpdateCertificateStatusResult::UpdateCertificateStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateCertificateStatusResult::UpdateCertificateStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateCertificateStatusResult::~UpdateCertificateStatusResult()
|
||||
{}
|
||||
|
||||
void UpdateCertificateStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
62
kms/src/model/UploadCertificateRequest.cc
Normal file
62
kms/src/model/UploadCertificateRequest.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/UploadCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UploadCertificateRequest;
|
||||
|
||||
UploadCertificateRequest::UploadCertificateRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UploadCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UploadCertificateRequest::~UploadCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string UploadCertificateRequest::getCertificateId()const
|
||||
{
|
||||
return certificateId_;
|
||||
}
|
||||
|
||||
void UploadCertificateRequest::setCertificateId(const std::string& certificateId)
|
||||
{
|
||||
certificateId_ = certificateId;
|
||||
setParameter("CertificateId", certificateId);
|
||||
}
|
||||
|
||||
std::string UploadCertificateRequest::getCertificate()const
|
||||
{
|
||||
return certificate_;
|
||||
}
|
||||
|
||||
void UploadCertificateRequest::setCertificate(const std::string& certificate)
|
||||
{
|
||||
certificate_ = certificate;
|
||||
setParameter("Certificate", certificate);
|
||||
}
|
||||
|
||||
std::string UploadCertificateRequest::getCertificateChain()const
|
||||
{
|
||||
return certificateChain_;
|
||||
}
|
||||
|
||||
void UploadCertificateRequest::setCertificateChain(const std::string& certificateChain)
|
||||
{
|
||||
certificateChain_ = certificateChain;
|
||||
setParameter("CertificateChain", certificateChain);
|
||||
}
|
||||
|
||||
44
kms/src/model/UploadCertificateResult.cc
Normal file
44
kms/src/model/UploadCertificateResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/UploadCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UploadCertificateResult::UploadCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UploadCertificateResult::UploadCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UploadCertificateResult::~UploadCertificateResult()
|
||||
{}
|
||||
|
||||
void UploadCertificateResult::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