Supported for setEndpoint method.

This commit is contained in:
sdk-team
2019-09-05 16:44:55 +08:00
parent 04cde44618
commit 44bbd797e7
22 changed files with 1171 additions and 799 deletions

View File

@@ -0,0 +1,197 @@
/*
* 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/DypnsapiClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
namespace
{
const std::string SERVICE_NAME = "Dypnsapi";
}
DypnsapiClient::DypnsapiClient(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");
}
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, "dypnsapi");
}
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, "dypnsapi");
}
DypnsapiClient::~DypnsapiClient()
{}
DypnsapiClient::CreateVerifySchemeOutcome DypnsapiClient::createVerifyScheme(const CreateVerifySchemeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateVerifySchemeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateVerifySchemeOutcome(CreateVerifySchemeResult(outcome.result()));
else
return CreateVerifySchemeOutcome(outcome.error());
}
void DypnsapiClient::createVerifySchemeAsync(const CreateVerifySchemeRequest& request, const CreateVerifySchemeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createVerifyScheme(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::CreateVerifySchemeOutcomeCallable DypnsapiClient::createVerifySchemeCallable(const CreateVerifySchemeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateVerifySchemeOutcome()>>(
[this, request]()
{
return this->createVerifyScheme(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DypnsapiClient::TwiceTelVerifyOutcome DypnsapiClient::twiceTelVerify(const TwiceTelVerifyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return TwiceTelVerifyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return TwiceTelVerifyOutcome(TwiceTelVerifyResult(outcome.result()));
else
return TwiceTelVerifyOutcome(outcome.error());
}
void DypnsapiClient::twiceTelVerifyAsync(const TwiceTelVerifyRequest& request, const TwiceTelVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, twiceTelVerify(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::TwiceTelVerifyOutcomeCallable DypnsapiClient::twiceTelVerifyCallable(const TwiceTelVerifyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<TwiceTelVerifyOutcome()>>(
[this, request]()
{
return this->twiceTelVerify(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DypnsapiClient::GetMobileOutcome DypnsapiClient::getMobile(const GetMobileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetMobileOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetMobileOutcome(GetMobileResult(outcome.result()));
else
return GetMobileOutcome(outcome.error());
}
void DypnsapiClient::getMobileAsync(const GetMobileRequest& request, const GetMobileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getMobile(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::GetMobileOutcomeCallable DypnsapiClient::getMobileCallable(const GetMobileRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetMobileOutcome()>>(
[this, request]()
{
return this->getMobile(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DypnsapiClient::VerifyMobileOutcome DypnsapiClient::verifyMobile(const VerifyMobileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return VerifyMobileOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return VerifyMobileOutcome(VerifyMobileResult(outcome.result()));
else
return VerifyMobileOutcome(outcome.error());
}
void DypnsapiClient::verifyMobileAsync(const VerifyMobileRequest& request, const VerifyMobileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, verifyMobile(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::VerifyMobileOutcomeCallable DypnsapiClient::verifyMobileCallable(const VerifyMobileRequest &request) const
{
auto task = std::make_shared<std::packaged_task<VerifyMobileOutcome()>>(
[this, request]()
{
return this->verifyMobile(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -1,30 +1,30 @@
/*
* 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/CreateVerifySchemeRequest.h>
using AlibabaCloud::Dypnsapi::Model::CreateVerifySchemeRequest;
CreateVerifySchemeRequest::CreateVerifySchemeRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "CreateVerifyScheme")
{}
CreateVerifySchemeRequest::~CreateVerifySchemeRequest()
{}
/*
* 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/CreateVerifySchemeRequest.h>
using AlibabaCloud::Dypnsapi::Model::CreateVerifySchemeRequest;
CreateVerifySchemeRequest::CreateVerifySchemeRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "CreateVerifyScheme")
{}
CreateVerifySchemeRequest::~CreateVerifySchemeRequest()
{}
long CreateVerifySchemeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
@@ -36,15 +36,26 @@ void CreateVerifySchemeRequest::setResourceOwnerId(long resourceOwnerId)
setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string CreateVerifySchemeRequest::getPackName()const
std::string CreateVerifySchemeRequest::getBundleId()const
{
return packName_;
return bundleId_;
}
void CreateVerifySchemeRequest::setPackName(const std::string& packName)
void CreateVerifySchemeRequest::setBundleId(const std::string& bundleId)
{
packName_ = packName;
setCoreParameter("PackName", packName);
bundleId_ = bundleId;
setCoreParameter("BundleId", bundleId);
}
std::string CreateVerifySchemeRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateVerifySchemeRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
std::string CreateVerifySchemeRequest::getAppName()const
@@ -58,6 +69,28 @@ void CreateVerifySchemeRequest::setAppName(const std::string& appName)
setCoreParameter("AppName", appName);
}
std::string CreateVerifySchemeRequest::getPackSign()const
{
return packSign_;
}
void CreateVerifySchemeRequest::setPackSign(const std::string& packSign)
{
packSign_ = packSign;
setCoreParameter("PackSign", packSign);
}
std::string CreateVerifySchemeRequest::getPackName()const
{
return packName_;
}
void CreateVerifySchemeRequest::setPackName(const std::string& packName)
{
packName_ = packName;
setCoreParameter("PackName", packName);
}
std::string CreateVerifySchemeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
@@ -69,28 +102,6 @@ void CreateVerifySchemeRequest::setResourceOwnerAccount(const std::string& resou
setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string CreateVerifySchemeRequest::getSchemeName()const
{
return schemeName_;
}
void CreateVerifySchemeRequest::setSchemeName(const std::string& schemeName)
{
schemeName_ = schemeName;
setCoreParameter("SchemeName", schemeName);
}
std::string CreateVerifySchemeRequest::getBundleId()const
{
return bundleId_;
}
void CreateVerifySchemeRequest::setBundleId(const std::string& bundleId)
{
bundleId_ = bundleId;
setCoreParameter("BundleId", bundleId);
}
std::string CreateVerifySchemeRequest::getOsType()const
{
return osType_;
@@ -113,25 +124,14 @@ void CreateVerifySchemeRequest::setOwnerId(long ownerId)
setCoreParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateVerifySchemeRequest::getAccessKeyId()const
std::string CreateVerifySchemeRequest::getSchemeName()const
{
return accessKeyId_;
return schemeName_;
}
void CreateVerifySchemeRequest::setAccessKeyId(const std::string& accessKeyId)
void CreateVerifySchemeRequest::setSchemeName(const std::string& schemeName)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
std::string CreateVerifySchemeRequest::getPackSign()const
{
return packSign_;
}
void CreateVerifySchemeRequest::setPackSign(const std::string& packSign)
{
packSign_ = packSign;
setCoreParameter("PackSign", packSign);
schemeName_ = schemeName;
setCoreParameter("SchemeName", schemeName);
}

View File

@@ -1,45 +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/dypnsapi/model/CreateVerifySchemeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
CreateVerifySchemeResult::CreateVerifySchemeResult() :
ServiceResult()
{}
CreateVerifySchemeResult::CreateVerifySchemeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateVerifySchemeResult::~CreateVerifySchemeResult()
{}
void CreateVerifySchemeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
/*
* 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/CreateVerifySchemeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
CreateVerifySchemeResult::CreateVerifySchemeResult() :
ServiceResult()
{}
CreateVerifySchemeResult::CreateVerifySchemeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateVerifySchemeResult::~CreateVerifySchemeResult()
{}
void CreateVerifySchemeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto gateVerifySchemeDTONode = value["GateVerifySchemeDTO"];
if(!gateVerifySchemeDTONode["SchemeCode"].isNull())
gateVerifySchemeDTO_.schemeCode = gateVerifySchemeDTONode["SchemeCode"].asString();
@@ -47,9 +46,9 @@ void CreateVerifySchemeResult::parse(const std::string &payload)
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
}
std::string CreateVerifySchemeResult::getMessage()const
{
return message_;

View File

@@ -1,30 +1,30 @@
/*
* 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/GetMobileRequest.h>
using AlibabaCloud::Dypnsapi::Model::GetMobileRequest;
GetMobileRequest::GetMobileRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "GetMobile")
{}
GetMobileRequest::~GetMobileRequest()
{}
/*
* 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/GetMobileRequest.h>
using AlibabaCloud::Dypnsapi::Model::GetMobileRequest;
GetMobileRequest::GetMobileRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "GetMobile")
{}
GetMobileRequest::~GetMobileRequest()
{}
long GetMobileRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
@@ -58,17 +58,6 @@ void GetMobileRequest::setAccessToken(const std::string& accessToken)
setCoreParameter("AccessToken", accessToken);
}
std::string GetMobileRequest::getOutId()const
{
return outId_;
}
void GetMobileRequest::setOutId(const std::string& outId)
{
outId_ = outId;
setCoreParameter("OutId", outId);
}
long GetMobileRequest::getOwnerId()const
{
return ownerId_;
@@ -91,3 +80,14 @@ void GetMobileRequest::setAccessKeyId(const std::string& accessKeyId)
setCoreParameter("AccessKeyId", accessKeyId);
}
std::string GetMobileRequest::getOutId()const
{
return outId_;
}
void GetMobileRequest::setOutId(const std::string& outId)
{
outId_ = outId;
setCoreParameter("OutId", outId);
}

View File

@@ -1,45 +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/dypnsapi/model/GetMobileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
GetMobileResult::GetMobileResult() :
ServiceResult()
{}
GetMobileResult::GetMobileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetMobileResult::~GetMobileResult()
{}
void GetMobileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
/*
* 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/GetMobileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
GetMobileResult::GetMobileResult() :
ServiceResult()
{}
GetMobileResult::GetMobileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetMobileResult::~GetMobileResult()
{}
void GetMobileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto getMobileResultDTONode = value["GetMobileResultDTO"];
if(!getMobileResultDTONode["Mobile"].isNull())
getMobileResultDTO_.mobile = getMobileResultDTONode["Mobile"].asString();
@@ -47,9 +46,9 @@ void GetMobileResult::parse(const std::string &payload)
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
}
std::string GetMobileResult::getMessage()const
{
return message_;

View File

@@ -1,30 +1,30 @@
/*
* 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")
{}
TwiceTelVerifyRequest::~TwiceTelVerifyRequest()
{}
/*
* 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")
{}
TwiceTelVerifyRequest::~TwiceTelVerifyRequest()
{}
long TwiceTelVerifyRequest::getResourceOwnerId()const
{
return resourceOwnerId_;

View File

@@ -1,45 +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/dypnsapi/model/TwiceTelVerifyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
TwiceTelVerifyResult::TwiceTelVerifyResult() :
ServiceResult()
{}
TwiceTelVerifyResult::TwiceTelVerifyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
TwiceTelVerifyResult::~TwiceTelVerifyResult()
{}
void TwiceTelVerifyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
/*
* 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/TwiceTelVerifyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
TwiceTelVerifyResult::TwiceTelVerifyResult() :
ServiceResult()
{}
TwiceTelVerifyResult::TwiceTelVerifyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
TwiceTelVerifyResult::~TwiceTelVerifyResult()
{}
void TwiceTelVerifyResult::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())
twiceTelVerifyResult_.carrier = twiceTelVerifyResultNode["Carrier"].asString();
@@ -49,9 +48,9 @@ void TwiceTelVerifyResult::parse(const std::string &payload)
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
}
std::string TwiceTelVerifyResult::getMessage()const
{
return message_;

View File

@@ -1,30 +1,30 @@
/*
* 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/VerifyMobileRequest.h>
using AlibabaCloud::Dypnsapi::Model::VerifyMobileRequest;
VerifyMobileRequest::VerifyMobileRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "VerifyMobile")
{}
VerifyMobileRequest::~VerifyMobileRequest()
{}
/*
* 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/VerifyMobileRequest.h>
using AlibabaCloud::Dypnsapi::Model::VerifyMobileRequest;
VerifyMobileRequest::VerifyMobileRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "VerifyMobile")
{}
VerifyMobileRequest::~VerifyMobileRequest()
{}
long VerifyMobileRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
@@ -36,6 +36,28 @@ void VerifyMobileRequest::setResourceOwnerId(long resourceOwnerId)
setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string VerifyMobileRequest::getPhoneNumber()const
{
return phoneNumber_;
}
void VerifyMobileRequest::setPhoneNumber(const std::string& phoneNumber)
{
phoneNumber_ = phoneNumber;
setCoreParameter("PhoneNumber", phoneNumber);
}
std::string VerifyMobileRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void VerifyMobileRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
std::string VerifyMobileRequest::getAccessCode()const
{
return accessCode_;
@@ -58,15 +80,15 @@ void VerifyMobileRequest::setResourceOwnerAccount(const std::string& resourceOwn
setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string VerifyMobileRequest::getPhoneNumber()const
long VerifyMobileRequest::getOwnerId()const
{
return phoneNumber_;
return ownerId_;
}
void VerifyMobileRequest::setPhoneNumber(const std::string& phoneNumber)
void VerifyMobileRequest::setOwnerId(long ownerId)
{
phoneNumber_ = phoneNumber;
setCoreParameter("PhoneNumber", phoneNumber);
ownerId_ = ownerId;
setCoreParameter("OwnerId", std::to_string(ownerId));
}
std::string VerifyMobileRequest::getOutId()const
@@ -80,25 +102,3 @@ void VerifyMobileRequest::setOutId(const std::string& outId)
setCoreParameter("OutId", outId);
}
long VerifyMobileRequest::getOwnerId()const
{
return ownerId_;
}
void VerifyMobileRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", std::to_string(ownerId));
}
std::string VerifyMobileRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void VerifyMobileRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}

View File

@@ -1,45 +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/dypnsapi/model/VerifyMobileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
VerifyMobileResult::VerifyMobileResult() :
ServiceResult()
{}
VerifyMobileResult::VerifyMobileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
VerifyMobileResult::~VerifyMobileResult()
{}
void VerifyMobileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
/*
* 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/VerifyMobileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
VerifyMobileResult::VerifyMobileResult() :
ServiceResult()
{}
VerifyMobileResult::VerifyMobileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
VerifyMobileResult::~VerifyMobileResult()
{}
void VerifyMobileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto gateVerifyResultDTONode = value["GateVerifyResultDTO"];
if(!gateVerifyResultDTONode["VerifyId"].isNull())
gateVerifyResultDTO_.verifyId = gateVerifyResultDTONode["VerifyId"].asString();
@@ -49,9 +48,9 @@ void VerifyMobileResult::parse(const std::string &payload)
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
}
VerifyMobileResult::GateVerifyResultDTO VerifyMobileResult::getGateVerifyResultDTO()const
{
return gateVerifyResultDTO_;