KMS SDK Auto Released By shenshi,Version:1.34.57

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2019-03-21 17:12:57 +08:00
parent 50463a22aa
commit c98efebbad
95 changed files with 6224 additions and 2 deletions

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/CancelKeyDeletionRequest.h>
using AlibabaCloud::Kms::Model::CancelKeyDeletionRequest;
CancelKeyDeletionRequest::CancelKeyDeletionRequest() :
RpcServiceRequest("kms", "2016-01-20", "CancelKeyDeletion")
{}
CancelKeyDeletionRequest::~CancelKeyDeletionRequest()
{}
std::string CancelKeyDeletionRequest::getKeyId()const
{
return keyId_;
}
void CancelKeyDeletionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string CancelKeyDeletionRequest::getSTSToken()const
{
return sTSToken_;
}
void CancelKeyDeletionRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/CreateAliasRequest.h>
using AlibabaCloud::Kms::Model::CreateAliasRequest;
CreateAliasRequest::CreateAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateAlias")
{}
CreateAliasRequest::~CreateAliasRequest()
{}
std::string CreateAliasRequest::getAliasName()const
{
return aliasName_;
}
void CreateAliasRequest::setAliasName(const std::string& aliasName)
{
aliasName_ = aliasName;
setParameter("AliasName", aliasName);
}
std::string CreateAliasRequest::getKeyId()const
{
return keyId_;
}
void CreateAliasRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string CreateAliasRequest::getSTSToken()const
{
return sTSToken_;
}
void CreateAliasRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/CreateKeyRequest.h>
using AlibabaCloud::Kms::Model::CreateKeyRequest;
CreateKeyRequest::CreateKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateKey")
{}
CreateKeyRequest::~CreateKeyRequest()
{}
std::string CreateKeyRequest::getKeyUsage()const
{
return keyUsage_;
}
void CreateKeyRequest::setKeyUsage(const std::string& keyUsage)
{
keyUsage_ = keyUsage;
setParameter("KeyUsage", keyUsage);
}
std::string CreateKeyRequest::getOrigin()const
{
return origin_;
}
void CreateKeyRequest::setOrigin(const std::string& origin)
{
origin_ = origin;
setParameter("Origin", origin);
}
std::string CreateKeyRequest::getDescription()const
{
return description_;
}
void CreateKeyRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateKeyRequest::getSTSToken()const
{
return sTSToken_;
}
void CreateKeyRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/CreateKeyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
CreateKeyResult::CreateKeyResult() :
ServiceResult()
{}
CreateKeyResult::CreateKeyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateKeyResult::~CreateKeyResult()
{}
void CreateKeyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto keyMetadataNode = value["KeyMetadata"];
if(!keyMetadataNode["CreationDate"].isNull())
keyMetadata_.creationDate = keyMetadataNode["CreationDate"].asString();
if(!keyMetadataNode["Description"].isNull())
keyMetadata_.description = keyMetadataNode["Description"].asString();
if(!keyMetadataNode["KeyId"].isNull())
keyMetadata_.keyId = keyMetadataNode["KeyId"].asString();
if(!keyMetadataNode["KeyState"].isNull())
keyMetadata_.keyState = keyMetadataNode["KeyState"].asString();
if(!keyMetadataNode["KeyUsage"].isNull())
keyMetadata_.keyUsage = keyMetadataNode["KeyUsage"].asString();
if(!keyMetadataNode["DeleteDate"].isNull())
keyMetadata_.deleteDate = keyMetadataNode["DeleteDate"].asString();
if(!keyMetadataNode["Creator"].isNull())
keyMetadata_.creator = keyMetadataNode["Creator"].asString();
if(!keyMetadataNode["Arn"].isNull())
keyMetadata_.arn = keyMetadataNode["Arn"].asString();
if(!keyMetadataNode["Origin"].isNull())
keyMetadata_.origin = keyMetadataNode["Origin"].asString();
if(!keyMetadataNode["MaterialExpireTime"].isNull())
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
}
CreateKeyResult::KeyMetadata CreateKeyResult::getKeyMetadata()const
{
return keyMetadata_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/DecryptRequest.h>
using AlibabaCloud::Kms::Model::DecryptRequest;
DecryptRequest::DecryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "Decrypt")
{}
DecryptRequest::~DecryptRequest()
{}
std::string DecryptRequest::getEncryptionContext()const
{
return encryptionContext_;
}
void DecryptRequest::setEncryptionContext(const std::string& encryptionContext)
{
encryptionContext_ = encryptionContext;
setParameter("EncryptionContext", encryptionContext);
}
std::string DecryptRequest::getSTSToken()const
{
return sTSToken_;
}
void DecryptRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
std::string DecryptRequest::getCiphertextBlob()const
{
return ciphertextBlob_;
}
void DecryptRequest::setCiphertextBlob(const std::string& ciphertextBlob)
{
ciphertextBlob_ = ciphertextBlob;
setParameter("CiphertextBlob", ciphertextBlob);
}

View File

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

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/DeleteAliasRequest.h>
using AlibabaCloud::Kms::Model::DeleteAliasRequest;
DeleteAliasRequest::DeleteAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "DeleteAlias")
{}
DeleteAliasRequest::~DeleteAliasRequest()
{}
std::string DeleteAliasRequest::getAliasName()const
{
return aliasName_;
}
void DeleteAliasRequest::setAliasName(const std::string& aliasName)
{
aliasName_ = aliasName;
setParameter("AliasName", aliasName);
}
std::string DeleteAliasRequest::getSTSToken()const
{
return sTSToken_;
}
void DeleteAliasRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/DeleteKeyMaterialRequest.h>
using AlibabaCloud::Kms::Model::DeleteKeyMaterialRequest;
DeleteKeyMaterialRequest::DeleteKeyMaterialRequest() :
RpcServiceRequest("kms", "2016-01-20", "DeleteKeyMaterial")
{}
DeleteKeyMaterialRequest::~DeleteKeyMaterialRequest()
{}
std::string DeleteKeyMaterialRequest::getKeyId()const
{
return keyId_;
}
void DeleteKeyMaterialRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string DeleteKeyMaterialRequest::getSTSToken()const
{
return sTSToken_;
}
void DeleteKeyMaterialRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/DescribeKeyRequest.h>
using AlibabaCloud::Kms::Model::DescribeKeyRequest;
DescribeKeyRequest::DescribeKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeKey")
{}
DescribeKeyRequest::~DescribeKeyRequest()
{}
std::string DescribeKeyRequest::getKeyId()const
{
return keyId_;
}
void DescribeKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string DescribeKeyRequest::getSTSToken()const
{
return sTSToken_;
}
void DescribeKeyRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/DescribeKeyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
DescribeKeyResult::DescribeKeyResult() :
ServiceResult()
{}
DescribeKeyResult::DescribeKeyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeKeyResult::~DescribeKeyResult()
{}
void DescribeKeyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto keyMetadataNode = value["KeyMetadata"];
if(!keyMetadataNode["CreationDate"].isNull())
keyMetadata_.creationDate = keyMetadataNode["CreationDate"].asString();
if(!keyMetadataNode["Description"].isNull())
keyMetadata_.description = keyMetadataNode["Description"].asString();
if(!keyMetadataNode["KeyId"].isNull())
keyMetadata_.keyId = keyMetadataNode["KeyId"].asString();
if(!keyMetadataNode["KeyState"].isNull())
keyMetadata_.keyState = keyMetadataNode["KeyState"].asString();
if(!keyMetadataNode["KeyUsage"].isNull())
keyMetadata_.keyUsage = keyMetadataNode["KeyUsage"].asString();
if(!keyMetadataNode["DeleteDate"].isNull())
keyMetadata_.deleteDate = keyMetadataNode["DeleteDate"].asString();
if(!keyMetadataNode["Creator"].isNull())
keyMetadata_.creator = keyMetadataNode["Creator"].asString();
if(!keyMetadataNode["Arn"].isNull())
keyMetadata_.arn = keyMetadataNode["Arn"].asString();
if(!keyMetadataNode["Origin"].isNull())
keyMetadata_.origin = keyMetadataNode["Origin"].asString();
if(!keyMetadataNode["MaterialExpireTime"].isNull())
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
}
DescribeKeyResult::KeyMetadata DescribeKeyResult::getKeyMetadata()const
{
return keyMetadata_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/DescribeRegionsRequest.h>
using AlibabaCloud::Kms::Model::DescribeRegionsRequest;
DescribeRegionsRequest::DescribeRegionsRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeRegions")
{}
DescribeRegionsRequest::~DescribeRegionsRequest()
{}
std::string DescribeRegionsRequest::getSTSToken()const
{
return sTSToken_;
}
void DescribeRegionsRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

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/DescribeRegionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
DescribeRegionsResult::DescribeRegionsResult() :
ServiceResult()
{}
DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeRegionsResult::~DescribeRegionsResult()
{}
void DescribeRegionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRegions = value["Regions"]["Region"];
for (auto value : allRegions)
{
Region regionsObject;
if(!value["RegionId"].isNull())
regionsObject.regionId = value["RegionId"].asString();
regions_.push_back(regionsObject);
}
}
std::vector<DescribeRegionsResult::Region> DescribeRegionsResult::getRegions()const
{
return regions_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/DisableKeyRequest.h>
using AlibabaCloud::Kms::Model::DisableKeyRequest;
DisableKeyRequest::DisableKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "DisableKey")
{}
DisableKeyRequest::~DisableKeyRequest()
{}
std::string DisableKeyRequest::getKeyId()const
{
return keyId_;
}
void DisableKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string DisableKeyRequest::getSTSToken()const
{
return sTSToken_;
}
void DisableKeyRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/EnableKeyRequest.h>
using AlibabaCloud::Kms::Model::EnableKeyRequest;
EnableKeyRequest::EnableKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "EnableKey")
{}
EnableKeyRequest::~EnableKeyRequest()
{}
std::string EnableKeyRequest::getKeyId()const
{
return keyId_;
}
void EnableKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string EnableKeyRequest::getSTSToken()const
{
return sTSToken_;
}
void EnableKeyRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/EncryptRequest.h>
using AlibabaCloud::Kms::Model::EncryptRequest;
EncryptRequest::EncryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "Encrypt")
{}
EncryptRequest::~EncryptRequest()
{}
std::string EncryptRequest::getEncryptionContext()const
{
return encryptionContext_;
}
void EncryptRequest::setEncryptionContext(const std::string& encryptionContext)
{
encryptionContext_ = encryptionContext;
setParameter("EncryptionContext", encryptionContext);
}
std::string EncryptRequest::getKeyId()const
{
return keyId_;
}
void EncryptRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string EncryptRequest::getSTSToken()const
{
return sTSToken_;
}
void EncryptRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
std::string EncryptRequest::getPlaintext()const
{
return plaintext_;
}
void EncryptRequest::setPlaintext(const std::string& plaintext)
{
plaintext_ = plaintext;
setParameter("Plaintext", plaintext);
}

View File

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

View File

@@ -0,0 +1,82 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/GenerateDataKeyRequest.h>
using AlibabaCloud::Kms::Model::GenerateDataKeyRequest;
GenerateDataKeyRequest::GenerateDataKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKey")
{}
GenerateDataKeyRequest::~GenerateDataKeyRequest()
{}
std::string GenerateDataKeyRequest::getEncryptionContext()const
{
return encryptionContext_;
}
void GenerateDataKeyRequest::setEncryptionContext(const std::string& encryptionContext)
{
encryptionContext_ = encryptionContext;
setParameter("EncryptionContext", encryptionContext);
}
std::string GenerateDataKeyRequest::getKeyId()const
{
return keyId_;
}
void GenerateDataKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string GenerateDataKeyRequest::getKeySpec()const
{
return keySpec_;
}
void GenerateDataKeyRequest::setKeySpec(const std::string& keySpec)
{
keySpec_ = keySpec;
setParameter("KeySpec", keySpec);
}
std::string GenerateDataKeyRequest::getSTSToken()const
{
return sTSToken_;
}
void GenerateDataKeyRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
int GenerateDataKeyRequest::getNumberOfBytes()const
{
return numberOfBytes_;
}
void GenerateDataKeyRequest::setNumberOfBytes(int numberOfBytes)
{
numberOfBytes_ = numberOfBytes;
setParameter("NumberOfBytes", std::to_string(numberOfBytes));
}

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/GenerateDataKeyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
GenerateDataKeyResult::GenerateDataKeyResult() :
ServiceResult()
{}
GenerateDataKeyResult::GenerateDataKeyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenerateDataKeyResult::~GenerateDataKeyResult()
{}
void GenerateDataKeyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["CiphertextBlob"].isNull())
ciphertextBlob_ = value["CiphertextBlob"].asString();
if(!value["KeyId"].isNull())
keyId_ = value["KeyId"].asString();
if(!value["Plaintext"].isNull())
plaintext_ = value["Plaintext"].asString();
}
std::string GenerateDataKeyResult::getCiphertextBlob()const
{
return ciphertextBlob_;
}
std::string GenerateDataKeyResult::getPlaintext()const
{
return plaintext_;
}
std::string GenerateDataKeyResult::getKeyId()const
{
return keyId_;
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/GetParametersForImportRequest.h>
using AlibabaCloud::Kms::Model::GetParametersForImportRequest;
GetParametersForImportRequest::GetParametersForImportRequest() :
RpcServiceRequest("kms", "2016-01-20", "GetParametersForImport")
{}
GetParametersForImportRequest::~GetParametersForImportRequest()
{}
std::string GetParametersForImportRequest::getKeyId()const
{
return keyId_;
}
void GetParametersForImportRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string GetParametersForImportRequest::getSTSToken()const
{
return sTSToken_;
}
void GetParametersForImportRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
std::string GetParametersForImportRequest::getWrappingAlgorithm()const
{
return wrappingAlgorithm_;
}
void GetParametersForImportRequest::setWrappingAlgorithm(const std::string& wrappingAlgorithm)
{
wrappingAlgorithm_ = wrappingAlgorithm;
setParameter("WrappingAlgorithm", wrappingAlgorithm);
}
std::string GetParametersForImportRequest::getWrappingKeySpec()const
{
return wrappingKeySpec_;
}
void GetParametersForImportRequest::setWrappingKeySpec(const std::string& wrappingKeySpec)
{
wrappingKeySpec_ = wrappingKeySpec;
setParameter("WrappingKeySpec", wrappingKeySpec);
}

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/GetParametersForImportResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
GetParametersForImportResult::GetParametersForImportResult() :
ServiceResult()
{}
GetParametersForImportResult::GetParametersForImportResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetParametersForImportResult::~GetParametersForImportResult()
{}
void GetParametersForImportResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["KeyId"].isNull())
keyId_ = value["KeyId"].asString();
if(!value["ImportToken"].isNull())
importToken_ = value["ImportToken"].asString();
if(!value["PublicKey"].isNull())
publicKey_ = value["PublicKey"].asString();
if(!value["TokenExpireTime"].isNull())
tokenExpireTime_ = value["TokenExpireTime"].asString();
}
std::string GetParametersForImportResult::getPublicKey()const
{
return publicKey_;
}
std::string GetParametersForImportResult::getKeyId()const
{
return keyId_;
}
std::string GetParametersForImportResult::getTokenExpireTime()const
{
return tokenExpireTime_;
}
std::string GetParametersForImportResult::getImportToken()const
{
return importToken_;
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ImportKeyMaterialRequest.h>
using AlibabaCloud::Kms::Model::ImportKeyMaterialRequest;
ImportKeyMaterialRequest::ImportKeyMaterialRequest() :
RpcServiceRequest("kms", "2016-01-20", "ImportKeyMaterial")
{}
ImportKeyMaterialRequest::~ImportKeyMaterialRequest()
{}
std::string ImportKeyMaterialRequest::getImportToken()const
{
return importToken_;
}
void ImportKeyMaterialRequest::setImportToken(const std::string& importToken)
{
importToken_ = importToken;
setParameter("ImportToken", importToken);
}
std::string ImportKeyMaterialRequest::getEncryptedKeyMaterial()const
{
return encryptedKeyMaterial_;
}
void ImportKeyMaterialRequest::setEncryptedKeyMaterial(const std::string& encryptedKeyMaterial)
{
encryptedKeyMaterial_ = encryptedKeyMaterial;
setParameter("EncryptedKeyMaterial", encryptedKeyMaterial);
}
long ImportKeyMaterialRequest::getKeyMaterialExpireUnix()const
{
return keyMaterialExpireUnix_;
}
void ImportKeyMaterialRequest::setKeyMaterialExpireUnix(long keyMaterialExpireUnix)
{
keyMaterialExpireUnix_ = keyMaterialExpireUnix;
setParameter("KeyMaterialExpireUnix", std::to_string(keyMaterialExpireUnix));
}
std::string ImportKeyMaterialRequest::getKeyId()const
{
return keyId_;
}
void ImportKeyMaterialRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string ImportKeyMaterialRequest::getSTSToken()const
{
return sTSToken_;
}
void ImportKeyMaterialRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ListAliasesByKeyIdRequest.h>
using AlibabaCloud::Kms::Model::ListAliasesByKeyIdRequest;
ListAliasesByKeyIdRequest::ListAliasesByKeyIdRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListAliasesByKeyId")
{}
ListAliasesByKeyIdRequest::~ListAliasesByKeyIdRequest()
{}
int ListAliasesByKeyIdRequest::getPageSize()const
{
return pageSize_;
}
void ListAliasesByKeyIdRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListAliasesByKeyIdRequest::getKeyId()const
{
return keyId_;
}
void ListAliasesByKeyIdRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string ListAliasesByKeyIdRequest::getSTSToken()const
{
return sTSToken_;
}
void ListAliasesByKeyIdRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
int ListAliasesByKeyIdRequest::getPageNumber()const
{
return pageNumber_;
}
void ListAliasesByKeyIdRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ListAliasesByKeyIdResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
ListAliasesByKeyIdResult::ListAliasesByKeyIdResult() :
ServiceResult()
{}
ListAliasesByKeyIdResult::ListAliasesByKeyIdResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListAliasesByKeyIdResult::~ListAliasesByKeyIdResult()
{}
void ListAliasesByKeyIdResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAliases = value["Aliases"]["Alias"];
for (auto value : allAliases)
{
Alias aliasesObject;
if(!value["KeyId"].isNull())
aliasesObject.keyId = value["KeyId"].asString();
if(!value["AliasName"].isNull())
aliasesObject.aliasName = value["AliasName"].asString();
if(!value["AliasArn"].isNull())
aliasesObject.aliasArn = value["AliasArn"].asString();
aliases_.push_back(aliasesObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int ListAliasesByKeyIdResult::getTotalCount()const
{
return totalCount_;
}
int ListAliasesByKeyIdResult::getPageSize()const
{
return pageSize_;
}
int ListAliasesByKeyIdResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListAliasesByKeyIdResult::Alias> ListAliasesByKeyIdResult::getAliases()const
{
return aliases_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ListAliasesRequest.h>
using AlibabaCloud::Kms::Model::ListAliasesRequest;
ListAliasesRequest::ListAliasesRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListAliases")
{}
ListAliasesRequest::~ListAliasesRequest()
{}
int ListAliasesRequest::getPageSize()const
{
return pageSize_;
}
void ListAliasesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListAliasesRequest::getSTSToken()const
{
return sTSToken_;
}
void ListAliasesRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
int ListAliasesRequest::getPageNumber()const
{
return pageNumber_;
}
void ListAliasesRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ListAliasesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
ListAliasesResult::ListAliasesResult() :
ServiceResult()
{}
ListAliasesResult::ListAliasesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListAliasesResult::~ListAliasesResult()
{}
void ListAliasesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAliases = value["Aliases"]["Alias"];
for (auto value : allAliases)
{
Alias aliasesObject;
if(!value["KeyId"].isNull())
aliasesObject.keyId = value["KeyId"].asString();
if(!value["AliasName"].isNull())
aliasesObject.aliasName = value["AliasName"].asString();
if(!value["AliasArn"].isNull())
aliasesObject.aliasArn = value["AliasArn"].asString();
aliases_.push_back(aliasesObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int ListAliasesResult::getTotalCount()const
{
return totalCount_;
}
int ListAliasesResult::getPageSize()const
{
return pageSize_;
}
int ListAliasesResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListAliasesResult::Alias> ListAliasesResult::getAliases()const
{
return aliases_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ListKeysRequest.h>
using AlibabaCloud::Kms::Model::ListKeysRequest;
ListKeysRequest::ListKeysRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListKeys")
{}
ListKeysRequest::~ListKeysRequest()
{}
int ListKeysRequest::getPageSize()const
{
return pageSize_;
}
void ListKeysRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListKeysRequest::getSTSToken()const
{
return sTSToken_;
}
void ListKeysRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
int ListKeysRequest::getPageNumber()const
{
return pageNumber_;
}
void ListKeysRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ListKeysResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
ListKeysResult::ListKeysResult() :
ServiceResult()
{}
ListKeysResult::ListKeysResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListKeysResult::~ListKeysResult()
{}
void ListKeysResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allKeys = value["Keys"]["Key"];
for (auto value : allKeys)
{
Key keysObject;
if(!value["KeyId"].isNull())
keysObject.keyId = value["KeyId"].asString();
if(!value["KeyArn"].isNull())
keysObject.keyArn = value["KeyArn"].asString();
keys_.push_back(keysObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int ListKeysResult::getTotalCount()const
{
return totalCount_;
}
int ListKeysResult::getPageSize()const
{
return pageSize_;
}
int ListKeysResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListKeysResult::Key> ListKeysResult::getKeys()const
{
return keys_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ListResourceTagsRequest.h>
using AlibabaCloud::Kms::Model::ListResourceTagsRequest;
ListResourceTagsRequest::ListResourceTagsRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListResourceTags")
{}
ListResourceTagsRequest::~ListResourceTagsRequest()
{}
std::string ListResourceTagsRequest::getKeyId()const
{
return keyId_;
}
void ListResourceTagsRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string ListResourceTagsRequest::getSTSToken()const
{
return sTSToken_;
}
void ListResourceTagsRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

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/ListResourceTagsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
ListResourceTagsResult::ListResourceTagsResult() :
ServiceResult()
{}
ListResourceTagsResult::ListResourceTagsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListResourceTagsResult::~ListResourceTagsResult()
{}
void ListResourceTagsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{
Tag tagsObject;
if(!value["KeyId"].isNull())
tagsObject.keyId = value["KeyId"].asString();
if(!value["TagKey"].isNull())
tagsObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
tagsObject.tagValue = value["TagValue"].asString();
tags_.push_back(tagsObject);
}
}
std::vector<ListResourceTagsResult::Tag> ListResourceTagsResult::getTags()const
{
return tags_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/ScheduleKeyDeletionRequest.h>
using AlibabaCloud::Kms::Model::ScheduleKeyDeletionRequest;
ScheduleKeyDeletionRequest::ScheduleKeyDeletionRequest() :
RpcServiceRequest("kms", "2016-01-20", "ScheduleKeyDeletion")
{}
ScheduleKeyDeletionRequest::~ScheduleKeyDeletionRequest()
{}
int ScheduleKeyDeletionRequest::getPendingWindowInDays()const
{
return pendingWindowInDays_;
}
void ScheduleKeyDeletionRequest::setPendingWindowInDays(int pendingWindowInDays)
{
pendingWindowInDays_ = pendingWindowInDays;
setParameter("PendingWindowInDays", std::to_string(pendingWindowInDays));
}
std::string ScheduleKeyDeletionRequest::getKeyId()const
{
return keyId_;
}
void ScheduleKeyDeletionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string ScheduleKeyDeletionRequest::getSTSToken()const
{
return sTSToken_;
}
void ScheduleKeyDeletionRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/TagResourceRequest.h>
using AlibabaCloud::Kms::Model::TagResourceRequest;
TagResourceRequest::TagResourceRequest() :
RpcServiceRequest("kms", "2016-01-20", "TagResource")
{}
TagResourceRequest::~TagResourceRequest()
{}
std::string TagResourceRequest::getKeyId()const
{
return keyId_;
}
void TagResourceRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string TagResourceRequest::getSTSToken()const
{
return sTSToken_;
}
void TagResourceRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}
std::string TagResourceRequest::getTags()const
{
return tags_;
}
void TagResourceRequest::setTags(const std::string& tags)
{
tags_ = tags;
setParameter("Tags", tags);
}

View File

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

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/UntagResourceRequest.h>
using AlibabaCloud::Kms::Model::UntagResourceRequest;
UntagResourceRequest::UntagResourceRequest() :
RpcServiceRequest("kms", "2016-01-20", "UntagResource")
{}
UntagResourceRequest::~UntagResourceRequest()
{}
std::string UntagResourceRequest::getTagKeys()const
{
return tagKeys_;
}
void UntagResourceRequest::setTagKeys(const std::string& tagKeys)
{
tagKeys_ = tagKeys;
setParameter("TagKeys", tagKeys);
}
std::string UntagResourceRequest::getKeyId()const
{
return keyId_;
}
void UntagResourceRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string UntagResourceRequest::getSTSToken()const
{
return sTSToken_;
}
void UntagResourceRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/UpdateAliasRequest.h>
using AlibabaCloud::Kms::Model::UpdateAliasRequest;
UpdateAliasRequest::UpdateAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateAlias")
{}
UpdateAliasRequest::~UpdateAliasRequest()
{}
std::string UpdateAliasRequest::getAliasName()const
{
return aliasName_;
}
void UpdateAliasRequest::setAliasName(const std::string& aliasName)
{
aliasName_ = aliasName;
setParameter("AliasName", aliasName);
}
std::string UpdateAliasRequest::getKeyId()const
{
return keyId_;
}
void UpdateAliasRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setParameter("KeyId", keyId);
}
std::string UpdateAliasRequest::getSTSToken()const
{
return sTSToken_;
}
void UpdateAliasRequest::setSTSToken(const std::string& sTSToken)
{
sTSToken_ = sTSToken;
setParameter("STSToken", sTSToken);
}

View File

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