Fix DescribeInstance EncryptionType.
This commit is contained in:
@@ -1887,42 +1887,6 @@ HBaseClient::DescribeSubDomainOutcomeCallable HBaseClient::describeSubDomainCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::DescribeUserEncryptionKeyListOutcome HBaseClient::describeUserEncryptionKeyList(const DescribeUserEncryptionKeyListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeUserEncryptionKeyListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeUserEncryptionKeyListOutcome(DescribeUserEncryptionKeyListResult(outcome.result()));
|
||||
else
|
||||
return DescribeUserEncryptionKeyListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HBaseClient::describeUserEncryptionKeyListAsync(const DescribeUserEncryptionKeyListRequest& request, const DescribeUserEncryptionKeyListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeUserEncryptionKeyList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HBaseClient::DescribeUserEncryptionKeyListOutcomeCallable HBaseClient::describeUserEncryptionKeyListCallable(const DescribeUserEncryptionKeyListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeUserEncryptionKeyListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeUserEncryptionKeyList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::EnableHBaseueBackupOutcome HBaseClient::enableHBaseueBackup(const EnableHBaseueBackupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -136,7 +136,7 @@ void DescribeInstanceResult::parse(const std::string &payload)
|
||||
if(!value["ResourceGroupId"].isNull())
|
||||
resourceGroupId_ = value["ResourceGroupId"].asString();
|
||||
if(!value["EncryptionType"].isNull())
|
||||
encryptionType_ = value["EncryptionType"].asString() == "true";
|
||||
encryptionType_ = value["EncryptionType"].asString();
|
||||
if(!value["EncryptionKey"].isNull())
|
||||
encryptionKey_ = value["EncryptionKey"].asString();
|
||||
|
||||
@@ -252,7 +252,7 @@ int DescribeInstanceResult::getColdStorageSize()const
|
||||
return coldStorageSize_;
|
||||
}
|
||||
|
||||
bool DescribeInstanceResult::getEncryptionType()const
|
||||
std::string DescribeInstanceResult::getEncryptionType()const
|
||||
{
|
||||
return encryptionType_;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ void DescribeMultiZoneClusterResult::parse(const std::string &payload)
|
||||
if(!value["ResourceGroupId"].isNull())
|
||||
resourceGroupId_ = value["ResourceGroupId"].asString();
|
||||
if(!value["EncryptionType"].isNull())
|
||||
encryptionType_ = value["EncryptionType"].asString() == "true";
|
||||
encryptionType_ = value["EncryptionType"].asString();
|
||||
if(!value["EncryptionKey"].isNull())
|
||||
encryptionKey_ = value["EncryptionKey"].asString();
|
||||
|
||||
@@ -207,7 +207,7 @@ std::string DescribeMultiZoneClusterResult::getStatus()const
|
||||
return status_;
|
||||
}
|
||||
|
||||
bool DescribeMultiZoneClusterResult::getEncryptionType()const
|
||||
std::string DescribeMultiZoneClusterResult::getEncryptionType()const
|
||||
{
|
||||
return encryptionType_;
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* 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/hbase/model/DescribeUserEncryptionKeyListRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::DescribeUserEncryptionKeyListRequest;
|
||||
|
||||
DescribeUserEncryptionKeyListRequest::DescribeUserEncryptionKeyListRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "DescribeUserEncryptionKeyList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeUserEncryptionKeyListRequest::~DescribeUserEncryptionKeyListRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeUserEncryptionKeyListRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeUserEncryptionKeyListRequest::setPageNumber(const std::string& pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", pageNumber);
|
||||
}
|
||||
|
||||
std::string DescribeUserEncryptionKeyListRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeUserEncryptionKeyListRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeUserEncryptionKeyListRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeUserEncryptionKeyListRequest::setPageSize(const std::string& pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", pageSize);
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* 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/hbase/model/DescribeUserEncryptionKeyListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
|
||||
DescribeUserEncryptionKeyListResult::DescribeUserEncryptionKeyListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeUserEncryptionKeyListResult::DescribeUserEncryptionKeyListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeUserEncryptionKeyListResult::~DescribeUserEncryptionKeyListResult()
|
||||
{}
|
||||
|
||||
void DescribeUserEncryptionKeyListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allKmsKeysNode = value["KmsKeys"]["KmsKeysItem"];
|
||||
for (auto valueKmsKeysKmsKeysItem : allKmsKeysNode)
|
||||
{
|
||||
KmsKeysItem kmsKeysObject;
|
||||
if(!valueKmsKeysKmsKeysItem["KeyId"].isNull())
|
||||
kmsKeysObject.keyId = valueKmsKeysKmsKeysItem["KeyId"].asString();
|
||||
kmsKeys_.push_back(kmsKeysObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeUserEncryptionKeyListResult::KmsKeysItem> DescribeUserEncryptionKeyListResult::getKmsKeys()const
|
||||
{
|
||||
return kmsKeys_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user