Support New API for Dypnsapi.

This commit is contained in:
sdk-team
2022-01-07 04:05:57 +00:00
parent 282e67d80b
commit a4d37e4317
31 changed files with 2119 additions and 168 deletions

View File

@@ -31,21 +31,21 @@ DypnsapiClient::DypnsapiClient(const Credentials &credentials, const ClientConfi
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dypns");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
DypnsapiClient::DypnsapiClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dypns");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
DypnsapiClient::DypnsapiClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dypns");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
DypnsapiClient::~DypnsapiClient()
@@ -195,6 +195,78 @@ DypnsapiClient::GetAuthTokenOutcomeCallable DypnsapiClient::getAuthTokenCallable
return task->get_future();
}
DypnsapiClient::GetAuthorizationUrlOutcome DypnsapiClient::getAuthorizationUrl(const GetAuthorizationUrlRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetAuthorizationUrlOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetAuthorizationUrlOutcome(GetAuthorizationUrlResult(outcome.result()));
else
return GetAuthorizationUrlOutcome(outcome.error());
}
void DypnsapiClient::getAuthorizationUrlAsync(const GetAuthorizationUrlRequest& request, const GetAuthorizationUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getAuthorizationUrl(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::GetAuthorizationUrlOutcomeCallable DypnsapiClient::getAuthorizationUrlCallable(const GetAuthorizationUrlRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetAuthorizationUrlOutcome()>>(
[this, request]()
{
return this->getAuthorizationUrl(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DypnsapiClient::GetCertifyResultOutcome DypnsapiClient::getCertifyResult(const GetCertifyResultRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetCertifyResultOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetCertifyResultOutcome(GetCertifyResultResult(outcome.result()));
else
return GetCertifyResultOutcome(outcome.error());
}
void DypnsapiClient::getCertifyResultAsync(const GetCertifyResultRequest& request, const GetCertifyResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getCertifyResult(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::GetCertifyResultOutcomeCallable DypnsapiClient::getCertifyResultCallable(const GetCertifyResultRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetCertifyResultOutcome()>>(
[this, request]()
{
return this->getCertifyResult(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DypnsapiClient::GetMobileOutcome DypnsapiClient::getMobile(const GetMobileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -231,36 +303,108 @@ DypnsapiClient::GetMobileOutcomeCallable DypnsapiClient::getMobileCallable(const
return task->get_future();
}
DypnsapiClient::TwiceTelVerifyOutcome DypnsapiClient::twiceTelVerify(const TwiceTelVerifyRequest &request) const
DypnsapiClient::GetSmsAuthTokensOutcome DypnsapiClient::getSmsAuthTokens(const GetSmsAuthTokensRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return TwiceTelVerifyOutcome(endpointOutcome.error());
return GetSmsAuthTokensOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return TwiceTelVerifyOutcome(TwiceTelVerifyResult(outcome.result()));
return GetSmsAuthTokensOutcome(GetSmsAuthTokensResult(outcome.result()));
else
return TwiceTelVerifyOutcome(outcome.error());
return GetSmsAuthTokensOutcome(outcome.error());
}
void DypnsapiClient::twiceTelVerifyAsync(const TwiceTelVerifyRequest& request, const TwiceTelVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
void DypnsapiClient::getSmsAuthTokensAsync(const GetSmsAuthTokensRequest& request, const GetSmsAuthTokensAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, twiceTelVerify(request), context);
handler(this, request, getSmsAuthTokens(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::TwiceTelVerifyOutcomeCallable DypnsapiClient::twiceTelVerifyCallable(const TwiceTelVerifyRequest &request) const
DypnsapiClient::GetSmsAuthTokensOutcomeCallable DypnsapiClient::getSmsAuthTokensCallable(const GetSmsAuthTokensRequest &request) const
{
auto task = std::make_shared<std::packaged_task<TwiceTelVerifyOutcome()>>(
auto task = std::make_shared<std::packaged_task<GetSmsAuthTokensOutcome()>>(
[this, request]()
{
return this->twiceTelVerify(request);
return this->getSmsAuthTokens(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DypnsapiClient::QueryGateVerifyBillingPublicOutcome DypnsapiClient::queryGateVerifyBillingPublic(const QueryGateVerifyBillingPublicRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryGateVerifyBillingPublicOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryGateVerifyBillingPublicOutcome(QueryGateVerifyBillingPublicResult(outcome.result()));
else
return QueryGateVerifyBillingPublicOutcome(outcome.error());
}
void DypnsapiClient::queryGateVerifyBillingPublicAsync(const QueryGateVerifyBillingPublicRequest& request, const QueryGateVerifyBillingPublicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryGateVerifyBillingPublic(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::QueryGateVerifyBillingPublicOutcomeCallable DypnsapiClient::queryGateVerifyBillingPublicCallable(const QueryGateVerifyBillingPublicRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryGateVerifyBillingPublicOutcome()>>(
[this, request]()
{
return this->queryGateVerifyBillingPublic(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DypnsapiClient::QueryGateVerifyStatisticPublicOutcome DypnsapiClient::queryGateVerifyStatisticPublic(const QueryGateVerifyStatisticPublicRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryGateVerifyStatisticPublicOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryGateVerifyStatisticPublicOutcome(QueryGateVerifyStatisticPublicResult(outcome.result()));
else
return QueryGateVerifyStatisticPublicOutcome(outcome.error());
}
void DypnsapiClient::queryGateVerifyStatisticPublicAsync(const QueryGateVerifyStatisticPublicRequest& request, const QueryGateVerifyStatisticPublicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryGateVerifyStatisticPublic(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::QueryGateVerifyStatisticPublicOutcomeCallable DypnsapiClient::queryGateVerifyStatisticPublicCallable(const QueryGateVerifyStatisticPublicRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryGateVerifyStatisticPublicOutcome()>>(
[this, request]()
{
return this->queryGateVerifyStatisticPublic(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
@@ -339,3 +483,39 @@ DypnsapiClient::VerifyPhoneWithTokenOutcomeCallable DypnsapiClient::verifyPhoneW
return task->get_future();
}
DypnsapiClient::VerifySmsCodeOutcome DypnsapiClient::verifySmsCode(const VerifySmsCodeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return VerifySmsCodeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return VerifySmsCodeOutcome(VerifySmsCodeResult(outcome.result()));
else
return VerifySmsCodeOutcome(outcome.error());
}
void DypnsapiClient::verifySmsCodeAsync(const VerifySmsCodeRequest& request, const VerifySmsCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, verifySmsCode(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::VerifySmsCodeOutcomeCallable DypnsapiClient::verifySmsCodeCallable(const VerifySmsCodeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<VerifySmsCodeOutcome()>>(
[this, request]()
{
return this->verifySmsCode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,106 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/dypnsapi/model/GetAuthorizationUrlRequest.h>
using AlibabaCloud::Dypnsapi::Model::GetAuthorizationUrlRequest;
GetAuthorizationUrlRequest::GetAuthorizationUrlRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "GetAuthorizationUrl")
{
setMethod(HttpRequest::Method::Post);
}
GetAuthorizationUrlRequest::~GetAuthorizationUrlRequest()
{}
long GetAuthorizationUrlRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetAuthorizationUrlRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetAuthorizationUrlRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetAuthorizationUrlRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetAuthorizationUrlRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void GetAuthorizationUrlRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
long GetAuthorizationUrlRequest::getSchemeId()const
{
return schemeId_;
}
void GetAuthorizationUrlRequest::setSchemeId(long schemeId)
{
schemeId_ = schemeId;
setParameter("SchemeId", std::to_string(schemeId));
}
long GetAuthorizationUrlRequest::getOwnerId()const
{
return ownerId_;
}
void GetAuthorizationUrlRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string GetAuthorizationUrlRequest::getPhoneNo()const
{
return phoneNo_;
}
void GetAuthorizationUrlRequest::setPhoneNo(const std::string& phoneNo)
{
phoneNo_ = phoneNo;
setParameter("PhoneNo", phoneNo);
}
std::string GetAuthorizationUrlRequest::getEndDate()const
{
return endDate_;
}
void GetAuthorizationUrlRequest::setEndDate(const std::string& endDate)
{
endDate_ = endDate;
setParameter("EndDate", endDate);
}

View File

@@ -14,36 +14,34 @@
* limitations under the License.
*/
#include <alibabacloud/dypnsapi/model/TwiceTelVerifyResult.h>
#include <alibabacloud/dypnsapi/model/GetAuthorizationUrlResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
TwiceTelVerifyResult::TwiceTelVerifyResult() :
GetAuthorizationUrlResult::GetAuthorizationUrlResult() :
ServiceResult()
{}
TwiceTelVerifyResult::TwiceTelVerifyResult(const std::string &payload) :
GetAuthorizationUrlResult::GetAuthorizationUrlResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
TwiceTelVerifyResult::~TwiceTelVerifyResult()
GetAuthorizationUrlResult::~GetAuthorizationUrlResult()
{}
void TwiceTelVerifyResult::parse(const std::string &payload)
void GetAuthorizationUrlResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto twiceTelVerifyResultNode = value["TwiceTelVerifyResult"];
if(!twiceTelVerifyResultNode["Carrier"].isNull())
result_.carrier = twiceTelVerifyResultNode["Carrier"].asString();
if(!twiceTelVerifyResultNode["VerifyResult"].isNull())
result_.verifyResult = std::stoi(twiceTelVerifyResultNode["VerifyResult"].asString());
auto dataNode = value["Data"];
if(!dataNode["AuthorizationUrl"].isNull())
data_.authorizationUrl = dataNode["AuthorizationUrl"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
@@ -51,17 +49,17 @@ void TwiceTelVerifyResult::parse(const std::string &payload)
}
std::string TwiceTelVerifyResult::getMessage()const
std::string GetAuthorizationUrlResult::getMessage()const
{
return message_;
}
TwiceTelVerifyResult::Result TwiceTelVerifyResult::getTwiceTelVerifyResult()const
GetAuthorizationUrlResult::Data GetAuthorizationUrlResult::getData()const
{
return twiceTelVerifyResult_;
return data_;
}
std::string TwiceTelVerifyResult::getCode()const
std::string GetAuthorizationUrlResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/dypnsapi/model/GetCertifyResultRequest.h>
using AlibabaCloud::Dypnsapi::Model::GetCertifyResultRequest;
GetCertifyResultRequest::GetCertifyResultRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "GetCertifyResult")
{
setMethod(HttpRequest::Method::Post);
}
GetCertifyResultRequest::~GetCertifyResultRequest()
{}
long GetCertifyResultRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetCertifyResultRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetCertifyResultRequest::getProductCode()const
{
return productCode_;
}
void GetCertifyResultRequest::setProductCode(const std::string& productCode)
{
productCode_ = productCode;
setParameter("ProductCode", productCode);
}
std::string GetCertifyResultRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetCertifyResultRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetCertifyResultRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void GetCertifyResultRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
long GetCertifyResultRequest::getOwnerId()const
{
return ownerId_;
}
void GetCertifyResultRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string GetCertifyResultRequest::getToken()const
{
return token_;
}
void GetCertifyResultRequest::setToken(const std::string& token)
{
token_ = token;
setParameter("Token", token);
}

View File

@@ -0,0 +1,79 @@
/*
* 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/dypnsapi/model/GetCertifyResultResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
GetCertifyResultResult::GetCertifyResultResult() :
ServiceResult()
{}
GetCertifyResultResult::GetCertifyResultResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetCertifyResultResult::~GetCertifyResultResult()
{}
void GetCertifyResultResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
DataItem dataObject;
if(!valueDataDataItem["MaterialInfo"].isNull())
dataObject.materialInfo = valueDataDataItem["MaterialInfo"].asString();
if(!valueDataDataItem["IdentityInfo"].isNull())
dataObject.identityInfo = valueDataDataItem["IdentityInfo"].asString();
if(!valueDataDataItem["VerifyDesc"].isNull())
dataObject.verifyDesc = valueDataDataItem["VerifyDesc"].asString();
if(!valueDataDataItem["VerifyResult"].isNull())
dataObject.verifyResult = valueDataDataItem["VerifyResult"].asString();
if(!valueDataDataItem["DeviceToken"].isNull())
dataObject.deviceToken = valueDataDataItem["DeviceToken"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetCertifyResultResult::getMessage()const
{
return message_;
}
std::vector<GetCertifyResultResult::DataItem> GetCertifyResultResult::getData()const
{
return data_;
}
std::string GetCertifyResultResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,172 @@
/*
* 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/dypnsapi/model/GetSmsAuthTokensRequest.h>
using AlibabaCloud::Dypnsapi::Model::GetSmsAuthTokensRequest;
GetSmsAuthTokensRequest::GetSmsAuthTokensRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "GetSmsAuthTokens")
{
setMethod(HttpRequest::Method::Post);
}
GetSmsAuthTokensRequest::~GetSmsAuthTokensRequest()
{}
long GetSmsAuthTokensRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetSmsAuthTokensRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetSmsAuthTokensRequest::getProductCode()const
{
return productCode_;
}
void GetSmsAuthTokensRequest::setProductCode(const std::string& productCode)
{
productCode_ = productCode;
setParameter("ProductCode", productCode);
}
std::string GetSmsAuthTokensRequest::getBundleId()const
{
return bundleId_;
}
void GetSmsAuthTokensRequest::setBundleId(const std::string& bundleId)
{
bundleId_ = bundleId;
setParameter("BundleId", bundleId);
}
std::string GetSmsAuthTokensRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetSmsAuthTokensRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetSmsAuthTokensRequest::getSignName()const
{
return signName_;
}
void GetSmsAuthTokensRequest::setSignName(const std::string& signName)
{
signName_ = signName;
setParameter("SignName", signName);
}
std::string GetSmsAuthTokensRequest::getSceneCode()const
{
return sceneCode_;
}
void GetSmsAuthTokensRequest::setSceneCode(const std::string& sceneCode)
{
sceneCode_ = sceneCode;
setParameter("SceneCode", sceneCode);
}
std::string GetSmsAuthTokensRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void GetSmsAuthTokensRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
int GetSmsAuthTokensRequest::getSmsCodeExpire()const
{
return smsCodeExpire_;
}
void GetSmsAuthTokensRequest::setSmsCodeExpire(int smsCodeExpire)
{
smsCodeExpire_ = smsCodeExpire;
setParameter("SmsCodeExpire", std::to_string(smsCodeExpire));
}
std::string GetSmsAuthTokensRequest::getPackageName()const
{
return packageName_;
}
void GetSmsAuthTokensRequest::setPackageName(const std::string& packageName)
{
packageName_ = packageName;
setParameter("PackageName", packageName);
}
std::string GetSmsAuthTokensRequest::getOsType()const
{
return osType_;
}
void GetSmsAuthTokensRequest::setOsType(const std::string& osType)
{
osType_ = osType;
setParameter("OsType", osType);
}
long GetSmsAuthTokensRequest::getOwnerId()const
{
return ownerId_;
}
void GetSmsAuthTokensRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string GetSmsAuthTokensRequest::getSmsTemplateCode()const
{
return smsTemplateCode_;
}
void GetSmsAuthTokensRequest::setSmsTemplateCode(const std::string& smsTemplateCode)
{
smsTemplateCode_ = smsTemplateCode;
setParameter("SmsTemplateCode", smsTemplateCode);
}
long GetSmsAuthTokensRequest::getExpire()const
{
return expire_;
}
void GetSmsAuthTokensRequest::setExpire(long expire)
{
expire_ = expire;
setParameter("Expire", std::to_string(expire));
}

View File

@@ -0,0 +1,74 @@
/*
* 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/dypnsapi/model/GetSmsAuthTokensResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
GetSmsAuthTokensResult::GetSmsAuthTokensResult() :
ServiceResult()
{}
GetSmsAuthTokensResult::GetSmsAuthTokensResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetSmsAuthTokensResult::~GetSmsAuthTokensResult()
{}
void GetSmsAuthTokensResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["BizToken"].isNull())
data_.bizToken = dataNode["BizToken"].asString();
if(!dataNode["StsAccessKeySecret"].isNull())
data_.stsAccessKeySecret = dataNode["StsAccessKeySecret"].asString();
if(!dataNode["StsAccessKeyId"].isNull())
data_.stsAccessKeyId = dataNode["StsAccessKeyId"].asString();
if(!dataNode["ExpireTime"].isNull())
data_.expireTime = std::stol(dataNode["ExpireTime"].asString());
if(!dataNode["StsToken"].isNull())
data_.stsToken = dataNode["StsToken"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetSmsAuthTokensResult::getMessage()const
{
return message_;
}
GetSmsAuthTokensResult::Data GetSmsAuthTokensResult::getData()const
{
return data_;
}
std::string GetSmsAuthTokensResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,106 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/dypnsapi/model/QueryGateVerifyBillingPublicRequest.h>
using AlibabaCloud::Dypnsapi::Model::QueryGateVerifyBillingPublicRequest;
QueryGateVerifyBillingPublicRequest::QueryGateVerifyBillingPublicRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "QueryGateVerifyBillingPublic")
{
setMethod(HttpRequest::Method::Post);
}
QueryGateVerifyBillingPublicRequest::~QueryGateVerifyBillingPublicRequest()
{}
long QueryGateVerifyBillingPublicRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void QueryGateVerifyBillingPublicRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int QueryGateVerifyBillingPublicRequest::getAuthenticationType()const
{
return authenticationType_;
}
void QueryGateVerifyBillingPublicRequest::setAuthenticationType(int authenticationType)
{
authenticationType_ = authenticationType;
setParameter("AuthenticationType", std::to_string(authenticationType));
}
std::string QueryGateVerifyBillingPublicRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryGateVerifyBillingPublicRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string QueryGateVerifyBillingPublicRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void QueryGateVerifyBillingPublicRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string QueryGateVerifyBillingPublicRequest::getProdCode()const
{
return prodCode_;
}
void QueryGateVerifyBillingPublicRequest::setProdCode(const std::string& prodCode)
{
prodCode_ = prodCode;
setParameter("ProdCode", prodCode);
}
long QueryGateVerifyBillingPublicRequest::getOwnerId()const
{
return ownerId_;
}
void QueryGateVerifyBillingPublicRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string QueryGateVerifyBillingPublicRequest::getMonth()const
{
return month_;
}
void QueryGateVerifyBillingPublicRequest::setMonth(const std::string& month)
{
month_ = month;
setParameter("Month", month);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/dypnsapi/model/QueryGateVerifyBillingPublicResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
QueryGateVerifyBillingPublicResult::QueryGateVerifyBillingPublicResult() :
ServiceResult()
{}
QueryGateVerifyBillingPublicResult::QueryGateVerifyBillingPublicResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryGateVerifyBillingPublicResult::~QueryGateVerifyBillingPublicResult()
{}
void QueryGateVerifyBillingPublicResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["AmountSum"].isNull())
data_.amountSum = dataNode["AmountSum"].asString();
auto allSceneBillingListNode = dataNode["SceneBillingList"]["SceneBillingListItem"];
for (auto dataNodeSceneBillingListSceneBillingListItem : allSceneBillingListNode)
{
Data::SceneBillingListItem sceneBillingListItemObject;
if(!dataNodeSceneBillingListSceneBillingListItem["Add"].isNull())
sceneBillingListItemObject.add = dataNodeSceneBillingListSceneBillingListItem["Add"].asString();
if(!dataNodeSceneBillingListSceneBillingListItem["SinglePrice"].isNull())
sceneBillingListItemObject.singlePrice = dataNodeSceneBillingListSceneBillingListItem["SinglePrice"].asString();
if(!dataNodeSceneBillingListSceneBillingListItem["Amount"].isNull())
sceneBillingListItemObject.amount = dataNodeSceneBillingListSceneBillingListItem["Amount"].asString();
if(!dataNodeSceneBillingListSceneBillingListItem["ItemName"].isNull())
sceneBillingListItemObject.itemName = dataNodeSceneBillingListSceneBillingListItem["ItemName"].asString();
if(!dataNodeSceneBillingListSceneBillingListItem["SceneCode"].isNull())
sceneBillingListItemObject.sceneCode = dataNodeSceneBillingListSceneBillingListItem["SceneCode"].asString();
if(!dataNodeSceneBillingListSceneBillingListItem["AppName"].isNull())
sceneBillingListItemObject.appName = dataNodeSceneBillingListSceneBillingListItem["AppName"].asString();
if(!dataNodeSceneBillingListSceneBillingListItem["SceneName"].isNull())
sceneBillingListItemObject.sceneName = dataNodeSceneBillingListSceneBillingListItem["SceneName"].asString();
data_.sceneBillingList.push_back(sceneBillingListItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string QueryGateVerifyBillingPublicResult::getMessage()const
{
return message_;
}
QueryGateVerifyBillingPublicResult::Data QueryGateVerifyBillingPublicResult::getData()const
{
return data_;
}
std::string QueryGateVerifyBillingPublicResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,139 @@
/*
* 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/dypnsapi/model/QueryGateVerifyStatisticPublicRequest.h>
using AlibabaCloud::Dypnsapi::Model::QueryGateVerifyStatisticPublicRequest;
QueryGateVerifyStatisticPublicRequest::QueryGateVerifyStatisticPublicRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "QueryGateVerifyStatisticPublic")
{
setMethod(HttpRequest::Method::Post);
}
QueryGateVerifyStatisticPublicRequest::~QueryGateVerifyStatisticPublicRequest()
{}
long QueryGateVerifyStatisticPublicRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void QueryGateVerifyStatisticPublicRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int QueryGateVerifyStatisticPublicRequest::getAuthenticationType()const
{
return authenticationType_;
}
void QueryGateVerifyStatisticPublicRequest::setAuthenticationType(int authenticationType)
{
authenticationType_ = authenticationType;
setParameter("AuthenticationType", std::to_string(authenticationType));
}
std::string QueryGateVerifyStatisticPublicRequest::getStartDate()const
{
return startDate_;
}
void QueryGateVerifyStatisticPublicRequest::setStartDate(const std::string& startDate)
{
startDate_ = startDate;
setParameter("StartDate", startDate);
}
std::string QueryGateVerifyStatisticPublicRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryGateVerifyStatisticPublicRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string QueryGateVerifyStatisticPublicRequest::getSceneCode()const
{
return sceneCode_;
}
void QueryGateVerifyStatisticPublicRequest::setSceneCode(const std::string& sceneCode)
{
sceneCode_ = sceneCode;
setParameter("SceneCode", sceneCode);
}
std::string QueryGateVerifyStatisticPublicRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void QueryGateVerifyStatisticPublicRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string QueryGateVerifyStatisticPublicRequest::getProdCode()const
{
return prodCode_;
}
void QueryGateVerifyStatisticPublicRequest::setProdCode(const std::string& prodCode)
{
prodCode_ = prodCode;
setParameter("ProdCode", prodCode);
}
std::string QueryGateVerifyStatisticPublicRequest::getOsType()const
{
return osType_;
}
void QueryGateVerifyStatisticPublicRequest::setOsType(const std::string& osType)
{
osType_ = osType;
setParameter("OsType", osType);
}
long QueryGateVerifyStatisticPublicRequest::getOwnerId()const
{
return ownerId_;
}
void QueryGateVerifyStatisticPublicRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string QueryGateVerifyStatisticPublicRequest::getEndDate()const
{
return endDate_;
}
void QueryGateVerifyStatisticPublicRequest::setEndDate(const std::string& endDate)
{
endDate_ = endDate;
setParameter("EndDate", endDate);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/dypnsapi/model/QueryGateVerifyStatisticPublicResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
QueryGateVerifyStatisticPublicResult::QueryGateVerifyStatisticPublicResult() :
ServiceResult()
{}
QueryGateVerifyStatisticPublicResult::QueryGateVerifyStatisticPublicResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryGateVerifyStatisticPublicResult::~QueryGateVerifyStatisticPublicResult()
{}
void QueryGateVerifyStatisticPublicResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TotalFail"].isNull())
data_.totalFail = std::stol(dataNode["TotalFail"].asString());
if(!dataNode["Total"].isNull())
data_.total = std::stol(dataNode["Total"].asString());
if(!dataNode["TotalSuccess"].isNull())
data_.totalSuccess = std::stol(dataNode["TotalSuccess"].asString());
if(!dataNode["TotalUnknown"].isNull())
data_.totalUnknown = std::stol(dataNode["TotalUnknown"].asString());
auto allDayStatisticNode = dataNode["DayStatistic"]["DayStatisticItem"];
for (auto dataNodeDayStatisticDayStatisticItem : allDayStatisticNode)
{
Data::DayStatisticItem dayStatisticItemObject;
if(!dataNodeDayStatisticDayStatisticItem["StatisticDateStr"].isNull())
dayStatisticItemObject.statisticDateStr = dataNodeDayStatisticDayStatisticItem["StatisticDateStr"].asString();
if(!dataNodeDayStatisticDayStatisticItem["TotalSuccess"].isNull())
dayStatisticItemObject.totalSuccess = std::stol(dataNodeDayStatisticDayStatisticItem["TotalSuccess"].asString());
if(!dataNodeDayStatisticDayStatisticItem["TotalFail"].isNull())
dayStatisticItemObject.totalFail = std::stol(dataNodeDayStatisticDayStatisticItem["TotalFail"].asString());
if(!dataNodeDayStatisticDayStatisticItem["TotalUnknown"].isNull())
dayStatisticItemObject.totalUnknown = std::stol(dataNodeDayStatisticDayStatisticItem["TotalUnknown"].asString());
data_.dayStatistic.push_back(dayStatisticItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string QueryGateVerifyStatisticPublicResult::getMessage()const
{
return message_;
}
QueryGateVerifyStatisticPublicResult::Data QueryGateVerifyStatisticPublicResult::getData()const
{
return data_;
}
std::string QueryGateVerifyStatisticPublicResult::getCode()const
{
return code_;
}

View File

@@ -1,95 +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/dypnsapi/model/TwiceTelVerifyRequest.h>
using AlibabaCloud::Dypnsapi::Model::TwiceTelVerifyRequest;
TwiceTelVerifyRequest::TwiceTelVerifyRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "TwiceTelVerify")
{
setMethod(HttpRequest::Method::Post);
}
TwiceTelVerifyRequest::~TwiceTelVerifyRequest()
{}
long TwiceTelVerifyRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void TwiceTelVerifyRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string TwiceTelVerifyRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void TwiceTelVerifyRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string TwiceTelVerifyRequest::getPhoneNumber()const
{
return phoneNumber_;
}
void TwiceTelVerifyRequest::setPhoneNumber(const std::string& phoneNumber)
{
phoneNumber_ = phoneNumber;
setParameter("PhoneNumber", phoneNumber);
}
long TwiceTelVerifyRequest::getOwnerId()const
{
return ownerId_;
}
void TwiceTelVerifyRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string TwiceTelVerifyRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void TwiceTelVerifyRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string TwiceTelVerifyRequest::getSince()const
{
return since_;
}
void TwiceTelVerifyRequest::setSince(const std::string& since)
{
since_ = since;
setParameter("Since", since);
}

View File

@@ -40,10 +40,10 @@ void VerifyPhoneWithTokenResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto gateVerifyNode = value["GateVerify"];
if(!gateVerifyNode["VerifyId"].isNull())
gateVerify_.verifyId = gateVerifyNode["VerifyId"].asString();
if(!gateVerifyNode["VerifyResult"].isNull())
gateVerify_.verifyResult = gateVerifyNode["VerifyResult"].asString();
if(!gateVerifyNode["VerifyId"].isNull())
gateVerify_.verifyId = gateVerifyNode["VerifyId"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())

View File

@@ -0,0 +1,117 @@
/*
* 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/dypnsapi/model/VerifySmsCodeRequest.h>
using AlibabaCloud::Dypnsapi::Model::VerifySmsCodeRequest;
VerifySmsCodeRequest::VerifySmsCodeRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "VerifySmsCode")
{
setMethod(HttpRequest::Method::Post);
}
VerifySmsCodeRequest::~VerifySmsCodeRequest()
{}
long VerifySmsCodeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void VerifySmsCodeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string VerifySmsCodeRequest::getProductCode()const
{
return productCode_;
}
void VerifySmsCodeRequest::setProductCode(const std::string& productCode)
{
productCode_ = productCode;
setParameter("ProductCode", productCode);
}
std::string VerifySmsCodeRequest::getSmsToken()const
{
return smsToken_;
}
void VerifySmsCodeRequest::setSmsToken(const std::string& smsToken)
{
smsToken_ = smsToken;
setParameter("SmsToken", smsToken);
}
std::string VerifySmsCodeRequest::getPhoneNumber()const
{
return phoneNumber_;
}
void VerifySmsCodeRequest::setPhoneNumber(const std::string& phoneNumber)
{
phoneNumber_ = phoneNumber;
setParameter("PhoneNumber", phoneNumber);
}
std::string VerifySmsCodeRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void VerifySmsCodeRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string VerifySmsCodeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void VerifySmsCodeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
long VerifySmsCodeRequest::getOwnerId()const
{
return ownerId_;
}
void VerifySmsCodeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string VerifySmsCodeRequest::getSmsCode()const
{
return smsCode_;
}
void VerifySmsCodeRequest::setSmsCode(const std::string& smsCode)
{
smsCode_ = smsCode;
setParameter("SmsCode", smsCode);
}

View File

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