Support deleteCertificate.
This commit is contained in:
@@ -375,6 +375,42 @@ CasClient::DeletePCACertOutcomeCallable CasClient::deletePCACertCallable(const D
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CasClient::DeleteUserCertificateOutcome CasClient::deleteUserCertificate(const DeleteUserCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteUserCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteUserCertificateOutcome(DeleteUserCertificateResult(outcome.result()));
|
||||
else
|
||||
return DeleteUserCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CasClient::deleteUserCertificateAsync(const DeleteUserCertificateRequest& request, const DeleteUserCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteUserCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CasClient::DeleteUserCertificateOutcomeCallable CasClient::deleteUserCertificateCallable(const DeleteUserCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteUserCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteUserCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CasClient::DescribeCertificateStateOutcome CasClient::describeCertificateState(const DescribeCertificateStateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -519,6 +555,42 @@ CasClient::GetCertWarehouseQuotaOutcomeCallable CasClient::getCertWarehouseQuota
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CasClient::GetUserCertificateDetailOutcome CasClient::getUserCertificateDetail(const GetUserCertificateDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetUserCertificateDetailOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetUserCertificateDetailOutcome(GetUserCertificateDetailResult(outcome.result()));
|
||||
else
|
||||
return GetUserCertificateDetailOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CasClient::getUserCertificateDetailAsync(const GetUserCertificateDetailRequest& request, const GetUserCertificateDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getUserCertificateDetail(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CasClient::GetUserCertificateDetailOutcomeCallable CasClient::getUserCertificateDetailCallable(const GetUserCertificateDetailRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetUserCertificateDetailOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getUserCertificateDetail(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CasClient::ListCertOutcome CasClient::listCert(const ListCertRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -771,6 +843,42 @@ CasClient::UploadPCACertOutcomeCallable CasClient::uploadPCACertCallable(const U
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CasClient::UploadUserCertificateOutcome CasClient::uploadUserCertificate(const UploadUserCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UploadUserCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UploadUserCertificateOutcome(UploadUserCertificateResult(outcome.result()));
|
||||
else
|
||||
return UploadUserCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CasClient::uploadUserCertificateAsync(const UploadUserCertificateRequest& request, const UploadUserCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, uploadUserCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CasClient::UploadUserCertificateOutcomeCallable CasClient::uploadUserCertificateCallable(const UploadUserCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UploadUserCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->uploadUserCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CasClient::VerifyOutcome CasClient::verify(const VerifyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
45
cas/src/model/DeleteUserCertificateRequest.cc
Normal file
45
cas/src/model/DeleteUserCertificateRequest.cc
Normal 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/cas/model/DeleteUserCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Cas::Model::DeleteUserCertificateRequest;
|
||||
|
||||
DeleteUserCertificateRequest::DeleteUserCertificateRequest()
|
||||
: RpcServiceRequest("cas", "2020-04-07", "DeleteUserCertificate") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteUserCertificateRequest::~DeleteUserCertificateRequest() {}
|
||||
|
||||
long DeleteUserCertificateRequest::getCertId() const {
|
||||
return certId_;
|
||||
}
|
||||
|
||||
void DeleteUserCertificateRequest::setCertId(long certId) {
|
||||
certId_ = certId;
|
||||
setParameter(std::string("CertId"), std::to_string(certId));
|
||||
}
|
||||
|
||||
std::string DeleteUserCertificateRequest::getSourceIp() const {
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DeleteUserCertificateRequest::setSourceIp(const std::string &sourceIp) {
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter(std::string("SourceIp"), sourceIp);
|
||||
}
|
||||
|
||||
44
cas/src/model/DeleteUserCertificateResult.cc
Normal file
44
cas/src/model/DeleteUserCertificateResult.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/cas/model/DeleteUserCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cas;
|
||||
using namespace AlibabaCloud::Cas::Model;
|
||||
|
||||
DeleteUserCertificateResult::DeleteUserCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteUserCertificateResult::DeleteUserCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteUserCertificateResult::~DeleteUserCertificateResult()
|
||||
{}
|
||||
|
||||
void DeleteUserCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
45
cas/src/model/GetUserCertificateDetailRequest.cc
Normal file
45
cas/src/model/GetUserCertificateDetailRequest.cc
Normal 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/cas/model/GetUserCertificateDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Cas::Model::GetUserCertificateDetailRequest;
|
||||
|
||||
GetUserCertificateDetailRequest::GetUserCertificateDetailRequest()
|
||||
: RpcServiceRequest("cas", "2020-04-07", "GetUserCertificateDetail") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetUserCertificateDetailRequest::~GetUserCertificateDetailRequest() {}
|
||||
|
||||
long GetUserCertificateDetailRequest::getCertId() const {
|
||||
return certId_;
|
||||
}
|
||||
|
||||
void GetUserCertificateDetailRequest::setCertId(long certId) {
|
||||
certId_ = certId;
|
||||
setParameter(std::string("CertId"), std::to_string(certId));
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailRequest::getSourceIp() const {
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void GetUserCertificateDetailRequest::setSourceIp(const std::string &sourceIp) {
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter(std::string("SourceIp"), sourceIp);
|
||||
}
|
||||
|
||||
156
cas/src/model/GetUserCertificateDetailResult.cc
Normal file
156
cas/src/model/GetUserCertificateDetailResult.cc
Normal file
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
* 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/cas/model/GetUserCertificateDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cas;
|
||||
using namespace AlibabaCloud::Cas::Model;
|
||||
|
||||
GetUserCertificateDetailResult::GetUserCertificateDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetUserCertificateDetailResult::GetUserCertificateDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetUserCertificateDetailResult::~GetUserCertificateDetailResult()
|
||||
{}
|
||||
|
||||
void GetUserCertificateDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Cert"].isNull())
|
||||
cert_ = value["Cert"].asString();
|
||||
if(!value["Key"].isNull())
|
||||
key_ = value["Key"].asString();
|
||||
if(!value["Id"].isNull())
|
||||
id_ = std::stol(value["Id"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["Common"].isNull())
|
||||
common_ = value["Common"].asString();
|
||||
if(!value["Fingerprint"].isNull())
|
||||
fingerprint_ = value["Fingerprint"].asString();
|
||||
if(!value["Issuer"].isNull())
|
||||
issuer_ = value["Issuer"].asString();
|
||||
if(!value["OrgName"].isNull())
|
||||
orgName_ = value["OrgName"].asString();
|
||||
if(!value["Province"].isNull())
|
||||
province_ = value["Province"].asString();
|
||||
if(!value["City"].isNull())
|
||||
city_ = value["City"].asString();
|
||||
if(!value["Country"].isNull())
|
||||
country_ = value["Country"].asString();
|
||||
if(!value["StartDate"].isNull())
|
||||
startDate_ = value["StartDate"].asString();
|
||||
if(!value["EndDate"].isNull())
|
||||
endDate_ = value["EndDate"].asString();
|
||||
if(!value["Sans"].isNull())
|
||||
sans_ = value["Sans"].asString();
|
||||
if(!value["Expired"].isNull())
|
||||
expired_ = value["Expired"].asString() == "true";
|
||||
if(!value["BuyInAliyun"].isNull())
|
||||
buyInAliyun_ = value["BuyInAliyun"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getFingerprint()const
|
||||
{
|
||||
return fingerprint_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getIssuer()const
|
||||
{
|
||||
return issuer_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getOrgName()const
|
||||
{
|
||||
return orgName_;
|
||||
}
|
||||
|
||||
bool GetUserCertificateDetailResult::getExpired()const
|
||||
{
|
||||
return expired_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getCity()const
|
||||
{
|
||||
return city_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getEndDate()const
|
||||
{
|
||||
return endDate_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getProvince()const
|
||||
{
|
||||
return province_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getCommon()const
|
||||
{
|
||||
return common_;
|
||||
}
|
||||
|
||||
bool GetUserCertificateDetailResult::getBuyInAliyun()const
|
||||
{
|
||||
return buyInAliyun_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getStartDate()const
|
||||
{
|
||||
return startDate_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getSans()const
|
||||
{
|
||||
return sans_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getCountry()const
|
||||
{
|
||||
return country_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getCert()const
|
||||
{
|
||||
return cert_;
|
||||
}
|
||||
|
||||
long GetUserCertificateDetailResult::getId()const
|
||||
{
|
||||
return id_;
|
||||
}
|
||||
|
||||
std::string GetUserCertificateDetailResult::getKey()const
|
||||
{
|
||||
return key_;
|
||||
}
|
||||
|
||||
99
cas/src/model/UploadUserCertificateRequest.cc
Normal file
99
cas/src/model/UploadUserCertificateRequest.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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/cas/model/UploadUserCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Cas::Model::UploadUserCertificateRequest;
|
||||
|
||||
UploadUserCertificateRequest::UploadUserCertificateRequest()
|
||||
: RpcServiceRequest("cas", "2020-04-07", "UploadUserCertificate") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UploadUserCertificateRequest::~UploadUserCertificateRequest() {}
|
||||
|
||||
std::string UploadUserCertificateRequest::getEncryptCert() const {
|
||||
return encryptCert_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setEncryptCert(const std::string &encryptCert) {
|
||||
encryptCert_ = encryptCert;
|
||||
setParameter(std::string("EncryptCert"), encryptCert);
|
||||
}
|
||||
|
||||
std::string UploadUserCertificateRequest::getCert() const {
|
||||
return cert_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setCert(const std::string &cert) {
|
||||
cert_ = cert;
|
||||
setParameter(std::string("Cert"), cert);
|
||||
}
|
||||
|
||||
std::string UploadUserCertificateRequest::getSourceIp() const {
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setSourceIp(const std::string &sourceIp) {
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter(std::string("SourceIp"), sourceIp);
|
||||
}
|
||||
|
||||
std::string UploadUserCertificateRequest::getKey() const {
|
||||
return key_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setKey(const std::string &key) {
|
||||
key_ = key;
|
||||
setParameter(std::string("Key"), key);
|
||||
}
|
||||
|
||||
std::string UploadUserCertificateRequest::getEncryptPrivateKey() const {
|
||||
return encryptPrivateKey_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setEncryptPrivateKey(const std::string &encryptPrivateKey) {
|
||||
encryptPrivateKey_ = encryptPrivateKey;
|
||||
setParameter(std::string("EncryptPrivateKey"), encryptPrivateKey);
|
||||
}
|
||||
|
||||
std::string UploadUserCertificateRequest::getSignPrivateKey() const {
|
||||
return signPrivateKey_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setSignPrivateKey(const std::string &signPrivateKey) {
|
||||
signPrivateKey_ = signPrivateKey;
|
||||
setParameter(std::string("SignPrivateKey"), signPrivateKey);
|
||||
}
|
||||
|
||||
std::string UploadUserCertificateRequest::getSignCert() const {
|
||||
return signCert_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setSignCert(const std::string &signCert) {
|
||||
signCert_ = signCert;
|
||||
setParameter(std::string("SignCert"), signCert);
|
||||
}
|
||||
|
||||
std::string UploadUserCertificateRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void UploadUserCertificateRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
51
cas/src/model/UploadUserCertificateResult.cc
Normal file
51
cas/src/model/UploadUserCertificateResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/cas/model/UploadUserCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cas;
|
||||
using namespace AlibabaCloud::Cas::Model;
|
||||
|
||||
UploadUserCertificateResult::UploadUserCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UploadUserCertificateResult::UploadUserCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UploadUserCertificateResult::~UploadUserCertificateResult()
|
||||
{}
|
||||
|
||||
void UploadUserCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CertId"].isNull())
|
||||
certId_ = std::stol(value["CertId"].asString());
|
||||
|
||||
}
|
||||
|
||||
long UploadUserCertificateResult::getCertId()const
|
||||
{
|
||||
return certId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user