Deploy for Dypnsapi-intl.

This commit is contained in:
sdk-team
2023-03-14 09:38:45 +00:00
parent a657203073
commit bdeb75c7ee
17 changed files with 1291 additions and 1 deletions

View File

@@ -0,0 +1,161 @@
/*
* 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-intl/Dypnsapi_intlClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Dypnsapi_intl;
using namespace AlibabaCloud::Dypnsapi_intl::Model;
namespace
{
const std::string SERVICE_NAME = "Dypnsapi-intl";
}
Dypnsapi_intlClient::Dypnsapi_intlClient(const Credentials &credentials, const ClientConfiguration &configuration) :
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, "");
}
Dypnsapi_intlClient::Dypnsapi_intlClient(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, "");
}
Dypnsapi_intlClient::Dypnsapi_intlClient(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, "");
}
Dypnsapi_intlClient::~Dypnsapi_intlClient()
{}
Dypnsapi_intlClient::CheckVerificationOutcome Dypnsapi_intlClient::checkVerification(const CheckVerificationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CheckVerificationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CheckVerificationOutcome(CheckVerificationResult(outcome.result()));
else
return CheckVerificationOutcome(outcome.error());
}
void Dypnsapi_intlClient::checkVerificationAsync(const CheckVerificationRequest& request, const CheckVerificationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, checkVerification(request), context);
};
asyncExecute(new Runnable(fn));
}
Dypnsapi_intlClient::CheckVerificationOutcomeCallable Dypnsapi_intlClient::checkVerificationCallable(const CheckVerificationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CheckVerificationOutcome()>>(
[this, request]()
{
return this->checkVerification(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dypnsapi_intlClient::SearchVerificationOutcome Dypnsapi_intlClient::searchVerification(const SearchVerificationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SearchVerificationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SearchVerificationOutcome(SearchVerificationResult(outcome.result()));
else
return SearchVerificationOutcome(outcome.error());
}
void Dypnsapi_intlClient::searchVerificationAsync(const SearchVerificationRequest& request, const SearchVerificationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, searchVerification(request), context);
};
asyncExecute(new Runnable(fn));
}
Dypnsapi_intlClient::SearchVerificationOutcomeCallable Dypnsapi_intlClient::searchVerificationCallable(const SearchVerificationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SearchVerificationOutcome()>>(
[this, request]()
{
return this->searchVerification(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dypnsapi_intlClient::StartVerificationOutcome Dypnsapi_intlClient::startVerification(const StartVerificationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StartVerificationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StartVerificationOutcome(StartVerificationResult(outcome.result()));
else
return StartVerificationOutcome(outcome.error());
}
void Dypnsapi_intlClient::startVerificationAsync(const StartVerificationRequest& request, const StartVerificationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, startVerification(request), context);
};
asyncExecute(new Runnable(fn));
}
Dypnsapi_intlClient::StartVerificationOutcomeCallable Dypnsapi_intlClient::startVerificationCallable(const StartVerificationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StartVerificationOutcome()>>(
[this, request]()
{
return this->startVerification(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,108 @@
/*
* 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-intl/model/CheckVerificationRequest.h>
using AlibabaCloud::Dypnsapi_intl::Model::CheckVerificationRequest;
CheckVerificationRequest::CheckVerificationRequest()
: RpcServiceRequest("dypnsapi-intl", "2017-07-25", "CheckVerification") {
setMethod(HttpRequest::Method::Post);
}
CheckVerificationRequest::~CheckVerificationRequest() {}
long CheckVerificationRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void CheckVerificationRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string CheckVerificationRequest::getCode() const {
return code_;
}
void CheckVerificationRequest::setCode(const std::string &code) {
code_ = code;
setParameter(std::string("Code"), code);
}
std::string CheckVerificationRequest::getServiceSid() const {
return serviceSid_;
}
void CheckVerificationRequest::setServiceSid(const std::string &serviceSid) {
serviceSid_ = serviceSid;
setParameter(std::string("ServiceSid"), serviceSid);
}
std::string CheckVerificationRequest::getAccessKeyId() const {
return accessKeyId_;
}
void CheckVerificationRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string CheckVerificationRequest::getRouteName() const {
return routeName_;
}
void CheckVerificationRequest::setRouteName(const std::string &routeName) {
routeName_ = routeName;
setParameter(std::string("RouteName"), routeName);
}
std::string CheckVerificationRequest::getVerificationId() const {
return verificationId_;
}
void CheckVerificationRequest::setVerificationId(const std::string &verificationId) {
verificationId_ = verificationId;
setParameter(std::string("VerificationId"), verificationId);
}
std::string CheckVerificationRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void CheckVerificationRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
long CheckVerificationRequest::getOwnerId() const {
return ownerId_;
}
void CheckVerificationRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}
std::string CheckVerificationRequest::getTo() const {
return to_;
}
void CheckVerificationRequest::setTo(const std::string &to) {
to_ = to;
setParameter(std::string("To"), to);
}

View File

@@ -0,0 +1,72 @@
/*
* 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-intl/model/CheckVerificationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi_intl;
using namespace AlibabaCloud::Dypnsapi_intl::Model;
CheckVerificationResult::CheckVerificationResult() :
ServiceResult()
{}
CheckVerificationResult::CheckVerificationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CheckVerificationResult::~CheckVerificationResult()
{}
void CheckVerificationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Model"].isNull())
model_ = value["Model"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
}
std::string CheckVerificationResult::getMessage()const
{
return message_;
}
std::string CheckVerificationResult::getModel()const
{
return model_;
}
std::string CheckVerificationResult::getCode()const
{
return code_;
}
std::string CheckVerificationResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,135 @@
/*
* 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-intl/model/SearchVerificationRequest.h>
using AlibabaCloud::Dypnsapi_intl::Model::SearchVerificationRequest;
SearchVerificationRequest::SearchVerificationRequest()
: RpcServiceRequest("dypnsapi-intl", "2017-07-25", "SearchVerification") {
setMethod(HttpRequest::Method::Post);
}
SearchVerificationRequest::~SearchVerificationRequest() {}
long SearchVerificationRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void SearchVerificationRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string SearchVerificationRequest::getCode() const {
return code_;
}
void SearchVerificationRequest::setCode(const std::string &code) {
code_ = code;
setParameter(std::string("Code"), code);
}
std::string SearchVerificationRequest::getServiceSid() const {
return serviceSid_;
}
void SearchVerificationRequest::setServiceSid(const std::string &serviceSid) {
serviceSid_ = serviceSid;
setParameter(std::string("ServiceSid"), serviceSid);
}
std::string SearchVerificationRequest::getAccessKeyId() const {
return accessKeyId_;
}
void SearchVerificationRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
long SearchVerificationRequest::getSendDate() const {
return sendDate_;
}
void SearchVerificationRequest::setSendDate(long sendDate) {
sendDate_ = sendDate;
setParameter(std::string("SendDate"), std::to_string(sendDate));
}
long SearchVerificationRequest::getPageSize() const {
return pageSize_;
}
void SearchVerificationRequest::setPageSize(long pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string SearchVerificationRequest::getRouteName() const {
return routeName_;
}
void SearchVerificationRequest::setRouteName(const std::string &routeName) {
routeName_ = routeName;
setParameter(std::string("RouteName"), routeName);
}
std::string SearchVerificationRequest::getVerificationId() const {
return verificationId_;
}
void SearchVerificationRequest::setVerificationId(const std::string &verificationId) {
verificationId_ = verificationId;
setParameter(std::string("VerificationId"), verificationId);
}
std::string SearchVerificationRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void SearchVerificationRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
long SearchVerificationRequest::getCurrentPage() const {
return currentPage_;
}
void SearchVerificationRequest::setCurrentPage(long currentPage) {
currentPage_ = currentPage;
setParameter(std::string("CurrentPage"), std::to_string(currentPage));
}
long SearchVerificationRequest::getOwnerId() const {
return ownerId_;
}
void SearchVerificationRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}
std::string SearchVerificationRequest::getTo() const {
return to_;
}
void SearchVerificationRequest::setTo(const std::string &to) {
to_ = to;
setParameter(std::string("To"), to);
}

View File

@@ -0,0 +1,72 @@
/*
* 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-intl/model/SearchVerificationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi_intl;
using namespace AlibabaCloud::Dypnsapi_intl::Model;
SearchVerificationResult::SearchVerificationResult() :
ServiceResult()
{}
SearchVerificationResult::SearchVerificationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SearchVerificationResult::~SearchVerificationResult()
{}
void SearchVerificationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Model"].isNull())
model_ = value["Model"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string SearchVerificationResult::getMessage()const
{
return message_;
}
std::string SearchVerificationResult::getModel()const
{
return model_;
}
std::string SearchVerificationResult::getCode()const
{
return code_;
}
bool SearchVerificationResult::getSuccess()const
{
return success_;
}

View 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/dypnsapi-intl/model/StartVerificationRequest.h>
using AlibabaCloud::Dypnsapi_intl::Model::StartVerificationRequest;
StartVerificationRequest::StartVerificationRequest()
: RpcServiceRequest("dypnsapi-intl", "2017-07-25", "StartVerification") {
setMethod(HttpRequest::Method::Post);
}
StartVerificationRequest::~StartVerificationRequest() {}
long StartVerificationRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void StartVerificationRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string StartVerificationRequest::getChannel() const {
return channel_;
}
void StartVerificationRequest::setChannel(const std::string &channel) {
channel_ = channel;
setParameter(std::string("Channel"), channel);
}
std::string StartVerificationRequest::getServiceSid() const {
return serviceSid_;
}
void StartVerificationRequest::setServiceSid(const std::string &serviceSid) {
serviceSid_ = serviceSid;
setParameter(std::string("ServiceSid"), serviceSid);
}
std::string StartVerificationRequest::getAccessKeyId() const {
return accessKeyId_;
}
void StartVerificationRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string StartVerificationRequest::getRouteName() const {
return routeName_;
}
void StartVerificationRequest::setRouteName(const std::string &routeName) {
routeName_ = routeName;
setParameter(std::string("RouteName"), routeName);
}
std::string StartVerificationRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void StartVerificationRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
long StartVerificationRequest::getOwnerId() const {
return ownerId_;
}
void StartVerificationRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}
std::string StartVerificationRequest::getTo() const {
return to_;
}
void StartVerificationRequest::setTo(const std::string &to) {
to_ = to;
setParameter(std::string("To"), to);
}

View File

@@ -0,0 +1,72 @@
/*
* 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-intl/model/StartVerificationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi_intl;
using namespace AlibabaCloud::Dypnsapi_intl::Model;
StartVerificationResult::StartVerificationResult() :
ServiceResult()
{}
StartVerificationResult::StartVerificationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
StartVerificationResult::~StartVerificationResult()
{}
void StartVerificationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Model"].isNull())
model_ = value["Model"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string StartVerificationResult::getMessage()const
{
return message_;
}
std::string StartVerificationResult::getModel()const
{
return model_;
}
std::string StartVerificationResult::getCode()const
{
return code_;
}
bool StartVerificationResult::getSuccess()const
{
return success_;
}