Generated 2016-01-20 for Kms.
This commit is contained in:
@@ -303,6 +303,42 @@ KmsClient::DescribeKeyOutcomeCallable KmsClient::describeKeyCallable(const Descr
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeKeyVersionOutcome KmsClient::describeKeyVersion(const DescribeKeyVersionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeKeyVersionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeKeyVersionOutcome(DescribeKeyVersionResult(outcome.result()));
|
||||
else
|
||||
return DescribeKeyVersionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::describeKeyVersionAsync(const DescribeKeyVersionRequest& request, const DescribeKeyVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeKeyVersion(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DescribeKeyVersionOutcomeCallable KmsClient::describeKeyVersionCallable(const DescribeKeyVersionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeKeyVersionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeKeyVersion(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeRegionsOutcome KmsClient::describeRegions(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -519,6 +555,42 @@ KmsClient::GenerateDataKeyOutcomeCallable KmsClient::generateDataKeyCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GenerateDataKeyWithoutPlaintextOutcome KmsClient::generateDataKeyWithoutPlaintext(const GenerateDataKeyWithoutPlaintextRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GenerateDataKeyWithoutPlaintextOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GenerateDataKeyWithoutPlaintextOutcome(GenerateDataKeyWithoutPlaintextResult(outcome.result()));
|
||||
else
|
||||
return GenerateDataKeyWithoutPlaintextOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::generateDataKeyWithoutPlaintextAsync(const GenerateDataKeyWithoutPlaintextRequest& request, const GenerateDataKeyWithoutPlaintextAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, generateDataKeyWithoutPlaintext(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::GenerateDataKeyWithoutPlaintextOutcomeCallable KmsClient::generateDataKeyWithoutPlaintextCallable(const GenerateDataKeyWithoutPlaintextRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GenerateDataKeyWithoutPlaintextOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->generateDataKeyWithoutPlaintext(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetParametersForImportOutcome KmsClient::getParametersForImport(const GetParametersForImportRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -663,6 +735,42 @@ KmsClient::ListAliasesByKeyIdOutcomeCallable KmsClient::listAliasesByKeyIdCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListKeyVersionsOutcome KmsClient::listKeyVersions(const ListKeyVersionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListKeyVersionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListKeyVersionsOutcome(ListKeyVersionsResult(outcome.result()));
|
||||
else
|
||||
return ListKeyVersionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::listKeyVersionsAsync(const ListKeyVersionsRequest& request, const ListKeyVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listKeyVersions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ListKeyVersionsOutcomeCallable KmsClient::listKeyVersionsCallable(const ListKeyVersionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListKeyVersionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listKeyVersions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListKeysOutcome KmsClient::listKeys(const ListKeysRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -879,3 +987,75 @@ KmsClient::UpdateAliasOutcomeCallable KmsClient::updateAliasCallable(const Updat
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UpdateKeyDescriptionOutcome KmsClient::updateKeyDescription(const UpdateKeyDescriptionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateKeyDescriptionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateKeyDescriptionOutcome(UpdateKeyDescriptionResult(outcome.result()));
|
||||
else
|
||||
return UpdateKeyDescriptionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::updateKeyDescriptionAsync(const UpdateKeyDescriptionRequest& request, const UpdateKeyDescriptionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateKeyDescription(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UpdateKeyDescriptionOutcomeCallable KmsClient::updateKeyDescriptionCallable(const UpdateKeyDescriptionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateKeyDescriptionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateKeyDescription(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UpdateRotationPolicyOutcome KmsClient::updateRotationPolicy(const UpdateRotationPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateRotationPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateRotationPolicyOutcome(UpdateRotationPolicyResult(outcome.result()));
|
||||
else
|
||||
return UpdateRotationPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::updateRotationPolicyAsync(const UpdateRotationPolicyRequest& request, const UpdateRotationPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateRotationPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UpdateRotationPolicyOutcomeCallable KmsClient::updateRotationPolicyCallable(const UpdateRotationPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateRotationPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateRotationPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
@@ -69,3 +69,25 @@ void CreateKeyRequest::setDescription(const std::string& description)
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string CreateKeyRequest::getRotationInterval()const
|
||||
{
|
||||
return rotationInterval_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setRotationInterval(const std::string& rotationInterval)
|
||||
{
|
||||
rotationInterval_ = rotationInterval;
|
||||
setCoreParameter("RotationInterval", rotationInterval);
|
||||
}
|
||||
|
||||
bool CreateKeyRequest::getEnableAutomaticRotation()const
|
||||
{
|
||||
return enableAutomaticRotation_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
|
||||
{
|
||||
enableAutomaticRotation_ = enableAutomaticRotation;
|
||||
setCoreParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,16 @@ void CreateKeyResult::parse(const std::string &payload)
|
||||
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
|
||||
if(!keyMetadataNode["ProtectionLevel"].isNull())
|
||||
keyMetadata_.protectionLevel = keyMetadataNode["ProtectionLevel"].asString();
|
||||
if(!keyMetadataNode["PrimaryKeyVersion"].isNull())
|
||||
keyMetadata_.primaryKeyVersion = keyMetadataNode["PrimaryKeyVersion"].asString();
|
||||
if(!keyMetadataNode["LastRotationDate"].isNull())
|
||||
keyMetadata_.lastRotationDate = keyMetadataNode["LastRotationDate"].asString();
|
||||
if(!keyMetadataNode["AutomaticRotation"].isNull())
|
||||
keyMetadata_.automaticRotation = keyMetadataNode["AutomaticRotation"].asString();
|
||||
if(!keyMetadataNode["RotationInterval"].isNull())
|
||||
keyMetadata_.rotationInterval = keyMetadataNode["RotationInterval"].asString();
|
||||
if(!keyMetadataNode["NextRotationDate"].isNull())
|
||||
keyMetadata_.nextRotationDate = keyMetadataNode["NextRotationDate"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ void DecryptResult::parse(const std::string &payload)
|
||||
plaintext_ = value["Plaintext"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -56,3 +58,8 @@ std::string DecryptResult::getKeyId()const
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string DecryptResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,16 @@ void DescribeKeyResult::parse(const std::string &payload)
|
||||
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
|
||||
if(!keyMetadataNode["ProtectionLevel"].isNull())
|
||||
keyMetadata_.protectionLevel = keyMetadataNode["ProtectionLevel"].asString();
|
||||
if(!keyMetadataNode["PrimaryKeyVersion"].isNull())
|
||||
keyMetadata_.primaryKeyVersion = keyMetadataNode["PrimaryKeyVersion"].asString();
|
||||
if(!keyMetadataNode["LastRotationDate"].isNull())
|
||||
keyMetadata_.lastRotationDate = keyMetadataNode["LastRotationDate"].asString();
|
||||
if(!keyMetadataNode["AutomaticRotation"].isNull())
|
||||
keyMetadata_.automaticRotation = keyMetadataNode["AutomaticRotation"].asString();
|
||||
if(!keyMetadataNode["RotationInterval"].isNull())
|
||||
keyMetadata_.rotationInterval = keyMetadataNode["RotationInterval"].asString();
|
||||
if(!keyMetadataNode["NextRotationDate"].isNull())
|
||||
keyMetadata_.nextRotationDate = keyMetadataNode["NextRotationDate"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
49
kms/src/model/DescribeKeyVersionRequest.cc
Normal file
49
kms/src/model/DescribeKeyVersionRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DescribeKeyVersionRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DescribeKeyVersionRequest;
|
||||
|
||||
DescribeKeyVersionRequest::DescribeKeyVersionRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DescribeKeyVersion")
|
||||
{}
|
||||
|
||||
DescribeKeyVersionRequest::~DescribeKeyVersionRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeKeyVersionRequest::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
void DescribeKeyVersionRequest::setKeyVersionId(const std::string& keyVersionId)
|
||||
{
|
||||
keyVersionId_ = keyVersionId;
|
||||
setCoreParameter("KeyVersionId", keyVersionId);
|
||||
}
|
||||
|
||||
std::string DescribeKeyVersionRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void DescribeKeyVersionRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
56
kms/src/model/DescribeKeyVersionResult.cc
Normal file
56
kms/src/model/DescribeKeyVersionResult.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/DescribeKeyVersionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DescribeKeyVersionResult::DescribeKeyVersionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeKeyVersionResult::DescribeKeyVersionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeKeyVersionResult::~DescribeKeyVersionResult()
|
||||
{}
|
||||
|
||||
void DescribeKeyVersionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto keyVersionNode = value["KeyVersion"];
|
||||
if(!keyVersionNode["KeyId"].isNull())
|
||||
keyVersion_.keyId = keyVersionNode["KeyId"].asString();
|
||||
if(!keyVersionNode["KeyVersionId"].isNull())
|
||||
keyVersion_.keyVersionId = keyVersionNode["KeyVersionId"].asString();
|
||||
if(!keyVersionNode["CreationDate"].isNull())
|
||||
keyVersion_.creationDate = keyVersionNode["CreationDate"].asString();
|
||||
|
||||
}
|
||||
|
||||
DescribeKeyVersionResult::KeyVersion DescribeKeyVersionResult::getKeyVersion()const
|
||||
{
|
||||
return keyVersion_;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ void EncryptResult::parse(const std::string &payload)
|
||||
ciphertextBlob_ = value["CiphertextBlob"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -56,3 +58,8 @@ std::string EncryptResult::getKeyId()const
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string EncryptResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ void GenerateDataKeyResult::parse(const std::string &payload)
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["Plaintext"].isNull())
|
||||
plaintext_ = value["Plaintext"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -63,3 +65,8 @@ std::string GenerateDataKeyResult::getKeyId()const
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
|
||||
71
kms/src/model/GenerateDataKeyWithoutPlaintextRequest.cc
Normal file
71
kms/src/model/GenerateDataKeyWithoutPlaintextRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/GenerateDataKeyWithoutPlaintextRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::GenerateDataKeyWithoutPlaintextRequest;
|
||||
|
||||
GenerateDataKeyWithoutPlaintextRequest::GenerateDataKeyWithoutPlaintextRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKeyWithoutPlaintext")
|
||||
{}
|
||||
|
||||
GenerateDataKeyWithoutPlaintextRequest::~GenerateDataKeyWithoutPlaintextRequest()
|
||||
{}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextRequest::getEncryptionContext()const
|
||||
{
|
||||
return encryptionContext_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setEncryptionContext(const std::string& encryptionContext)
|
||||
{
|
||||
encryptionContext_ = encryptionContext;
|
||||
setCoreParameter("EncryptionContext", encryptionContext);
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextRequest::getKeySpec()const
|
||||
{
|
||||
return keySpec_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setKeySpec(const std::string& keySpec)
|
||||
{
|
||||
keySpec_ = keySpec;
|
||||
setCoreParameter("KeySpec", keySpec);
|
||||
}
|
||||
|
||||
int GenerateDataKeyWithoutPlaintextRequest::getNumberOfBytes()const
|
||||
{
|
||||
return numberOfBytes_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setNumberOfBytes(int numberOfBytes)
|
||||
{
|
||||
numberOfBytes_ = numberOfBytes;
|
||||
setCoreParameter("NumberOfBytes", std::to_string(numberOfBytes));
|
||||
}
|
||||
|
||||
65
kms/src/model/GenerateDataKeyWithoutPlaintextResult.cc
Normal file
65
kms/src/model/GenerateDataKeyWithoutPlaintextResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/GenerateDataKeyWithoutPlaintextResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
GenerateDataKeyWithoutPlaintextResult::GenerateDataKeyWithoutPlaintextResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenerateDataKeyWithoutPlaintextResult::GenerateDataKeyWithoutPlaintextResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenerateDataKeyWithoutPlaintextResult::~GenerateDataKeyWithoutPlaintextResult()
|
||||
{}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CiphertextBlob"].isNull())
|
||||
ciphertextBlob_ = value["CiphertextBlob"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextResult::getCiphertextBlob()const
|
||||
{
|
||||
return ciphertextBlob_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextResult::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
60
kms/src/model/ListKeyVersionsRequest.cc
Normal file
60
kms/src/model/ListKeyVersionsRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListKeyVersionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ListKeyVersionsRequest;
|
||||
|
||||
ListKeyVersionsRequest::ListKeyVersionsRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ListKeyVersions")
|
||||
{}
|
||||
|
||||
ListKeyVersionsRequest::~ListKeyVersionsRequest()
|
||||
{}
|
||||
|
||||
int ListKeyVersionsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListKeyVersionsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListKeyVersionsRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void ListKeyVersionsRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
int ListKeyVersionsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListKeyVersionsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
82
kms/src/model/ListKeyVersionsResult.cc
Normal file
82
kms/src/model/ListKeyVersionsResult.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/ListKeyVersionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ListKeyVersionsResult::ListKeyVersionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListKeyVersionsResult::ListKeyVersionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListKeyVersionsResult::~ListKeyVersionsResult()
|
||||
{}
|
||||
|
||||
void ListKeyVersionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allKeyVersionsNode = value["KeyVersions"]["KeyVersion"];
|
||||
for (auto valueKeyVersionsKeyVersion : allKeyVersionsNode)
|
||||
{
|
||||
KeyVersion keyVersionsObject;
|
||||
if(!valueKeyVersionsKeyVersion["KeyId"].isNull())
|
||||
keyVersionsObject.keyId = valueKeyVersionsKeyVersion["KeyId"].asString();
|
||||
if(!valueKeyVersionsKeyVersion["KeyVersionId"].isNull())
|
||||
keyVersionsObject.keyVersionId = valueKeyVersionsKeyVersion["KeyVersionId"].asString();
|
||||
if(!valueKeyVersionsKeyVersion["CreationDate"].isNull())
|
||||
keyVersionsObject.creationDate = valueKeyVersionsKeyVersion["CreationDate"].asString();
|
||||
keyVersions_.push_back(keyVersionsObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListKeyVersionsResult::KeyVersion> ListKeyVersionsResult::getKeyVersions()const
|
||||
{
|
||||
return keyVersions_;
|
||||
}
|
||||
|
||||
int ListKeyVersionsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ListKeyVersionsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListKeyVersionsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
49
kms/src/model/UpdateKeyDescriptionRequest.cc
Normal file
49
kms/src/model/UpdateKeyDescriptionRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UpdateKeyDescriptionRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UpdateKeyDescriptionRequest;
|
||||
|
||||
UpdateKeyDescriptionRequest::UpdateKeyDescriptionRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UpdateKeyDescription")
|
||||
{}
|
||||
|
||||
UpdateKeyDescriptionRequest::~UpdateKeyDescriptionRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateKeyDescriptionRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void UpdateKeyDescriptionRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string UpdateKeyDescriptionRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void UpdateKeyDescriptionRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
44
kms/src/model/UpdateKeyDescriptionResult.cc
Normal file
44
kms/src/model/UpdateKeyDescriptionResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UpdateKeyDescriptionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UpdateKeyDescriptionResult::UpdateKeyDescriptionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateKeyDescriptionResult::UpdateKeyDescriptionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateKeyDescriptionResult::~UpdateKeyDescriptionResult()
|
||||
{}
|
||||
|
||||
void UpdateKeyDescriptionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
60
kms/src/model/UpdateRotationPolicyRequest.cc
Normal file
60
kms/src/model/UpdateRotationPolicyRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UpdateRotationPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UpdateRotationPolicyRequest;
|
||||
|
||||
UpdateRotationPolicyRequest::UpdateRotationPolicyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UpdateRotationPolicy")
|
||||
{}
|
||||
|
||||
UpdateRotationPolicyRequest::~UpdateRotationPolicyRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateRotationPolicyRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void UpdateRotationPolicyRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string UpdateRotationPolicyRequest::getRotationInterval()const
|
||||
{
|
||||
return rotationInterval_;
|
||||
}
|
||||
|
||||
void UpdateRotationPolicyRequest::setRotationInterval(const std::string& rotationInterval)
|
||||
{
|
||||
rotationInterval_ = rotationInterval;
|
||||
setCoreParameter("RotationInterval", rotationInterval);
|
||||
}
|
||||
|
||||
bool UpdateRotationPolicyRequest::getEnableAutomaticRotation()const
|
||||
{
|
||||
return enableAutomaticRotation_;
|
||||
}
|
||||
|
||||
void UpdateRotationPolicyRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
|
||||
{
|
||||
enableAutomaticRotation_ = enableAutomaticRotation;
|
||||
setCoreParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
|
||||
}
|
||||
|
||||
44
kms/src/model/UpdateRotationPolicyResult.cc
Normal file
44
kms/src/model/UpdateRotationPolicyResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UpdateRotationPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UpdateRotationPolicyResult::UpdateRotationPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateRotationPolicyResult::UpdateRotationPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateRotationPolicyResult::~UpdateRotationPolicyResult()
|
||||
{}
|
||||
|
||||
void UpdateRotationPolicyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user