Supported secretmanager for kms.

This commit is contained in:
sdk-team
2020-02-28 17:10:17 +08:00
parent ca9bc6363b
commit 14fa5fe61a
89 changed files with 3497 additions and 127 deletions

View File

@@ -339,6 +339,42 @@ KmsClient::CreateKeyVersionOutcomeCallable KmsClient::createKeyVersionCallable(c
return task->get_future();
}
KmsClient::CreateSecretOutcome KmsClient::createSecret(const CreateSecretRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateSecretOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateSecretOutcome(CreateSecretResult(outcome.result()));
else
return CreateSecretOutcome(outcome.error());
}
void KmsClient::createSecretAsync(const CreateSecretRequest& request, const CreateSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createSecret(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::CreateSecretOutcomeCallable KmsClient::createSecretCallable(const CreateSecretRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateSecretOutcome()>>(
[this, request]()
{
return this->createSecret(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::DecryptOutcome KmsClient::decrypt(const DecryptRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -447,6 +483,42 @@ KmsClient::DeleteKeyMaterialOutcomeCallable KmsClient::deleteKeyMaterialCallable
return task->get_future();
}
KmsClient::DeleteSecretOutcome KmsClient::deleteSecret(const DeleteSecretRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteSecretOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteSecretOutcome(DeleteSecretResult(outcome.result()));
else
return DeleteSecretOutcome(outcome.error());
}
void KmsClient::deleteSecretAsync(const DeleteSecretRequest& request, const DeleteSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteSecret(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::DeleteSecretOutcomeCallable KmsClient::deleteSecretCallable(const DeleteSecretRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteSecretOutcome()>>(
[this, request]()
{
return this->deleteSecret(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::DescribeKeyOutcome KmsClient::describeKey(const DescribeKeyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -555,6 +627,42 @@ KmsClient::DescribeRegionsOutcomeCallable KmsClient::describeRegionsCallable(con
return task->get_future();
}
KmsClient::DescribeSecretOutcome KmsClient::describeSecret(const DescribeSecretRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeSecretOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeSecretOutcome(DescribeSecretResult(outcome.result()));
else
return DescribeSecretOutcome(outcome.error());
}
void KmsClient::describeSecretAsync(const DescribeSecretRequest& request, const DescribeSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeSecret(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::DescribeSecretOutcomeCallable KmsClient::describeSecretCallable(const DescribeSecretRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeSecretOutcome()>>(
[this, request]()
{
return this->describeSecret(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::DescribeServiceOutcome KmsClient::describeService(const DescribeServiceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -843,6 +951,78 @@ KmsClient::GetPublicKeyOutcomeCallable KmsClient::getPublicKeyCallable(const Get
return task->get_future();
}
KmsClient::GetRandomPasswordOutcome KmsClient::getRandomPassword(const GetRandomPasswordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetRandomPasswordOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetRandomPasswordOutcome(GetRandomPasswordResult(outcome.result()));
else
return GetRandomPasswordOutcome(outcome.error());
}
void KmsClient::getRandomPasswordAsync(const GetRandomPasswordRequest& request, const GetRandomPasswordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getRandomPassword(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::GetRandomPasswordOutcomeCallable KmsClient::getRandomPasswordCallable(const GetRandomPasswordRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetRandomPasswordOutcome()>>(
[this, request]()
{
return this->getRandomPassword(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::GetSecretValueOutcome KmsClient::getSecretValue(const GetSecretValueRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetSecretValueOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetSecretValueOutcome(GetSecretValueResult(outcome.result()));
else
return GetSecretValueOutcome(outcome.error());
}
void KmsClient::getSecretValueAsync(const GetSecretValueRequest& request, const GetSecretValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getSecretValue(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::GetSecretValueOutcomeCallable KmsClient::getSecretValueCallable(const GetSecretValueRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetSecretValueOutcome()>>(
[this, request]()
{
return this->getSecretValue(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::ImportKeyMaterialOutcome KmsClient::importKeyMaterial(const ImportKeyMaterialRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1059,6 +1239,150 @@ KmsClient::ListResourceTagsOutcomeCallable KmsClient::listResourceTagsCallable(c
return task->get_future();
}
KmsClient::ListSecretVersionIdsOutcome KmsClient::listSecretVersionIds(const ListSecretVersionIdsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSecretVersionIdsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSecretVersionIdsOutcome(ListSecretVersionIdsResult(outcome.result()));
else
return ListSecretVersionIdsOutcome(outcome.error());
}
void KmsClient::listSecretVersionIdsAsync(const ListSecretVersionIdsRequest& request, const ListSecretVersionIdsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSecretVersionIds(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::ListSecretVersionIdsOutcomeCallable KmsClient::listSecretVersionIdsCallable(const ListSecretVersionIdsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSecretVersionIdsOutcome()>>(
[this, request]()
{
return this->listSecretVersionIds(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::ListSecretsOutcome KmsClient::listSecrets(const ListSecretsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSecretsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSecretsOutcome(ListSecretsResult(outcome.result()));
else
return ListSecretsOutcome(outcome.error());
}
void KmsClient::listSecretsAsync(const ListSecretsRequest& request, const ListSecretsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSecrets(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::ListSecretsOutcomeCallable KmsClient::listSecretsCallable(const ListSecretsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSecretsOutcome()>>(
[this, request]()
{
return this->listSecrets(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::PutSecretValueOutcome KmsClient::putSecretValue(const PutSecretValueRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return PutSecretValueOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return PutSecretValueOutcome(PutSecretValueResult(outcome.result()));
else
return PutSecretValueOutcome(outcome.error());
}
void KmsClient::putSecretValueAsync(const PutSecretValueRequest& request, const PutSecretValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, putSecretValue(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::PutSecretValueOutcomeCallable KmsClient::putSecretValueCallable(const PutSecretValueRequest &request) const
{
auto task = std::make_shared<std::packaged_task<PutSecretValueOutcome()>>(
[this, request]()
{
return this->putSecretValue(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::RestoreSecretOutcome KmsClient::restoreSecret(const RestoreSecretRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RestoreSecretOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RestoreSecretOutcome(RestoreSecretResult(outcome.result()));
else
return RestoreSecretOutcome(outcome.error());
}
void KmsClient::restoreSecretAsync(const RestoreSecretRequest& request, const RestoreSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, restoreSecret(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::RestoreSecretOutcomeCallable KmsClient::restoreSecretCallable(const RestoreSecretRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RestoreSecretOutcome()>>(
[this, request]()
{
return this->restoreSecret(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::ScheduleKeyDeletionOutcome KmsClient::scheduleKeyDeletion(const ScheduleKeyDeletionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1275,3 +1599,75 @@ KmsClient::UpdateRotationPolicyOutcomeCallable KmsClient::updateRotationPolicyCa
return task->get_future();
}
KmsClient::UpdateSecretOutcome KmsClient::updateSecret(const UpdateSecretRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateSecretOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateSecretOutcome(UpdateSecretResult(outcome.result()));
else
return UpdateSecretOutcome(outcome.error());
}
void KmsClient::updateSecretAsync(const UpdateSecretRequest& request, const UpdateSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateSecret(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::UpdateSecretOutcomeCallable KmsClient::updateSecretCallable(const UpdateSecretRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateSecretOutcome()>>(
[this, request]()
{
return this->updateSecret(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::UpdateSecretVersionStageOutcome KmsClient::updateSecretVersionStage(const UpdateSecretVersionStageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateSecretVersionStageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateSecretVersionStageOutcome(UpdateSecretVersionStageResult(outcome.result()));
else
return UpdateSecretVersionStageOutcome(outcome.error());
}
void KmsClient::updateSecretVersionStageAsync(const UpdateSecretVersionStageRequest& request, const UpdateSecretVersionStageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateSecretVersionStage(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::UpdateSecretVersionStageOutcomeCallable KmsClient::updateSecretVersionStageCallable(const UpdateSecretVersionStageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateSecretVersionStageOutcome()>>(
[this, request]()
{
return this->updateSecretVersionStage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::AsymmetricDecryptRequest;
AsymmetricDecryptRequest::AsymmetricDecryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricDecrypt")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
AsymmetricDecryptRequest::~AsymmetricDecryptRequest()
@@ -35,7 +35,7 @@ std::string AsymmetricDecryptRequest::getKeyVersionId()const
void AsymmetricDecryptRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
setParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricDecryptRequest::getKeyId()const
@@ -46,7 +46,7 @@ std::string AsymmetricDecryptRequest::getKeyId()const
void AsymmetricDecryptRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string AsymmetricDecryptRequest::getCiphertextBlob()const
@@ -57,7 +57,7 @@ std::string AsymmetricDecryptRequest::getCiphertextBlob()const
void AsymmetricDecryptRequest::setCiphertextBlob(const std::string& ciphertextBlob)
{
ciphertextBlob_ = ciphertextBlob;
setCoreParameter("CiphertextBlob", ciphertextBlob);
setParameter("CiphertextBlob", ciphertextBlob);
}
std::string AsymmetricDecryptRequest::getAlgorithm()const
@@ -68,6 +68,6 @@ std::string AsymmetricDecryptRequest::getAlgorithm()const
void AsymmetricDecryptRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
setParameter("Algorithm", algorithm);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::AsymmetricEncryptRequest;
AsymmetricEncryptRequest::AsymmetricEncryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricEncrypt")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
AsymmetricEncryptRequest::~AsymmetricEncryptRequest()
@@ -35,7 +35,7 @@ std::string AsymmetricEncryptRequest::getKeyVersionId()const
void AsymmetricEncryptRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
setParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricEncryptRequest::getKeyId()const
@@ -46,7 +46,7 @@ std::string AsymmetricEncryptRequest::getKeyId()const
void AsymmetricEncryptRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string AsymmetricEncryptRequest::getPlaintext()const
@@ -57,7 +57,7 @@ std::string AsymmetricEncryptRequest::getPlaintext()const
void AsymmetricEncryptRequest::setPlaintext(const std::string& plaintext)
{
plaintext_ = plaintext;
setCoreParameter("Plaintext", plaintext);
setParameter("Plaintext", plaintext);
}
std::string AsymmetricEncryptRequest::getAlgorithm()const
@@ -68,6 +68,6 @@ std::string AsymmetricEncryptRequest::getAlgorithm()const
void AsymmetricEncryptRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
setParameter("Algorithm", algorithm);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::AsymmetricSignRequest;
AsymmetricSignRequest::AsymmetricSignRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricSign")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
AsymmetricSignRequest::~AsymmetricSignRequest()
@@ -35,7 +35,7 @@ std::string AsymmetricSignRequest::getKeyVersionId()const
void AsymmetricSignRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
setParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricSignRequest::getDigest()const
@@ -46,7 +46,7 @@ std::string AsymmetricSignRequest::getDigest()const
void AsymmetricSignRequest::setDigest(const std::string& digest)
{
digest_ = digest;
setCoreParameter("Digest", digest);
setParameter("Digest", digest);
}
std::string AsymmetricSignRequest::getKeyId()const
@@ -57,7 +57,7 @@ std::string AsymmetricSignRequest::getKeyId()const
void AsymmetricSignRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string AsymmetricSignRequest::getAlgorithm()const
@@ -68,6 +68,6 @@ std::string AsymmetricSignRequest::getAlgorithm()const
void AsymmetricSignRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
setParameter("Algorithm", algorithm);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::AsymmetricVerifyRequest;
AsymmetricVerifyRequest::AsymmetricVerifyRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricVerify")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
AsymmetricVerifyRequest::~AsymmetricVerifyRequest()
@@ -35,7 +35,7 @@ std::string AsymmetricVerifyRequest::getKeyVersionId()const
void AsymmetricVerifyRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
setParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricVerifyRequest::getDigest()const
@@ -46,7 +46,7 @@ std::string AsymmetricVerifyRequest::getDigest()const
void AsymmetricVerifyRequest::setDigest(const std::string& digest)
{
digest_ = digest;
setCoreParameter("Digest", digest);
setParameter("Digest", digest);
}
std::string AsymmetricVerifyRequest::getKeyId()const
@@ -57,7 +57,7 @@ std::string AsymmetricVerifyRequest::getKeyId()const
void AsymmetricVerifyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string AsymmetricVerifyRequest::getValue()const
@@ -68,7 +68,7 @@ std::string AsymmetricVerifyRequest::getValue()const
void AsymmetricVerifyRequest::setValue(const std::string& value)
{
value_ = value;
setCoreParameter("Value", value);
setParameter("Value", value);
}
std::string AsymmetricVerifyRequest::getAlgorithm()const
@@ -79,6 +79,6 @@ std::string AsymmetricVerifyRequest::getAlgorithm()const
void AsymmetricVerifyRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
setParameter("Algorithm", algorithm);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::CancelKeyDeletionRequest;
CancelKeyDeletionRequest::CancelKeyDeletionRequest() :
RpcServiceRequest("kms", "2016-01-20", "CancelKeyDeletion")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
CancelKeyDeletionRequest::~CancelKeyDeletionRequest()
@@ -35,6 +35,6 @@ std::string CancelKeyDeletionRequest::getKeyId()const
void CancelKeyDeletionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::CreateAliasRequest;
CreateAliasRequest::CreateAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateAlias")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
CreateAliasRequest::~CreateAliasRequest()
@@ -35,7 +35,7 @@ std::string CreateAliasRequest::getAliasName()const
void CreateAliasRequest::setAliasName(const std::string& aliasName)
{
aliasName_ = aliasName;
setCoreParameter("AliasName", aliasName);
setParameter("AliasName", aliasName);
}
std::string CreateAliasRequest::getKeyId()const
@@ -46,6 +46,6 @@ std::string CreateAliasRequest::getKeyId()const
void CreateAliasRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::CreateKeyRequest;
CreateKeyRequest::CreateKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateKey")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
CreateKeyRequest::~CreateKeyRequest()
@@ -35,7 +35,7 @@ std::string CreateKeyRequest::getProtectionLevel()const
void CreateKeyRequest::setProtectionLevel(const std::string& protectionLevel)
{
protectionLevel_ = protectionLevel;
setCoreParameter("ProtectionLevel", protectionLevel);
setParameter("ProtectionLevel", protectionLevel);
}
std::string CreateKeyRequest::getKeyUsage()const
@@ -46,7 +46,7 @@ std::string CreateKeyRequest::getKeyUsage()const
void CreateKeyRequest::setKeyUsage(const std::string& keyUsage)
{
keyUsage_ = keyUsage;
setCoreParameter("KeyUsage", keyUsage);
setParameter("KeyUsage", keyUsage);
}
std::string CreateKeyRequest::getOrigin()const
@@ -57,7 +57,7 @@ std::string CreateKeyRequest::getOrigin()const
void CreateKeyRequest::setOrigin(const std::string& origin)
{
origin_ = origin;
setCoreParameter("Origin", origin);
setParameter("Origin", origin);
}
std::string CreateKeyRequest::getDescription()const
@@ -68,7 +68,7 @@ std::string CreateKeyRequest::getDescription()const
void CreateKeyRequest::setDescription(const std::string& description)
{
description_ = description;
setCoreParameter("Description", description);
setParameter("Description", description);
}
std::string CreateKeyRequest::getKeySpec()const
@@ -79,7 +79,7 @@ std::string CreateKeyRequest::getKeySpec()const
void CreateKeyRequest::setKeySpec(const std::string& keySpec)
{
keySpec_ = keySpec;
setCoreParameter("KeySpec", keySpec);
setParameter("KeySpec", keySpec);
}
std::string CreateKeyRequest::getRotationInterval()const
@@ -90,7 +90,7 @@ std::string CreateKeyRequest::getRotationInterval()const
void CreateKeyRequest::setRotationInterval(const std::string& rotationInterval)
{
rotationInterval_ = rotationInterval;
setCoreParameter("RotationInterval", rotationInterval);
setParameter("RotationInterval", rotationInterval);
}
bool CreateKeyRequest::getEnableAutomaticRotation()const
@@ -101,6 +101,6 @@ bool CreateKeyRequest::getEnableAutomaticRotation()const
void CreateKeyRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
{
enableAutomaticRotation_ = enableAutomaticRotation;
setCoreParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
setParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::CreateKeyVersionRequest;
CreateKeyVersionRequest::CreateKeyVersionRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateKeyVersion")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
CreateKeyVersionRequest::~CreateKeyVersionRequest()
@@ -35,6 +35,6 @@ std::string CreateKeyVersionRequest::getKeyId()const
void CreateKeyVersionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View 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/CreateSecretRequest.h>
using AlibabaCloud::Kms::Model::CreateSecretRequest;
CreateSecretRequest::CreateSecretRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateSecret")
{
setMethod(HttpRequest::Method::POST);
}
CreateSecretRequest::~CreateSecretRequest()
{}
std::string CreateSecretRequest::getVersionId()const
{
return versionId_;
}
void CreateSecretRequest::setVersionId(const std::string& versionId)
{
versionId_ = versionId;
setParameter("VersionId", versionId);
}
std::string CreateSecretRequest::getSecretData()const
{
return secretData_;
}
void CreateSecretRequest::setSecretData(const std::string& secretData)
{
secretData_ = secretData;
setParameter("SecretData", secretData);
}
std::string CreateSecretRequest::getDescription()const
{
return description_;
}
void CreateSecretRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateSecretRequest::getSecretName()const
{
return secretName_;
}
void CreateSecretRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}
std::string CreateSecretRequest::getEncryptionKeyId()const
{
return encryptionKeyId_;
}
void CreateSecretRequest::setEncryptionKeyId(const std::string& encryptionKeyId)
{
encryptionKeyId_ = encryptionKeyId;
setParameter("EncryptionKeyId", encryptionKeyId);
}
std::string CreateSecretRequest::getSecretDataType()const
{
return secretDataType_;
}
void CreateSecretRequest::setSecretDataType(const std::string& secretDataType)
{
secretDataType_ = secretDataType;
setParameter("SecretDataType", secretDataType);
}
std::string CreateSecretRequest::getTags()const
{
return tags_;
}
void CreateSecretRequest::setTags(const std::string& tags)
{
tags_ = tags;
setParameter("Tags", tags);
}

View 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/CreateSecretResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
CreateSecretResult::CreateSecretResult() :
ServiceResult()
{}
CreateSecretResult::CreateSecretResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateSecretResult::~CreateSecretResult()
{}
void CreateSecretResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Arn"].isNull())
arn_ = value["Arn"].asString();
if(!value["VersionId"].isNull())
versionId_ = value["VersionId"].asString();
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
}
std::string CreateSecretResult::getVersionId()const
{
return versionId_;
}
std::string CreateSecretResult::getSecretName()const
{
return secretName_;
}
std::string CreateSecretResult::getArn()const
{
return arn_;
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DecryptRequest;
DecryptRequest::DecryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "Decrypt")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DecryptRequest::~DecryptRequest()
@@ -35,7 +35,7 @@ std::string DecryptRequest::getEncryptionContext()const
void DecryptRequest::setEncryptionContext(const std::string& encryptionContext)
{
encryptionContext_ = encryptionContext;
setCoreParameter("EncryptionContext", encryptionContext);
setParameter("EncryptionContext", encryptionContext);
}
std::string DecryptRequest::getCiphertextBlob()const
@@ -46,6 +46,6 @@ std::string DecryptRequest::getCiphertextBlob()const
void DecryptRequest::setCiphertextBlob(const std::string& ciphertextBlob)
{
ciphertextBlob_ = ciphertextBlob;
setCoreParameter("CiphertextBlob", ciphertextBlob);
setParameter("CiphertextBlob", ciphertextBlob);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DeleteAliasRequest;
DeleteAliasRequest::DeleteAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "DeleteAlias")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DeleteAliasRequest::~DeleteAliasRequest()
@@ -35,6 +35,6 @@ std::string DeleteAliasRequest::getAliasName()const
void DeleteAliasRequest::setAliasName(const std::string& aliasName)
{
aliasName_ = aliasName;
setCoreParameter("AliasName", aliasName);
setParameter("AliasName", aliasName);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DeleteKeyMaterialRequest;
DeleteKeyMaterialRequest::DeleteKeyMaterialRequest() :
RpcServiceRequest("kms", "2016-01-20", "DeleteKeyMaterial")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DeleteKeyMaterialRequest::~DeleteKeyMaterialRequest()
@@ -35,6 +35,6 @@ std::string DeleteKeyMaterialRequest::getKeyId()const
void DeleteKeyMaterialRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View 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/DeleteSecretRequest.h>
using AlibabaCloud::Kms::Model::DeleteSecretRequest;
DeleteSecretRequest::DeleteSecretRequest() :
RpcServiceRequest("kms", "2016-01-20", "DeleteSecret")
{
setMethod(HttpRequest::Method::POST);
}
DeleteSecretRequest::~DeleteSecretRequest()
{}
std::string DeleteSecretRequest::getForceDeleteWithoutRecovery()const
{
return forceDeleteWithoutRecovery_;
}
void DeleteSecretRequest::setForceDeleteWithoutRecovery(const std::string& forceDeleteWithoutRecovery)
{
forceDeleteWithoutRecovery_ = forceDeleteWithoutRecovery;
setParameter("ForceDeleteWithoutRecovery", forceDeleteWithoutRecovery);
}
std::string DeleteSecretRequest::getRecoveryWindowInDays()const
{
return recoveryWindowInDays_;
}
void DeleteSecretRequest::setRecoveryWindowInDays(const std::string& recoveryWindowInDays)
{
recoveryWindowInDays_ = recoveryWindowInDays;
setParameter("RecoveryWindowInDays", recoveryWindowInDays);
}
std::string DeleteSecretRequest::getSecretName()const
{
return secretName_;
}
void DeleteSecretRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}

View 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/DeleteSecretResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
DeleteSecretResult::DeleteSecretResult() :
ServiceResult()
{}
DeleteSecretResult::DeleteSecretResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteSecretResult::~DeleteSecretResult()
{}
void DeleteSecretResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
if(!value["PlannedDeleteTime"].isNull())
plannedDeleteTime_ = value["PlannedDeleteTime"].asString();
}
std::string DeleteSecretResult::getSecretName()const
{
return secretName_;
}
std::string DeleteSecretResult::getPlannedDeleteTime()const
{
return plannedDeleteTime_;
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DescribeKeyRequest;
DescribeKeyRequest::DescribeKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeKey")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DescribeKeyRequest::~DescribeKeyRequest()
@@ -35,6 +35,6 @@ std::string DescribeKeyRequest::getKeyId()const
void DescribeKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DescribeKeyVersionRequest;
DescribeKeyVersionRequest::DescribeKeyVersionRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeKeyVersion")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DescribeKeyVersionRequest::~DescribeKeyVersionRequest()
@@ -35,7 +35,7 @@ std::string DescribeKeyVersionRequest::getKeyVersionId()const
void DescribeKeyVersionRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
setParameter("KeyVersionId", keyVersionId);
}
std::string DescribeKeyVersionRequest::getKeyId()const
@@ -46,6 +46,6 @@ std::string DescribeKeyVersionRequest::getKeyId()const
void DescribeKeyVersionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DescribeRegionsRequest;
DescribeRegionsRequest::DescribeRegionsRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeRegions")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DescribeRegionsRequest::~DescribeRegionsRequest()

View 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/DescribeSecretRequest.h>
using AlibabaCloud::Kms::Model::DescribeSecretRequest;
DescribeSecretRequest::DescribeSecretRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeSecret")
{
setMethod(HttpRequest::Method::POST);
}
DescribeSecretRequest::~DescribeSecretRequest()
{}
std::string DescribeSecretRequest::getSecretName()const
{
return secretName_;
}
void DescribeSecretRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}
std::string DescribeSecretRequest::getFetchTags()const
{
return fetchTags_;
}
void DescribeSecretRequest::setFetchTags(const std::string& fetchTags)
{
fetchTags_ = fetchTags;
setParameter("FetchTags", fetchTags);
}

View File

@@ -0,0 +1,108 @@
/*
* 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/DescribeSecretResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
DescribeSecretResult::DescribeSecretResult() :
ServiceResult()
{}
DescribeSecretResult::DescribeSecretResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeSecretResult::~DescribeSecretResult()
{}
void DescribeSecretResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagsNode = value["Tags"]["Tag"];
for (auto valueTagsTag : allTagsNode)
{
Tag tagsObject;
if(!valueTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueTagsTag["TagKey"].asString();
if(!valueTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueTagsTag["TagValue"].asString();
tags_.push_back(tagsObject);
}
if(!value["Arn"].isNull())
arn_ = value["Arn"].asString();
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
if(!value["EncryptionKeyId"].isNull())
encryptionKeyId_ = value["EncryptionKeyId"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["CreateTime"].isNull())
createTime_ = value["CreateTime"].asString();
if(!value["UpdateTime"].isNull())
updateTime_ = value["UpdateTime"].asString();
if(!value["PlannedDeleteTime"].isNull())
plannedDeleteTime_ = value["PlannedDeleteTime"].asString();
}
std::string DescribeSecretResult::getSecretName()const
{
return secretName_;
}
std::string DescribeSecretResult::getDescription()const
{
return description_;
}
std::string DescribeSecretResult::getCreateTime()const
{
return createTime_;
}
std::string DescribeSecretResult::getUpdateTime()const
{
return updateTime_;
}
std::string DescribeSecretResult::getPlannedDeleteTime()const
{
return plannedDeleteTime_;
}
std::string DescribeSecretResult::getArn()const
{
return arn_;
}
std::vector<DescribeSecretResult::Tag> DescribeSecretResult::getTags()const
{
return tags_;
}
std::string DescribeSecretResult::getEncryptionKeyId()const
{
return encryptionKeyId_;
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DescribeServiceRequest;
DescribeServiceRequest::DescribeServiceRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeService")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DescribeServiceRequest::~DescribeServiceRequest()

View File

@@ -47,6 +47,20 @@ void DescribeServiceResult::parse(const std::string &payload)
protectionLevelsObject.type = valueProtectionLevelsProtectionLevel["Type"].asString();
protectionLevels_.push_back(protectionLevelsObject);
}
auto allKeySpecsNode = value["KeySpecs"]["KeySpec"];
for (auto valueKeySpecsKeySpec : allKeySpecsNode)
{
KeySpec keySpecsObject;
if(!valueKeySpecsKeySpec["Name"].isNull())
keySpecsObject.name = valueKeySpecsKeySpec["Name"].asString();
auto allSupportedProtectionLevels = value["SupportedProtectionLevels"]["SupportedProtectionLevel"];
for (auto value : allSupportedProtectionLevels)
keySpecsObject.supportedProtectionLevels.push_back(value.asString());
auto allUsages = value["Usages"]["Usage"];
for (auto value : allUsages)
keySpecsObject.usages.push_back(value.asString());
keySpecs_.push_back(keySpecsObject);
}
}
@@ -55,3 +69,8 @@ std::vector<DescribeServiceResult::ProtectionLevel> DescribeServiceResult::getPr
return protectionLevels_;
}
std::vector<DescribeServiceResult::KeySpec> DescribeServiceResult::getKeySpecs()const
{
return keySpecs_;
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::DisableKeyRequest;
DisableKeyRequest::DisableKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "DisableKey")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
DisableKeyRequest::~DisableKeyRequest()
@@ -35,6 +35,6 @@ std::string DisableKeyRequest::getKeyId()const
void DisableKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::EnableKeyRequest;
EnableKeyRequest::EnableKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "EnableKey")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
EnableKeyRequest::~EnableKeyRequest()
@@ -35,6 +35,6 @@ std::string EnableKeyRequest::getKeyId()const
void EnableKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::EncryptRequest;
EncryptRequest::EncryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "Encrypt")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
EncryptRequest::~EncryptRequest()
@@ -35,7 +35,7 @@ std::string EncryptRequest::getEncryptionContext()const
void EncryptRequest::setEncryptionContext(const std::string& encryptionContext)
{
encryptionContext_ = encryptionContext;
setCoreParameter("EncryptionContext", encryptionContext);
setParameter("EncryptionContext", encryptionContext);
}
std::string EncryptRequest::getKeyId()const
@@ -46,7 +46,7 @@ std::string EncryptRequest::getKeyId()const
void EncryptRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string EncryptRequest::getPlaintext()const
@@ -57,6 +57,6 @@ std::string EncryptRequest::getPlaintext()const
void EncryptRequest::setPlaintext(const std::string& plaintext)
{
plaintext_ = plaintext;
setCoreParameter("Plaintext", plaintext);
setParameter("Plaintext", plaintext);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::GenerateDataKeyRequest;
GenerateDataKeyRequest::GenerateDataKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKey")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
GenerateDataKeyRequest::~GenerateDataKeyRequest()
@@ -35,7 +35,7 @@ std::string GenerateDataKeyRequest::getEncryptionContext()const
void GenerateDataKeyRequest::setEncryptionContext(const std::string& encryptionContext)
{
encryptionContext_ = encryptionContext;
setCoreParameter("EncryptionContext", encryptionContext);
setParameter("EncryptionContext", encryptionContext);
}
std::string GenerateDataKeyRequest::getKeyId()const
@@ -46,7 +46,7 @@ std::string GenerateDataKeyRequest::getKeyId()const
void GenerateDataKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string GenerateDataKeyRequest::getKeySpec()const
@@ -57,7 +57,7 @@ std::string GenerateDataKeyRequest::getKeySpec()const
void GenerateDataKeyRequest::setKeySpec(const std::string& keySpec)
{
keySpec_ = keySpec;
setCoreParameter("KeySpec", keySpec);
setParameter("KeySpec", keySpec);
}
int GenerateDataKeyRequest::getNumberOfBytes()const
@@ -68,6 +68,6 @@ int GenerateDataKeyRequest::getNumberOfBytes()const
void GenerateDataKeyRequest::setNumberOfBytes(int numberOfBytes)
{
numberOfBytes_ = numberOfBytes;
setCoreParameter("NumberOfBytes", std::to_string(numberOfBytes));
setParameter("NumberOfBytes", std::to_string(numberOfBytes));
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::GenerateDataKeyWithoutPlaintextRequest;
GenerateDataKeyWithoutPlaintextRequest::GenerateDataKeyWithoutPlaintextRequest() :
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKeyWithoutPlaintext")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
GenerateDataKeyWithoutPlaintextRequest::~GenerateDataKeyWithoutPlaintextRequest()
@@ -35,7 +35,7 @@ std::string GenerateDataKeyWithoutPlaintextRequest::getEncryptionContext()const
void GenerateDataKeyWithoutPlaintextRequest::setEncryptionContext(const std::string& encryptionContext)
{
encryptionContext_ = encryptionContext;
setCoreParameter("EncryptionContext", encryptionContext);
setParameter("EncryptionContext", encryptionContext);
}
std::string GenerateDataKeyWithoutPlaintextRequest::getKeyId()const
@@ -46,7 +46,7 @@ std::string GenerateDataKeyWithoutPlaintextRequest::getKeyId()const
void GenerateDataKeyWithoutPlaintextRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string GenerateDataKeyWithoutPlaintextRequest::getKeySpec()const
@@ -57,7 +57,7 @@ std::string GenerateDataKeyWithoutPlaintextRequest::getKeySpec()const
void GenerateDataKeyWithoutPlaintextRequest::setKeySpec(const std::string& keySpec)
{
keySpec_ = keySpec;
setCoreParameter("KeySpec", keySpec);
setParameter("KeySpec", keySpec);
}
int GenerateDataKeyWithoutPlaintextRequest::getNumberOfBytes()const
@@ -68,6 +68,6 @@ int GenerateDataKeyWithoutPlaintextRequest::getNumberOfBytes()const
void GenerateDataKeyWithoutPlaintextRequest::setNumberOfBytes(int numberOfBytes)
{
numberOfBytes_ = numberOfBytes;
setCoreParameter("NumberOfBytes", std::to_string(numberOfBytes));
setParameter("NumberOfBytes", std::to_string(numberOfBytes));
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::GetParametersForImportRequest;
GetParametersForImportRequest::GetParametersForImportRequest() :
RpcServiceRequest("kms", "2016-01-20", "GetParametersForImport")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
GetParametersForImportRequest::~GetParametersForImportRequest()
@@ -35,7 +35,7 @@ std::string GetParametersForImportRequest::getKeyId()const
void GetParametersForImportRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string GetParametersForImportRequest::getWrappingAlgorithm()const
@@ -46,7 +46,7 @@ std::string GetParametersForImportRequest::getWrappingAlgorithm()const
void GetParametersForImportRequest::setWrappingAlgorithm(const std::string& wrappingAlgorithm)
{
wrappingAlgorithm_ = wrappingAlgorithm;
setCoreParameter("WrappingAlgorithm", wrappingAlgorithm);
setParameter("WrappingAlgorithm", wrappingAlgorithm);
}
std::string GetParametersForImportRequest::getWrappingKeySpec()const
@@ -57,6 +57,6 @@ std::string GetParametersForImportRequest::getWrappingKeySpec()const
void GetParametersForImportRequest::setWrappingKeySpec(const std::string& wrappingKeySpec)
{
wrappingKeySpec_ = wrappingKeySpec;
setCoreParameter("WrappingKeySpec", wrappingKeySpec);
setParameter("WrappingKeySpec", wrappingKeySpec);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::GetPublicKeyRequest;
GetPublicKeyRequest::GetPublicKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "GetPublicKey")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
GetPublicKeyRequest::~GetPublicKeyRequest()
@@ -35,7 +35,7 @@ std::string GetPublicKeyRequest::getKeyVersionId()const
void GetPublicKeyRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
setParameter("KeyVersionId", keyVersionId);
}
std::string GetPublicKeyRequest::getKeyId()const
@@ -46,6 +46,6 @@ std::string GetPublicKeyRequest::getKeyId()const
void GetPublicKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View 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/GetRandomPasswordRequest.h>
using AlibabaCloud::Kms::Model::GetRandomPasswordRequest;
GetRandomPasswordRequest::GetRandomPasswordRequest() :
RpcServiceRequest("kms", "2016-01-20", "GetRandomPassword")
{
setMethod(HttpRequest::Method::POST);
}
GetRandomPasswordRequest::~GetRandomPasswordRequest()
{}
std::string GetRandomPasswordRequest::getExcludeLowercase()const
{
return excludeLowercase_;
}
void GetRandomPasswordRequest::setExcludeLowercase(const std::string& excludeLowercase)
{
excludeLowercase_ = excludeLowercase;
setParameter("ExcludeLowercase", excludeLowercase);
}
std::string GetRandomPasswordRequest::getExcludeCharacters()const
{
return excludeCharacters_;
}
void GetRandomPasswordRequest::setExcludeCharacters(const std::string& excludeCharacters)
{
excludeCharacters_ = excludeCharacters;
setParameter("ExcludeCharacters", excludeCharacters);
}
std::string GetRandomPasswordRequest::getPasswordLength()const
{
return passwordLength_;
}
void GetRandomPasswordRequest::setPasswordLength(const std::string& passwordLength)
{
passwordLength_ = passwordLength;
setParameter("PasswordLength", passwordLength);
}
std::string GetRandomPasswordRequest::getExcludePunctuation()const
{
return excludePunctuation_;
}
void GetRandomPasswordRequest::setExcludePunctuation(const std::string& excludePunctuation)
{
excludePunctuation_ = excludePunctuation;
setParameter("ExcludePunctuation", excludePunctuation);
}
std::string GetRandomPasswordRequest::getExcludeUppercase()const
{
return excludeUppercase_;
}
void GetRandomPasswordRequest::setExcludeUppercase(const std::string& excludeUppercase)
{
excludeUppercase_ = excludeUppercase;
setParameter("ExcludeUppercase", excludeUppercase);
}
std::string GetRandomPasswordRequest::getRequireEachIncludedType()const
{
return requireEachIncludedType_;
}
void GetRandomPasswordRequest::setRequireEachIncludedType(const std::string& requireEachIncludedType)
{
requireEachIncludedType_ = requireEachIncludedType;
setParameter("RequireEachIncludedType", requireEachIncludedType);
}
std::string GetRandomPasswordRequest::getExcludeNumbers()const
{
return excludeNumbers_;
}
void GetRandomPasswordRequest::setExcludeNumbers(const std::string& excludeNumbers)
{
excludeNumbers_ = excludeNumbers;
setParameter("ExcludeNumbers", excludeNumbers);
}

View 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/GetRandomPasswordResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
GetRandomPasswordResult::GetRandomPasswordResult() :
ServiceResult()
{}
GetRandomPasswordResult::GetRandomPasswordResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetRandomPasswordResult::~GetRandomPasswordResult()
{}
void GetRandomPasswordResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["RandomPassword"].isNull())
randomPassword_ = value["RandomPassword"].asString();
}
std::string GetRandomPasswordResult::getRandomPassword()const
{
return randomPassword_;
}

View 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/GetSecretValueRequest.h>
using AlibabaCloud::Kms::Model::GetSecretValueRequest;
GetSecretValueRequest::GetSecretValueRequest() :
RpcServiceRequest("kms", "2016-01-20", "GetSecretValue")
{
setMethod(HttpRequest::Method::POST);
}
GetSecretValueRequest::~GetSecretValueRequest()
{}
std::string GetSecretValueRequest::getVersionId()const
{
return versionId_;
}
void GetSecretValueRequest::setVersionId(const std::string& versionId)
{
versionId_ = versionId;
setParameter("VersionId", versionId);
}
std::string GetSecretValueRequest::getVersionStage()const
{
return versionStage_;
}
void GetSecretValueRequest::setVersionStage(const std::string& versionStage)
{
versionStage_ = versionStage;
setParameter("VersionStage", versionStage);
}
std::string GetSecretValueRequest::getSecretName()const
{
return secretName_;
}
void GetSecretValueRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}

View File

@@ -0,0 +1,87 @@
/*
* 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/GetSecretValueResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
GetSecretValueResult::GetSecretValueResult() :
ServiceResult()
{}
GetSecretValueResult::GetSecretValueResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetSecretValueResult::~GetSecretValueResult()
{}
void GetSecretValueResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allVersionStages = value["VersionStages"]["VersionStage"];
for (const auto &item : allVersionStages)
versionStages_.push_back(item.asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
if(!value["VersionId"].isNull())
versionId_ = value["VersionId"].asString();
if(!value["CreateTime"].isNull())
createTime_ = value["CreateTime"].asString();
if(!value["SecretData"].isNull())
secretData_ = value["SecretData"].asString();
if(!value["SecretDataType"].isNull())
secretDataType_ = value["SecretDataType"].asString();
}
std::string GetSecretValueResult::getSecretName()const
{
return secretName_;
}
std::string GetSecretValueResult::getVersionId()const
{
return versionId_;
}
std::string GetSecretValueResult::getCreateTime()const
{
return createTime_;
}
std::string GetSecretValueResult::getSecretDataType()const
{
return secretDataType_;
}
std::string GetSecretValueResult::getSecretData()const
{
return secretData_;
}
std::vector<std::string> GetSecretValueResult::getVersionStages()const
{
return versionStages_;
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::ImportKeyMaterialRequest;
ImportKeyMaterialRequest::ImportKeyMaterialRequest() :
RpcServiceRequest("kms", "2016-01-20", "ImportKeyMaterial")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
ImportKeyMaterialRequest::~ImportKeyMaterialRequest()
@@ -35,7 +35,7 @@ std::string ImportKeyMaterialRequest::getImportToken()const
void ImportKeyMaterialRequest::setImportToken(const std::string& importToken)
{
importToken_ = importToken;
setCoreParameter("ImportToken", importToken);
setParameter("ImportToken", importToken);
}
std::string ImportKeyMaterialRequest::getEncryptedKeyMaterial()const
@@ -46,7 +46,7 @@ std::string ImportKeyMaterialRequest::getEncryptedKeyMaterial()const
void ImportKeyMaterialRequest::setEncryptedKeyMaterial(const std::string& encryptedKeyMaterial)
{
encryptedKeyMaterial_ = encryptedKeyMaterial;
setCoreParameter("EncryptedKeyMaterial", encryptedKeyMaterial);
setParameter("EncryptedKeyMaterial", encryptedKeyMaterial);
}
long ImportKeyMaterialRequest::getKeyMaterialExpireUnix()const
@@ -57,7 +57,7 @@ long ImportKeyMaterialRequest::getKeyMaterialExpireUnix()const
void ImportKeyMaterialRequest::setKeyMaterialExpireUnix(long keyMaterialExpireUnix)
{
keyMaterialExpireUnix_ = keyMaterialExpireUnix;
setCoreParameter("KeyMaterialExpireUnix", std::to_string(keyMaterialExpireUnix));
setParameter("KeyMaterialExpireUnix", std::to_string(keyMaterialExpireUnix));
}
std::string ImportKeyMaterialRequest::getKeyId()const
@@ -68,6 +68,6 @@ std::string ImportKeyMaterialRequest::getKeyId()const
void ImportKeyMaterialRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::ListAliasesByKeyIdRequest;
ListAliasesByKeyIdRequest::ListAliasesByKeyIdRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListAliasesByKeyId")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
ListAliasesByKeyIdRequest::~ListAliasesByKeyIdRequest()
@@ -35,7 +35,7 @@ int ListAliasesByKeyIdRequest::getPageSize()const
void ListAliasesByKeyIdRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListAliasesByKeyIdRequest::getKeyId()const
@@ -46,7 +46,7 @@ std::string ListAliasesByKeyIdRequest::getKeyId()const
void ListAliasesByKeyIdRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
int ListAliasesByKeyIdRequest::getPageNumber()const
@@ -57,6 +57,6 @@ int ListAliasesByKeyIdRequest::getPageNumber()const
void ListAliasesByKeyIdRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setCoreParameter("PageNumber", std::to_string(pageNumber));
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::ListAliasesRequest;
ListAliasesRequest::ListAliasesRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListAliases")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
ListAliasesRequest::~ListAliasesRequest()
@@ -35,7 +35,7 @@ int ListAliasesRequest::getPageSize()const
void ListAliasesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
setParameter("PageSize", std::to_string(pageSize));
}
int ListAliasesRequest::getPageNumber()const
@@ -46,6 +46,6 @@ int ListAliasesRequest::getPageNumber()const
void ListAliasesRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setCoreParameter("PageNumber", std::to_string(pageNumber));
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::ListKeyVersionsRequest;
ListKeyVersionsRequest::ListKeyVersionsRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListKeyVersions")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
ListKeyVersionsRequest::~ListKeyVersionsRequest()
@@ -35,7 +35,7 @@ int ListKeyVersionsRequest::getPageSize()const
void ListKeyVersionsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListKeyVersionsRequest::getKeyId()const
@@ -46,7 +46,7 @@ std::string ListKeyVersionsRequest::getKeyId()const
void ListKeyVersionsRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
int ListKeyVersionsRequest::getPageNumber()const
@@ -57,6 +57,6 @@ int ListKeyVersionsRequest::getPageNumber()const
void ListKeyVersionsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setCoreParameter("PageNumber", std::to_string(pageNumber));
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::ListKeysRequest;
ListKeysRequest::ListKeysRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListKeys")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
ListKeysRequest::~ListKeysRequest()
@@ -35,7 +35,7 @@ int ListKeysRequest::getPageSize()const
void ListKeysRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
setParameter("PageSize", std::to_string(pageSize));
}
int ListKeysRequest::getPageNumber()const
@@ -46,6 +46,6 @@ int ListKeysRequest::getPageNumber()const
void ListKeysRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setCoreParameter("PageNumber", std::to_string(pageNumber));
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::ListResourceTagsRequest;
ListResourceTagsRequest::ListResourceTagsRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListResourceTags")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
ListResourceTagsRequest::~ListResourceTagsRequest()
@@ -35,6 +35,6 @@ std::string ListResourceTagsRequest::getKeyId()const
void ListResourceTagsRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View 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/ListSecretVersionIdsRequest.h>
using AlibabaCloud::Kms::Model::ListSecretVersionIdsRequest;
ListSecretVersionIdsRequest::ListSecretVersionIdsRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListSecretVersionIds")
{
setMethod(HttpRequest::Method::POST);
}
ListSecretVersionIdsRequest::~ListSecretVersionIdsRequest()
{}
std::string ListSecretVersionIdsRequest::getIncludeDeprecated()const
{
return includeDeprecated_;
}
void ListSecretVersionIdsRequest::setIncludeDeprecated(const std::string& includeDeprecated)
{
includeDeprecated_ = includeDeprecated;
setParameter("IncludeDeprecated", includeDeprecated);
}
int ListSecretVersionIdsRequest::getPageSize()const
{
return pageSize_;
}
void ListSecretVersionIdsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListSecretVersionIdsRequest::getSecretName()const
{
return secretName_;
}
void ListSecretVersionIdsRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}
int ListSecretVersionIdsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListSecretVersionIdsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,90 @@
/*
* 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/ListSecretVersionIdsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
ListSecretVersionIdsResult::ListSecretVersionIdsResult() :
ServiceResult()
{}
ListSecretVersionIdsResult::ListSecretVersionIdsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSecretVersionIdsResult::~ListSecretVersionIdsResult()
{}
void ListSecretVersionIdsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allVersionIdsNode = value["VersionIds"]["VersionId"];
for (auto valueVersionIdsVersionId : allVersionIdsNode)
{
VersionId versionIdsObject;
if(!valueVersionIdsVersionId["CreateTime"].isNull())
versionIdsObject.createTime = valueVersionIdsVersionId["CreateTime"].asString();
if(!valueVersionIdsVersionId["VersionId"].isNull())
versionIdsObject.versionId = valueVersionIdsVersionId["VersionId"].asString();
auto allVersionStages = value["VersionStages"]["VersionStage"];
for (auto value : allVersionStages)
versionIdsObject.versionStages.push_back(value.asString());
versionIds_.push_back(versionIdsObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
std::string ListSecretVersionIdsResult::getSecretName()const
{
return secretName_;
}
int ListSecretVersionIdsResult::getTotalCount()const
{
return totalCount_;
}
int ListSecretVersionIdsResult::getPageSize()const
{
return pageSize_;
}
int ListSecretVersionIdsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListSecretVersionIdsResult::VersionId> ListSecretVersionIdsResult::getVersionIds()const
{
return versionIds_;
}

View 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/ListSecretsRequest.h>
using AlibabaCloud::Kms::Model::ListSecretsRequest;
ListSecretsRequest::ListSecretsRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListSecrets")
{
setMethod(HttpRequest::Method::POST);
}
ListSecretsRequest::~ListSecretsRequest()
{}
int ListSecretsRequest::getPageSize()const
{
return pageSize_;
}
void ListSecretsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListSecretsRequest::getFetchTags()const
{
return fetchTags_;
}
void ListSecretsRequest::setFetchTags(const std::string& fetchTags)
{
fetchTags_ = fetchTags;
setParameter("FetchTags", fetchTags);
}
int ListSecretsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListSecretsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,94 @@
/*
* 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/ListSecretsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
ListSecretsResult::ListSecretsResult() :
ServiceResult()
{}
ListSecretsResult::ListSecretsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSecretsResult::~ListSecretsResult()
{}
void ListSecretsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSecretListNode = value["SecretList"]["Secret"];
for (auto valueSecretListSecret : allSecretListNode)
{
Secret secretListObject;
if(!valueSecretListSecret["SecretName"].isNull())
secretListObject.secretName = valueSecretListSecret["SecretName"].asString();
if(!valueSecretListSecret["CreateTime"].isNull())
secretListObject.createTime = valueSecretListSecret["CreateTime"].asString();
if(!valueSecretListSecret["UpdateTime"].isNull())
secretListObject.updateTime = valueSecretListSecret["UpdateTime"].asString();
if(!valueSecretListSecret["PlannedDeleteTime"].isNull())
secretListObject.plannedDeleteTime = valueSecretListSecret["PlannedDeleteTime"].asString();
auto allTagsNode = allSecretListNode["Tags"]["Tag"];
for (auto allSecretListNodeTagsTag : allTagsNode)
{
Secret::Tag tagsObject;
if(!allSecretListNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allSecretListNodeTagsTag["TagKey"].asString();
if(!allSecretListNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allSecretListNodeTagsTag["TagValue"].asString();
secretListObject.tags.push_back(tagsObject);
}
secretList_.push_back(secretListObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int ListSecretsResult::getTotalCount()const
{
return totalCount_;
}
std::vector<ListSecretsResult::Secret> ListSecretsResult::getSecretList()const
{
return secretList_;
}
int ListSecretsResult::getPageSize()const
{
return pageSize_;
}
int ListSecretsResult::getPageNumber()const
{
return pageNumber_;
}

View 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/PutSecretValueRequest.h>
using AlibabaCloud::Kms::Model::PutSecretValueRequest;
PutSecretValueRequest::PutSecretValueRequest() :
RpcServiceRequest("kms", "2016-01-20", "PutSecretValue")
{
setMethod(HttpRequest::Method::POST);
}
PutSecretValueRequest::~PutSecretValueRequest()
{}
std::string PutSecretValueRequest::getVersionId()const
{
return versionId_;
}
void PutSecretValueRequest::setVersionId(const std::string& versionId)
{
versionId_ = versionId;
setParameter("VersionId", versionId);
}
std::string PutSecretValueRequest::getVersionStages()const
{
return versionStages_;
}
void PutSecretValueRequest::setVersionStages(const std::string& versionStages)
{
versionStages_ = versionStages;
setParameter("VersionStages", versionStages);
}
std::string PutSecretValueRequest::getSecretData()const
{
return secretData_;
}
void PutSecretValueRequest::setSecretData(const std::string& secretData)
{
secretData_ = secretData;
setParameter("SecretData", secretData);
}
std::string PutSecretValueRequest::getSecretName()const
{
return secretName_;
}
void PutSecretValueRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}
std::string PutSecretValueRequest::getSecretDataType()const
{
return secretDataType_;
}
void PutSecretValueRequest::setSecretDataType(const std::string& secretDataType)
{
secretDataType_ = secretDataType;
setParameter("SecretDataType", secretDataType);
}

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/PutSecretValueResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
PutSecretValueResult::PutSecretValueResult() :
ServiceResult()
{}
PutSecretValueResult::PutSecretValueResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PutSecretValueResult::~PutSecretValueResult()
{}
void PutSecretValueResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allVersionStages = value["VersionStages"]["VersionStage"];
for (const auto &item : allVersionStages)
versionStages_.push_back(item.asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
if(!value["VersionId"].isNull())
versionId_ = value["VersionId"].asString();
}
std::string PutSecretValueResult::getSecretName()const
{
return secretName_;
}
std::string PutSecretValueResult::getVersionId()const
{
return versionId_;
}
std::vector<std::string> PutSecretValueResult::getVersionStages()const
{
return versionStages_;
}

View 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/RestoreSecretRequest.h>
using AlibabaCloud::Kms::Model::RestoreSecretRequest;
RestoreSecretRequest::RestoreSecretRequest() :
RpcServiceRequest("kms", "2016-01-20", "RestoreSecret")
{
setMethod(HttpRequest::Method::POST);
}
RestoreSecretRequest::~RestoreSecretRequest()
{}
std::string RestoreSecretRequest::getSecretName()const
{
return secretName_;
}
void RestoreSecretRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}

View 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/RestoreSecretResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
RestoreSecretResult::RestoreSecretResult() :
ServiceResult()
{}
RestoreSecretResult::RestoreSecretResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RestoreSecretResult::~RestoreSecretResult()
{}
void RestoreSecretResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
}
std::string RestoreSecretResult::getSecretName()const
{
return secretName_;
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::ScheduleKeyDeletionRequest;
ScheduleKeyDeletionRequest::ScheduleKeyDeletionRequest() :
RpcServiceRequest("kms", "2016-01-20", "ScheduleKeyDeletion")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
ScheduleKeyDeletionRequest::~ScheduleKeyDeletionRequest()
@@ -35,7 +35,7 @@ int ScheduleKeyDeletionRequest::getPendingWindowInDays()const
void ScheduleKeyDeletionRequest::setPendingWindowInDays(int pendingWindowInDays)
{
pendingWindowInDays_ = pendingWindowInDays;
setCoreParameter("PendingWindowInDays", std::to_string(pendingWindowInDays));
setParameter("PendingWindowInDays", std::to_string(pendingWindowInDays));
}
std::string ScheduleKeyDeletionRequest::getKeyId()const
@@ -46,6 +46,6 @@ std::string ScheduleKeyDeletionRequest::getKeyId()const
void ScheduleKeyDeletionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::TagResourceRequest;
TagResourceRequest::TagResourceRequest() :
RpcServiceRequest("kms", "2016-01-20", "TagResource")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
TagResourceRequest::~TagResourceRequest()
@@ -35,7 +35,18 @@ std::string TagResourceRequest::getKeyId()const
void TagResourceRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string TagResourceRequest::getSecretName()const
{
return secretName_;
}
void TagResourceRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}
std::string TagResourceRequest::getTags()const
@@ -46,6 +57,6 @@ std::string TagResourceRequest::getTags()const
void TagResourceRequest::setTags(const std::string& tags)
{
tags_ = tags;
setCoreParameter("Tags", tags);
setParameter("Tags", tags);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::UntagResourceRequest;
UntagResourceRequest::UntagResourceRequest() :
RpcServiceRequest("kms", "2016-01-20", "UntagResource")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
UntagResourceRequest::~UntagResourceRequest()
@@ -35,7 +35,7 @@ std::string UntagResourceRequest::getTagKeys()const
void UntagResourceRequest::setTagKeys(const std::string& tagKeys)
{
tagKeys_ = tagKeys;
setCoreParameter("TagKeys", tagKeys);
setParameter("TagKeys", tagKeys);
}
std::string UntagResourceRequest::getKeyId()const
@@ -46,6 +46,17 @@ std::string UntagResourceRequest::getKeyId()const
void UntagResourceRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string UntagResourceRequest::getSecretName()const
{
return secretName_;
}
void UntagResourceRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}

View File

@@ -39,13 +39,6 @@ void UntagResourceResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["KeyId"].isNull())
keyId_ = value["KeyId"].asString();
}
std::string UntagResourceResult::getKeyId()const
{
return keyId_;
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::UpdateAliasRequest;
UpdateAliasRequest::UpdateAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateAlias")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
UpdateAliasRequest::~UpdateAliasRequest()
@@ -35,7 +35,7 @@ std::string UpdateAliasRequest::getAliasName()const
void UpdateAliasRequest::setAliasName(const std::string& aliasName)
{
aliasName_ = aliasName;
setCoreParameter("AliasName", aliasName);
setParameter("AliasName", aliasName);
}
std::string UpdateAliasRequest::getKeyId()const
@@ -46,6 +46,6 @@ std::string UpdateAliasRequest::getKeyId()const
void UpdateAliasRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::UpdateKeyDescriptionRequest;
UpdateKeyDescriptionRequest::UpdateKeyDescriptionRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateKeyDescription")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
UpdateKeyDescriptionRequest::~UpdateKeyDescriptionRequest()
@@ -35,7 +35,7 @@ std::string UpdateKeyDescriptionRequest::getKeyId()const
void UpdateKeyDescriptionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string UpdateKeyDescriptionRequest::getDescription()const
@@ -46,6 +46,6 @@ std::string UpdateKeyDescriptionRequest::getDescription()const
void UpdateKeyDescriptionRequest::setDescription(const std::string& description)
{
description_ = description;
setCoreParameter("Description", description);
setParameter("Description", description);
}

View File

@@ -21,7 +21,7 @@ using AlibabaCloud::Kms::Model::UpdateRotationPolicyRequest;
UpdateRotationPolicyRequest::UpdateRotationPolicyRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateRotationPolicy")
{
setMethod(HttpRequest::Method::Post);
setMethod(HttpRequest::Method::POST);
}
UpdateRotationPolicyRequest::~UpdateRotationPolicyRequest()
@@ -35,7 +35,7 @@ std::string UpdateRotationPolicyRequest::getKeyId()const
void UpdateRotationPolicyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
setParameter("KeyId", keyId);
}
std::string UpdateRotationPolicyRequest::getRotationInterval()const
@@ -46,7 +46,7 @@ std::string UpdateRotationPolicyRequest::getRotationInterval()const
void UpdateRotationPolicyRequest::setRotationInterval(const std::string& rotationInterval)
{
rotationInterval_ = rotationInterval;
setCoreParameter("RotationInterval", rotationInterval);
setParameter("RotationInterval", rotationInterval);
}
bool UpdateRotationPolicyRequest::getEnableAutomaticRotation()const
@@ -57,6 +57,6 @@ bool UpdateRotationPolicyRequest::getEnableAutomaticRotation()const
void UpdateRotationPolicyRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
{
enableAutomaticRotation_ = enableAutomaticRotation;
setCoreParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
setParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
}

View 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/UpdateSecretRequest.h>
using AlibabaCloud::Kms::Model::UpdateSecretRequest;
UpdateSecretRequest::UpdateSecretRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateSecret")
{
setMethod(HttpRequest::Method::POST);
}
UpdateSecretRequest::~UpdateSecretRequest()
{}
std::string UpdateSecretRequest::getDescription()const
{
return description_;
}
void UpdateSecretRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string UpdateSecretRequest::getSecretName()const
{
return secretName_;
}
void UpdateSecretRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}

View 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/UpdateSecretResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
UpdateSecretResult::UpdateSecretResult() :
ServiceResult()
{}
UpdateSecretResult::UpdateSecretResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateSecretResult::~UpdateSecretResult()
{}
void UpdateSecretResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
}
std::string UpdateSecretResult::getSecretName()const
{
return secretName_;
}

View 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/UpdateSecretVersionStageRequest.h>
using AlibabaCloud::Kms::Model::UpdateSecretVersionStageRequest;
UpdateSecretVersionStageRequest::UpdateSecretVersionStageRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateSecretVersionStage")
{
setMethod(HttpRequest::Method::POST);
}
UpdateSecretVersionStageRequest::~UpdateSecretVersionStageRequest()
{}
std::string UpdateSecretVersionStageRequest::getRemoveFromVersion()const
{
return removeFromVersion_;
}
void UpdateSecretVersionStageRequest::setRemoveFromVersion(const std::string& removeFromVersion)
{
removeFromVersion_ = removeFromVersion;
setParameter("RemoveFromVersion", removeFromVersion);
}
std::string UpdateSecretVersionStageRequest::getMoveToVersion()const
{
return moveToVersion_;
}
void UpdateSecretVersionStageRequest::setMoveToVersion(const std::string& moveToVersion)
{
moveToVersion_ = moveToVersion;
setParameter("MoveToVersion", moveToVersion);
}
std::string UpdateSecretVersionStageRequest::getVersionStage()const
{
return versionStage_;
}
void UpdateSecretVersionStageRequest::setVersionStage(const std::string& versionStage)
{
versionStage_ = versionStage;
setParameter("VersionStage", versionStage);
}
std::string UpdateSecretVersionStageRequest::getSecretName()const
{
return secretName_;
}
void UpdateSecretVersionStageRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}

View 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/UpdateSecretVersionStageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
UpdateSecretVersionStageResult::UpdateSecretVersionStageResult() :
ServiceResult()
{}
UpdateSecretVersionStageResult::UpdateSecretVersionStageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateSecretVersionStageResult::~UpdateSecretVersionStageResult()
{}
void UpdateSecretVersionStageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
}
std::string UpdateSecretVersionStageResult::getSecretName()const
{
return secretName_;
}